feat: Enhance gallery functionality with lightbox feature and improve icon sprite accessibility

- Added a lightbox feature for gallery images, allowing users to view photos in a modal with navigation controls.
- Updated the SVG sprite to include inline styles for better accessibility.
- Increased CSS specificity by doubling the `.vc-app` class to ensure styles override Astra theme defaults.
- Introduced new shortcodes for bus tours, about section, and articles in the VC_Sections class.
- Improved the handling of featured images in the single tour template for sharper display.
- Updated version number to 1.8.15.
This commit is contained in:
2026-09-23 17:26:56 +03:30
parent b0e302be15
commit d5686ed14b
19 changed files with 1700 additions and 684 deletions

View File

@@ -38,9 +38,18 @@ while ( have_posts() ) :
?>
<div class="vc-app vc-single">
<section class="hero-tour">
<?php if ( $primary ) : ?>
<?php
// Prefer a WordPress featured image (full size, responsive srcset) for a
// sharp hero — Viator's own image URLs cap out around 720px and look soft
// blown up to a full-width banner. Fall back to the Viator primary image.
if ( has_post_thumbnail( $post_id ) ) :
echo get_the_post_thumbnail( $post_id, 'full', array( 'class' => 'hero-tour__photo', 'fetchpriority' => 'high', 'alt' => '', 'sizes' => '100vw' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
elseif ( $primary ) :
?>
<img class="hero-tour__photo" src="<?php echo esc_url( $primary ); ?>" alt="" fetchpriority="high">
<?php endif; ?>
<?php
endif;
?>
<div class="hero-tour__sky" aria-hidden="true"></div>
<div class="container">
<div class="hero-tour__block">