fix: use new mobile vector for hero
Add hero-vector-mobile.php that renders mobile-hero-vector.svg alongside the existing desktop hero partial. The homepage-hero.css hides the desktop SVG and shows the mobile <img> below 768px while preserving every other mobile rule.
This commit is contained in:
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 156 KiB |
@@ -33,6 +33,10 @@
|
|||||||
|
|
||||||
svg {
|
svg {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hero-vector--mobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.intro {
|
.intro {
|
||||||
@@ -122,6 +126,16 @@
|
|||||||
width: var(--hero-vector-width);
|
width: var(--hero-vector-width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.homepage-hero .heroVector .vector > svg {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.homepage-hero .heroVector .hero-vector--mobile {
|
||||||
|
display: block;
|
||||||
|
height: auto;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.homepage-hero .heroMedia img,
|
.homepage-hero .heroMedia img,
|
||||||
.homepage-hero .heroMedia video {
|
.homepage-hero .heroMedia video {
|
||||||
object-position: 58% center;
|
object-position: 58% center;
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ $wrapper = blockWrapperAttributes( $classes, $is_preview );
|
|||||||
<div class="heroVector absolute inset-0 z-10">
|
<div class="heroVector absolute inset-0 z-10">
|
||||||
<div class="vector absolute bottom-8 w-full">
|
<div class="vector absolute bottom-8 w-full">
|
||||||
<?php get_template_part( 'views/partials/hero-vector' ); ?>
|
<?php get_template_part( 'views/partials/hero-vector' ); ?>
|
||||||
|
<?php get_template_part( 'views/partials/hero-vector-mobile' ); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<img class="hero-vector--mobile" src="<?php echo esc_url( get_theme_file_uri( '/static/img/mobile-hero-vector.svg' ) ); ?>" alt="" loading="lazy" role="presentation" />
|
||||||
Reference in New Issue
Block a user