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:
23 files changed
+770
-50
No files matched your search
+216
-2
@@ -263,6 +263,10 @@ footer a {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.chrnx-home .chrnx-featured-stories__grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.chrnx-featured-story,
|
||||
.chrnx-journal-card,
|
||||
.chrnx-podcast-card,
|
||||
@@ -499,6 +503,22 @@ footer a {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* WordPress constrained layouts cap direct children at content-size by
|
||||
* default. */
|
||||
.chrnx-archive > .chrnx-journal-stream,
|
||||
.chrnx-entry--page:has(.chrnx-journal-stream) > .chrnx-journal-stream,
|
||||
.chrnx-entry--page:has(.chrnx-journal-stream) > .entry-content > .chrnx-journal-stream {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
margin-inline: 0 !important;
|
||||
}
|
||||
|
||||
.chrnx-entry--page > .entry-content.wp-block-post-content {
|
||||
width: 100%;
|
||||
max-width: none !important;
|
||||
margin-inline: 0 !important;
|
||||
}
|
||||
|
||||
.chrnx-journal-stream__list > li {
|
||||
min-width: 0;
|
||||
}
|
||||
@@ -714,9 +734,23 @@ html[data-theme="light"] .chrnx-home-music p {
|
||||
.chrnx-archive,
|
||||
.chrnx-search,
|
||||
.chrnx-not-found {
|
||||
width: min(calc(100vw - 2rem), 1200px);
|
||||
max-width: none;
|
||||
margin-inline: auto;
|
||||
padding-block: clamp(3.5rem, 7vw, 7rem);
|
||||
}
|
||||
|
||||
/* The block layout adds its content-size cap with !important on direct
|
||||
* children. */
|
||||
.wp-site-blocks > .chrnx-entry,
|
||||
.wp-site-blocks > .chrnx-archive,
|
||||
.wp-site-blocks > .chrnx-search,
|
||||
.wp-site-blocks > .chrnx-not-found {
|
||||
width: min(calc(100vw - 2rem), 1200px);
|
||||
max-width: 1200px !important;
|
||||
margin-inline: auto !important;
|
||||
}
|
||||
|
||||
.chrnx-entry > h1,
|
||||
.chrnx-archive > h1,
|
||||
.chrnx-search > h1,
|
||||
@@ -852,6 +886,20 @@ html[data-theme="light"] .chrnx-home-music p {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.chrnx-entry--page > .entry-content > .chrnx-project-list,
|
||||
.chrnx-archive > .chrnx-project-list {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
margin-inline: 0 !important;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.chrnx-entry--page > .entry-content > .chrnx-about {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
margin-inline: 0 !important;
|
||||
}
|
||||
|
||||
/* Grunge release cards: torn light, heavy rule, dirt in the corners. */
|
||||
.chrnx-release-card,
|
||||
.chrnx-project-card {
|
||||
@@ -974,6 +1022,128 @@ html[data-theme="light"] .chrnx-home-music p {
|
||||
color: var(--chrnx-text);
|
||||
}
|
||||
|
||||
/* Music release cards use the available page width. */
|
||||
.chrnx-music-landing > .chrnx-release-list {
|
||||
width: min(100%, 1200px);
|
||||
max-width: 1200px;
|
||||
margin-inline: auto;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.chrnx-music-landing {
|
||||
position: relative;
|
||||
width: min(calc(100vw - 2rem), 1200px);
|
||||
max-width: none;
|
||||
left: 50%;
|
||||
margin-inline: 0;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.chrnx-music-landing .chrnx-character-stage,
|
||||
.chrnx-music-landing .chrnx-music-note {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.chrnx-music-landing .chrnx-release-card__main {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, min(32%, 22rem)) minmax(0, 1fr);
|
||||
gap: clamp(1.25rem, 3vw, 2.5rem);
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.chrnx-music-landing .chrnx-release-card__art {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.chrnx-music-landing .chrnx-release-card__content {
|
||||
min-width: 0;
|
||||
padding-block: 0.35rem;
|
||||
}
|
||||
|
||||
.chrnx-release-card__title-link {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.chrnx-release-card__title-link:hover .chrnx-release-card__title,
|
||||
.chrnx-release-card__title-link:focus-visible .chrnx-release-card__title {
|
||||
color: var(--chrnx-green);
|
||||
}
|
||||
|
||||
.chrnx-music-landing .chrnx-release-card__title {
|
||||
font-size: clamp(1.65rem, 1.2rem + 1.4vw, 2.5rem);
|
||||
}
|
||||
|
||||
.chrnx-platform-links__label {
|
||||
font-family: var(--wp--preset--font-family--metadata);
|
||||
font-size: var(--wp--preset--font-size--small);
|
||||
}
|
||||
|
||||
.chrnx-release-card__description {
|
||||
margin-block: 1rem;
|
||||
border-block: 1px solid var(--chrnx-line);
|
||||
}
|
||||
|
||||
.chrnx-release-card__description summary {
|
||||
padding: 0.85rem 0;
|
||||
color: var(--chrnx-green);
|
||||
cursor: pointer;
|
||||
font-family: var(--wp--preset--font-family--metadata);
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.chrnx-release-card__description summary:focus-visible {
|
||||
outline: 2px solid var(--chrnx-green);
|
||||
outline-offset: 4px;
|
||||
}
|
||||
|
||||
.chrnx-release-card__description p {
|
||||
max-width: 70ch;
|
||||
margin: 0 0 1rem;
|
||||
color: var(--chrnx-muted);
|
||||
}
|
||||
|
||||
.chrnx-release-card__tracks {
|
||||
display: grid;
|
||||
gap: 0.45rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.chrnx-release-card__tracks li {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
min-width: 0;
|
||||
font-family: var(--wp--preset--font-family--metadata);
|
||||
}
|
||||
|
||||
.chrnx-release-card__tracks li > span {
|
||||
color: var(--chrnx-green);
|
||||
}
|
||||
|
||||
.chrnx-release-card__tracks a,
|
||||
.chrnx-release-card__lyrics {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.chrnx-release-card__tracks a:hover,
|
||||
.chrnx-release-card__tracks a:focus-visible,
|
||||
.chrnx-release-card__lyrics:hover,
|
||||
.chrnx-release-card__lyrics:focus-visible {
|
||||
color: var(--chrnx-green);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.chrnx-release-card__lyrics {
|
||||
display: inline-block;
|
||||
margin-top: 1rem;
|
||||
color: var(--chrnx-accent);
|
||||
font-family: var(--wp--preset--font-family--metadata);
|
||||
}
|
||||
|
||||
/* Album page. */
|
||||
.chrnx-release-detail__head,
|
||||
.chrnx-project-detail__head {
|
||||
@@ -1210,11 +1380,17 @@ html[data-theme="light"] .chrnx-home-music p {
|
||||
@media (max-width: 900px) {
|
||||
|
||||
.chrnx-journal-stream__list,
|
||||
.chrnx-home .chrnx-featured-stories__grid,
|
||||
.chrnx-release-list,
|
||||
.chrnx-project-list {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.chrnx-entry--page > .entry-content > .chrnx-project-list,
|
||||
.chrnx-archive > .chrnx-project-list {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.chrnx-topic-hero {
|
||||
grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.6fr);
|
||||
}
|
||||
@@ -1628,9 +1804,12 @@ html[data-theme="light"] .chrnx-music-landing .chrnx-character-stage {
|
||||
}
|
||||
|
||||
.chrnx-podcast-landing {
|
||||
width: min(calc(100vw - 2rem), var(--wp--style--global--wide-size));
|
||||
position: relative;
|
||||
max-width: none;
|
||||
margin-inline: calc((100% - min(calc(100vw - 2rem), var(--wp--style--global--wide-size))) / 2);
|
||||
left: 50%;
|
||||
width: min(calc(100vw - 2rem), 1200px);
|
||||
margin-inline: 0;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.chrnx-entry--page:has(.chrnx-music-landing) > .wp-block-post-title,
|
||||
@@ -1638,6 +1817,37 @@ html[data-theme="light"] .chrnx-music-landing .chrnx-character-stage {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.chrnx-podcast-landing .chrnx-character-stage,
|
||||
.chrnx-podcast-landing > .wp-block-chrnx-latest-podcast {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.chrnx-track-meta__description {
|
||||
grid-column: 1 / -1;
|
||||
max-width: 70ch;
|
||||
margin: 0;
|
||||
color: var(--chrnx-muted);
|
||||
}
|
||||
|
||||
.chrnx-track-meta__share {
|
||||
justify-self: start;
|
||||
min-height: 2.5rem;
|
||||
padding-inline: 0.9rem;
|
||||
border: 1px solid color-mix(in srgb, var(--chrnx-accent) 45%, var(--chrnx-line));
|
||||
border-radius: 0.35rem;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.chrnx-track-meta__share:hover,
|
||||
.chrnx-track-meta__share:focus-visible {
|
||||
background: color-mix(in srgb, var(--chrnx-accent) 18%, transparent);
|
||||
color: var(--chrnx-text);
|
||||
}
|
||||
|
||||
/* Landscape backdrops sit behind everything and stay quiet under the copy. */
|
||||
.chrnx-character-stage__atmosphere > .chrnx-responsive-atmosphere {
|
||||
position: absolute;
|
||||
@@ -1751,6 +1961,10 @@ html[data-theme="light"] .chrnx-music-landing .chrnx-character-stage {
|
||||
|
||||
@media (max-width: 780px) {
|
||||
|
||||
.chrnx-music-landing .chrnx-release-card__main {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.chrnx-topic-hero {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
@@ -104,6 +104,13 @@
|
||||
return el(
|
||||
wp.editPost.PluginDocumentSettingPanel,
|
||||
{ name: 'chrnx-track', title: __( 'Track', 'chrnx' ) },
|
||||
el( wp.components.TextareaControl, {
|
||||
label: __( 'Track description', 'chrnx' ),
|
||||
value: meta.chrnx_track_description || '',
|
||||
onChange( value ) {
|
||||
setMeta( 'chrnx_track_description', value );
|
||||
},
|
||||
} ),
|
||||
el( wp.components.TextControl, {
|
||||
label: __( 'Track number', 'chrnx' ),
|
||||
type: 'number',
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
( function () {
|
||||
'use strict';
|
||||
|
||||
document.addEventListener( 'click', function ( event ) {
|
||||
const button = event.target.closest( '[data-chrnx-share]' );
|
||||
if ( ! button ) {
|
||||
return;
|
||||
}
|
||||
|
||||
const title = button.dataset.shareTitle || document.title;
|
||||
const url = button.dataset.shareUrl || window.location.href;
|
||||
const done = function () {
|
||||
const original = button.dataset.originalLabel || button.textContent;
|
||||
button.dataset.originalLabel = original;
|
||||
button.textContent = 'Enlace copiado';
|
||||
window.setTimeout( function () {
|
||||
button.textContent = original;
|
||||
}, 1800 );
|
||||
};
|
||||
|
||||
if ( navigator.share ) {
|
||||
navigator.share( { title, url } ).catch( function () {} );
|
||||
return;
|
||||
}
|
||||
if ( navigator.clipboard && navigator.clipboard.writeText ) {
|
||||
navigator.clipboard
|
||||
.writeText( url )
|
||||
.then( done )
|
||||
.catch( function () {} );
|
||||
}
|
||||
} );
|
||||
} )();
|
||||
Reference in new issue
Block a user