fix: address CHRNX editorial review findings
This commit is contained in:
17 files changed
+236
-10
No files matched your search
@@ -11,7 +11,8 @@ if ( '' === $chrnx_topic && is_tax( 'chrnx_topic' ) ) {
|
||||
$chrnx_topic = $chrnx_queried instanceof WP_Term ? $chrnx_queried->slug : '';
|
||||
}
|
||||
$chrnx_asset = chrnx_get_topic_art_asset( $chrnx_topic );
|
||||
if ( '' === $chrnx_asset ) {
|
||||
$chrnx_size = chrnx_get_topic_art_dimensions( $chrnx_topic );
|
||||
if ( '' === $chrnx_asset || 2 !== count( $chrnx_size ) ) {
|
||||
return;
|
||||
}
|
||||
$chrnx_heading = chrnx_get_heading_level( $attributes['headingLevel'] ?? 2, 2 );
|
||||
@@ -24,7 +25,7 @@ $chrnx_label = $chrnx_term instanceof WP_Term ? $chrnx_term->name : ucfirst( $
|
||||
</div>
|
||||
<div class="chrnx-topic-hero__art">
|
||||
<?php if ( is_readable( get_theme_file_path( $chrnx_asset ) ) ) : ?>
|
||||
<img src="<?php echo esc_url( get_theme_file_uri( $chrnx_asset ) ); ?>" width="1122" height="1402" loading="lazy" decoding="async" alt="" aria-hidden="true">
|
||||
<img src="<?php echo esc_url( get_theme_file_uri( $chrnx_asset ) ); ?>" width="<?php echo esc_attr( $chrnx_size[0] ); ?>" height="<?php echo esc_attr( $chrnx_size[1] ); ?>" loading="lazy" decoding="async" alt="" aria-hidden="true">
|
||||
<?php else : ?>
|
||||
<span class="chrnx-topic-hero__fallback" aria-hidden="true"></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
min-width: min(100%, 16rem);
|
||||
}
|
||||
|
||||
.chrnx-topic-hero__art img {
|
||||
display: block;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.chrnx-topic-hero__fallback {
|
||||
aspect-ratio: 4 / 5;
|
||||
background-color: var(--wp--preset--color--panel);
|
||||
|
||||
Reference in new issue
Block a user