fix: address CHRNX editorial review findings

This commit is contained in:
chrnx committed 2026-08-11 18:18:05 -05:00
1 parent 247f9a7915
commit 7297523e26
17 files changed
+236 -10

No files matched your search

+3 -2
View File
@@ -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; ?>
+6
View File
@@ -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);