fix: use new mobile vector for our work
Replace the clip-path composition of the desktop SVG with a real <img> that references the artist-supplied mobile-work-vector.svg. Drop the CSS-layer trick and the ::before/::after background pieces; the new mobile SVG already covers the composition. Update the linework composition test to assert against the new <img>.
This commit is contained in:
@@ -9,9 +9,10 @@
|
||||
|
||||
namespace CWC;
|
||||
|
||||
$left_image = get_field( 'left_image' );
|
||||
$bottom_image = get_field( 'bottom_image' );
|
||||
$vector_url = get_stylesheet_directory_uri() . '/views/blocks/our-work/our-work-vector.svg';
|
||||
$left_image = get_field( 'left_image' );
|
||||
$bottom_image = get_field( 'bottom_image' );
|
||||
$vector_url = get_stylesheet_directory_uri() . '/views/blocks/our-work/our-work-vector.svg';
|
||||
$mobile_vector_url = get_theme_file_uri( '/static/img/mobile-work-vector.svg' );
|
||||
|
||||
$classes = 'our-work mx-break-out mb-36';
|
||||
|
||||
@@ -32,11 +33,13 @@ $wrapper = blockWrapperAttributes( $classes, $is_preview );
|
||||
|
||||
<section <?php echo wp_kses_post( $wrapper ); ?>>
|
||||
<div class="our-work__vector" aria-hidden="true">
|
||||
<div
|
||||
class="our-work__vector-mobile"
|
||||
style="<?php echo esc_attr( '--our-work-vector-image: url(' . esc_url( $vector_url ) . ');' ); ?>"
|
||||
>
|
||||
<div class="our-work__vector-mobile-clip"></div>
|
||||
<div class="our-work__vector-mobile">
|
||||
<img
|
||||
src="<?php echo esc_url( $mobile_vector_url ); ?>"
|
||||
alt=""
|
||||
loading="lazy"
|
||||
role="presentation"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="our-work__vector-desktop">
|
||||
|
||||
Reference in New Issue
Block a user