diff --git a/astra-child-hoponhopoff.zip b/astra-child-hoponhopoff.zip index b6409eb..1a0c3e8 100644 Binary files a/astra-child-hoponhopoff.zip and b/astra-child-hoponhopoff.zip differ diff --git a/astra-child-hoponhopoff/functions.php b/astra-child-hoponhopoff/functions.php index 0bfc379..f650a70 100644 --- a/astra-child-hoponhopoff/functions.php +++ b/astra-child-hoponhopoff/functions.php @@ -38,6 +38,10 @@ add_action( 'wp_enqueue_scripts', function () { '.hoho .site-header.is-solid{position:sticky;inset-block-start:0;padding-block:var(--sp-2);background:rgba(0,0,0,.85);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);}', // Force the design font over Astra inside the header/footer. '.hoho,.hoho h1,.hoho h2,.hoho h3,.hoho p,.hoho a,.hoho span,.hoho li,.hoho button,.hoho input{font-family:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;}', + // Normalize: stop Astra decorating header/footer links & lists. + '.hoho a,.hoho.hoho a{text-decoration:none!important;box-shadow:none!important;}', + '.hoho :is(ul,ol){list-style:none!important;margin:0!important;padding:0!important;}', + '.hoho li{margin:0!important;}', // Expanding header search field. '.hoho .header__search{display:flex;align-items:center;gap:.25rem;}', '.hoho .header__search-input{width:0;min-width:0;padding:0;border:0;outline:0;opacity:0;height:var(--control-h);border-radius:var(--r-pill);background:rgba(255,255,255,.15);color:#fff;transition:width .25s var(--ease),opacity .2s var(--ease),padding .25s var(--ease);}', diff --git a/removed-images/bus-iso.png b/removed-images/bus-iso.png new file mode 100644 index 0000000..9dd1dd3 Binary files /dev/null and b/removed-images/bus-iso.png differ diff --git a/removed-images/bus-open-top.png b/removed-images/bus-open-top.png new file mode 100644 index 0000000..4585d89 Binary files /dev/null and b/removed-images/bus-open-top.png differ diff --git a/removed-images/ellipse-17-2.png b/removed-images/ellipse-17-2.png new file mode 100644 index 0000000..b635aa6 Binary files /dev/null and b/removed-images/ellipse-17-2.png differ diff --git a/removed-images/ellipse-17.png b/removed-images/ellipse-17.png new file mode 100644 index 0000000..b635aa6 Binary files /dev/null and b/removed-images/ellipse-17.png differ diff --git a/removed-images/hero.png b/removed-images/hero.png new file mode 100644 index 0000000..f127478 Binary files /dev/null and b/removed-images/hero.png differ diff --git a/removed-images/hero2.png b/removed-images/hero2.png new file mode 100644 index 0000000..13c7def Binary files /dev/null and b/removed-images/hero2.png differ diff --git a/viator-collector/assets/img/hero3.jpg b/removed-images/hero3.jpg similarity index 100% rename from viator-collector/assets/img/hero3.jpg rename to removed-images/hero3.jpg diff --git a/removed-images/tower.png b/removed-images/tower.png new file mode 100644 index 0000000..a6a31a2 Binary files /dev/null and b/removed-images/tower.png differ diff --git a/viator-collector.zip b/viator-collector.zip new file mode 100644 index 0000000..32a001b Binary files /dev/null and b/viator-collector.zip differ diff --git a/viator-collector/assets/img/bus-iso.png b/viator-collector/assets/img/bus-iso.png deleted file mode 100644 index ec779d7..0000000 Binary files a/viator-collector/assets/img/bus-iso.png and /dev/null differ diff --git a/viator-collector/assets/img/bus-open-top.png b/viator-collector/assets/img/bus-open-top.png deleted file mode 100644 index 193ad06..0000000 Binary files a/viator-collector/assets/img/bus-open-top.png and /dev/null differ diff --git a/viator-collector/assets/img/ellipse-17-2.png b/viator-collector/assets/img/ellipse-17-2.png deleted file mode 100644 index 6a0ccf5..0000000 Binary files a/viator-collector/assets/img/ellipse-17-2.png and /dev/null differ diff --git a/viator-collector/assets/img/ellipse-17.png b/viator-collector/assets/img/ellipse-17.png deleted file mode 100644 index 6a0ccf5..0000000 Binary files a/viator-collector/assets/img/ellipse-17.png and /dev/null differ diff --git a/viator-collector/assets/img/hero.png b/viator-collector/assets/img/hero.png deleted file mode 100644 index 888a70f..0000000 Binary files a/viator-collector/assets/img/hero.png and /dev/null differ diff --git a/viator-collector/assets/img/hero2.png b/viator-collector/assets/img/hero2.png deleted file mode 100644 index 8b870a7..0000000 Binary files a/viator-collector/assets/img/hero2.png and /dev/null differ diff --git a/viator-collector/assets/img/tower.png b/viator-collector/assets/img/tower.png deleted file mode 100644 index 07b815a..0000000 Binary files a/viator-collector/assets/img/tower.png and /dev/null differ diff --git a/viator-collector/includes/class-vc-display.php b/viator-collector/includes/class-vc-display.php index 16058bc..1a70315 100644 --- a/viator-collector/includes/class-vc-display.php +++ b/viator-collector/includes/class-vc-display.php @@ -24,7 +24,9 @@ class VC_Display { ); public static function init() { - add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) ); + // Priority 20 so Astra has already registered/enqueued its stylesheet; + // our CSS then loads after it and wins equal-specificity ties. + add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ), 20 ); add_action( 'template_redirect', array( __CLASS__, 'maybe_enrich_single' ) ); add_action( 'pre_get_posts', array( __CLASS__, 'filter_archive_query' ) ); add_filter( 'single_template', array( __CLASS__, 'single_template' ) ); @@ -170,14 +172,36 @@ class VC_Display { '', array( // Full-bleed: strip Astra's page-builder article padding/width so - // the hero and sections reach the viewport edges (fixes the extra - // top gap above the hero and the non-full-width sections). - '.vc-fullwidth .site-main>article,.vc-fullwidth .ast-page-builder-template .site-main>article{padding:0;margin:0;border:0;}', - '.vc-fullwidth #primary{margin:0;padding:0;}', - '.vc-fullwidth .site-content .ast-container{max-width:none;padding-inline:0;}', - '.vc-fullwidth .ast-container{max-width:none;}', - '.vc-fullwidth .entry-content{margin-block:0;}', - '.vc-fullwidth .site-content{padding:0;}', + // the hero and sections reach the viewport edges. !important beats + // Astra's own high-specificity rules (e.g. the 2em article padding + // that leaves a gap above the hero). + '.vc-fullwidth .site-main>article,' + . '.vc-fullwidth .ast-page-builder-template .site-main>article,' + . '.vc-fullwidth.ast-page-builder-template .site-main>article' + . '{padding:0!important;margin:0!important;border:0!important;max-width:none!important;}', + '.vc-fullwidth #primary,.vc-fullwidth #content{margin:0!important;padding:0!important;}', + '.vc-fullwidth .site-content .ast-container,.vc-fullwidth .ast-container' + . '{max-width:none!important;padding-left:0!important;padding-right:0!important;}', + '.vc-fullwidth .entry-content{margin-block:0!important;}', + '.vc-fullwidth .site-content{padding:0!important;}', + // Guard against a stray horizontal scrollbar from any full-bleed child. + 'body.vc-fullwidth{overflow-x:hidden;}', + // A gradient stands in when no hero image is set, so the banner is + // never blank. + '.vc-app .hero__media,.vc-app .hero-tour{background:linear-gradient(120deg,#101317,#2cafc2);}', + // Normalize: stop Astra from decorating our components. Its + // .entry-content rules (underlined links, list bullets/indent) + // out-specify our scoped base, so reset them here (!important beats + // e.g. `.ast-single-post .entry-content a`). The .vc-app.vc-app + // doubling lifts specificity without touching design class rules. + '.vc-app a,.vc-app.vc-app a{text-decoration:none;box-shadow:none;}', + '.vc-app :is(ul,ol),.vc-app.vc-app :is(ul,ol){list-style:none!important;margin:0!important;padding:0!important;}', + '.vc-app li{margin:0!important;}', + // …but keep the tour "Overview" prose (the_content) readable. + '.vc-app .tour__text a{text-decoration:underline;}', + '.vc-app .tour__text ul{list-style:disc!important;margin:1em 0!important;padding-inline-start:1.5em!important;}', + '.vc-app .tour__text ol{list-style:decimal!important;margin:1em 0!important;padding-inline-start:1.5em!important;}', + '.vc-app .tour__text li{margin:.25em 0!important;}', // Typography: force the design font over Astra inside our scopes. '.vc-app,.vc-app h1,.vc-app h2,.vc-app h3,.vc-app h4,.vc-app h5,.vc-app h6,' . '.vc-app p,.vc-app a,.vc-app span,.vc-app li,.vc-app button,.vc-app input,' diff --git a/viator-collector/includes/class-vc-sections.php b/viator-collector/includes/class-vc-sections.php index a257dba..7f6ae7a 100644 --- a/viator-collector/includes/class-vc-sections.php +++ b/viator-collector/includes/class-vc-sections.php @@ -50,17 +50,15 @@ class VC_Sections { self::HERO ); - // Prefer a media-library image (responsive srcset); fall back to a URL, - // the plugin's Hero image setting, then the bundled image. - $img = ''; + // Prefer a media-library image (responsive srcset): shortcode image_id, + // then a shortcode URL, then the plugin's Hero image setting. No bundled + // fallback — an empty source shows the CSS gradient. if ( '' !== $atts['image_id'] ) { $img = absint( $atts['image_id'] ); } elseif ( '' !== $atts['image'] ) { $img = $atts['image']; - } elseif ( vc_hero_image_url() ) { - $img = vc_hero_image_url(); } else { - $img = vc_asset_url( 'img/hero.png' ); + $img = vc_hero_image_source(); } $archive = get_post_type_archive_link( 'viator_tour' ); $archive = $archive ? $archive : home_url( '/' ); @@ -405,15 +403,15 @@ class VC_Sections { self::REVIEWS ); - $a1 = vc_asset_url( 'img/ellipse-17.png' ); - $a2 = vc_asset_url( 'img/ellipse-17-2.png' ); + // Avatars are optional; supply them via the vc_testimonials filter + // ('avatar' => attachment URL) — none are bundled with the plugin. $items = apply_filters( 'vc_testimonials', array( - array( 'name' => 'Malika Favre', 'role' => __( 'Paris Tour', 'viator-collector' ), 'text' => __( 'An unforgettable day — the open-top ride and the guide made the whole city feel new. Booking was effortless.', 'viator-collector' ), 'avatar' => $a1, 'size' => 'lg' ), - array( 'name' => 'James Carter', 'role' => __( 'London Tour', 'viator-collector' ), 'text' => __( 'Great value and flexible timing. We hopped on and off all day and saw everything on our list.', 'viator-collector' ), 'avatar' => $a2, 'size' => '' ), - array( 'name' => 'Sofia Rossi', 'role' => __( 'Sydney Tour', 'viator-collector' ), 'text' => __( 'Smooth from start to finish. Highly recommended.', 'viator-collector' ), 'avatar' => $a1, 'size' => 'sm' ), - array( 'name' => 'Liam Nguyen', 'role' => __( 'San Diego Tour', 'viator-collector' ), 'text' => __( 'Friendly crew, comfortable seats and the best views of the coast.', 'viator-collector' ), 'avatar' => $a2, 'size' => '' ), + array( 'name' => 'Malika Favre', 'role' => __( 'Paris Tour', 'viator-collector' ), 'text' => __( 'An unforgettable day — the open-top ride and the guide made the whole city feel new. Booking was effortless.', 'viator-collector' ), 'avatar' => '', 'size' => 'lg' ), + array( 'name' => 'James Carter', 'role' => __( 'London Tour', 'viator-collector' ), 'text' => __( 'Great value and flexible timing. We hopped on and off all day and saw everything on our list.', 'viator-collector' ), 'avatar' => '', 'size' => '' ), + array( 'name' => 'Sofia Rossi', 'role' => __( 'Sydney Tour', 'viator-collector' ), 'text' => __( 'Smooth from start to finish. Highly recommended.', 'viator-collector' ), 'avatar' => '', 'size' => 'sm' ), + array( 'name' => 'Liam Nguyen', 'role' => __( 'San Diego Tour', 'viator-collector' ), 'text' => __( 'Friendly crew, comfortable seats and the best views of the coast.', 'viator-collector' ), 'avatar' => '', 'size' => '' ), ) ); if ( empty( $items ) ) { diff --git a/viator-collector/includes/class-vc-settings.php b/viator-collector/includes/class-vc-settings.php index c3110c3..614d45d 100644 --- a/viator-collector/includes/class-vc-settings.php +++ b/viator-collector/includes/class-vc-settings.php @@ -75,6 +75,8 @@ class VC_Settings { 'timeout' => 20, 'default_post_status' => 'publish', 'hero_image' => '', + 'hero_image_id' => 0, + 'single_hero_figure_id' => 0, 'hero_slides' => '', 'crawl_destinations' => '', 'rate_limit_per_minute' => 25, @@ -122,6 +124,8 @@ class VC_Settings { 'timeout' => max( 5, absint( $input['timeout'] ?? 20 ) ), 'default_post_status' => sanitize_key( $input['default_post_status'] ?? 'publish' ), 'hero_image' => esc_url_raw( $input['hero_image'] ?? '' ), + 'hero_image_id' => absint( $input['hero_image_id'] ?? 0 ), + 'single_hero_figure_id' => absint( $input['single_hero_figure_id'] ?? 0 ), 'hero_slides' => self::sanitize_id_list( $input['hero_slides'] ?? '' ), 'crawl_destinations' => self::sanitize_id_list( $input['crawl_destinations'] ?? '' ), 'rate_limit_per_minute' => max( 1, min( 60, absint( $input['rate_limit_per_minute'] ?? 25 ) ) ), @@ -198,9 +202,10 @@ class VC_Settings {
+ 'hero-tour__figure', 'loading' => 'eager', 'alt' => '' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ }
+ ?>