feat(editorial): widen sections and add local track pages

Unify the editorial canvas across section pages, keep release tracks out of Journal, and give each song a listening surface with audio, metadata, platform links, sharing, and optional featured art. Document and seed the local The No Names fixture without changing production data.
This commit is contained in:
chrnx committed 2026-08-27 20:24:39 -05:00
1 parent 135b462bd2
commit 76917decd0
23 files changed
+770 -50

No files matched your search

+41 -15
View File
@@ -5,13 +5,15 @@
* @package CHRNX
*/
$chrnx_heading = chrnx_get_heading_level( $attributes['headingLevel'] ?? 4, 4 );
$chrnx_terms = get_terms(
array(
'taxonomy' => 'chrnx_release',
'hide_empty' => false,
)
);
$chrnx_heading = chrnx_get_heading_level( $attributes['headingLevel'] ?? 4, 4 );
$chrnx_release_order = array( 'el-hermoso-caos', 'ando-bien-arriba', 'aqui-se-rompio-una-jerga', 'side-b' );
$chrnx_terms = array();
foreach ( $chrnx_release_order as $chrnx_release_slug ) {
$chrnx_release_term = get_term_by( 'slug', $chrnx_release_slug, 'chrnx_release' );
if ( $chrnx_release_term instanceof WP_Term ) {
$chrnx_terms[] = $chrnx_release_term;
}
}
if ( is_wp_error( $chrnx_terms ) || empty( $chrnx_terms ) ) {
return;
}
@@ -25,9 +27,7 @@ if ( is_wp_error( $chrnx_terms ) || empty( $chrnx_terms ) ) {
$chrnx_links = chrnx_get_release_links( $chrnx_term->term_id );
?>
<article class="chrnx-release-card">
<?php if ( ! is_wp_error( $chrnx_link ) ) : ?>
<a class="chrnx-release-card__link" href="<?php echo esc_url( $chrnx_link ); ?>">
<?php endif; ?>
<div class="chrnx-release-card__main">
<span class="chrnx-release-card__art">
<?php
$chrnx_cover_markup = $chrnx_cover > 0 ? wp_get_attachment_image( $chrnx_cover, 'chrnx-card', false, array( 'class' => 'chrnx-release-card__cover' ) ) : '';
@@ -38,14 +38,40 @@ if ( is_wp_error( $chrnx_terms ) || empty( $chrnx_terms ) ) {
<?php echo chrnx_get_topic_portrait_markup( 'placeholder-release', '', 'chrnx-release-card__fallback' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Helper returns escaped, allowlisted markup. ?>
<?php endif; ?>
</span>
<h<?php echo esc_attr( $chrnx_heading ); ?> class="chrnx-release-card__title"><?php echo esc_html( $chrnx_term->name ); ?></h<?php echo esc_attr( $chrnx_heading ); ?>>
<div class="chrnx-release-card__content">
<?php if ( ! is_wp_error( $chrnx_link ) ) : ?>
<a class="chrnx-release-card__title-link" href="<?php echo esc_url( $chrnx_link ); ?>">
<?php endif; ?>
<h<?php echo esc_attr( $chrnx_heading ); ?> class="chrnx-release-card__title"><?php echo esc_html( $chrnx_term->name ); ?></h<?php echo esc_attr( $chrnx_heading ); ?>>
<?php
if ( ! is_wp_error( $chrnx_link ) ) :
?>
</a><?php endif; ?>
<?php if ( '' !== $chrnx_status ) : ?>
<p class="chrnx-release-card__status"><?php echo esc_html( $chrnx_status ); ?></p>
<?php endif; ?>
<?php if ( ! is_wp_error( $chrnx_link ) ) : ?>
</a>
<?php endif; ?>
<?php echo chrnx_get_platform_links_markup( $chrnx_links, 'chrnx-platform-links' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo chrnx_get_platform_links_markup( $chrnx_links, 'chrnx-platform-links' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<details class="chrnx-release-card__description">
<summary><?php echo esc_html__( 'Sobre el disco', 'chrnx' ); ?></summary>
<?php if ( '' !== trim( $chrnx_term->description ) ) : ?>
<p><?php echo esc_html( $chrnx_term->description ); ?></p>
<?php else : ?>
<p><?php echo esc_html__( 'Descripción pendiente.', 'chrnx' ); ?></p>
<?php endif; ?>
</details>
<?php $chrnx_preview_tracks = chrnx_get_release_track_ids( $chrnx_term->slug, 3 ); ?>
<?php if ( ! empty( $chrnx_preview_tracks ) ) : ?>
<ol class="chrnx-release-card__tracks">
<?php foreach ( $chrnx_preview_tracks as $chrnx_track_index => $chrnx_track_id ) : ?>
<li><span><?php echo esc_html( str_pad( (string) ( $chrnx_track_index + 1 ), 2, '0', STR_PAD_LEFT ) ); ?></span><a href="<?php echo esc_url( get_permalink( $chrnx_track_id ) ); ?>"><?php echo esc_html( get_the_title( $chrnx_track_id ) ); ?></a></li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<?php if ( ! is_wp_error( $chrnx_link ) ) : ?>
<a class="chrnx-release-card__lyrics" href="<?php echo esc_url( $chrnx_link ); ?>"><?php echo esc_html__( 'Ver letras', 'chrnx' ); ?> <span aria-hidden="true">↗</span></a>
<?php endif; ?>
</div>
</div>
</article>
<?php endforeach; ?>
</div>