feat: add atmosphere backdrops and shipped placeholders

About and Projects had a figure floating on a CSS gradient while Music
and Podcasts had a whole world behind theirs. They get their own
landscape backdrop, which is what made the four read as one series.

Adds placeholder art for a release without a cover and a post without a
featured image, composited over the per-topic accent so a grid of
missing images still varies. Tracks borrow their album cover first.

The generated inventory grows to 76 files. Placeholders encode at lower
quality because they sit at half opacity behind text, which kept the
payload inside its budget instead of raising it again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-13 19:41:48 -05:00
1 parent d1ad17f4be
commit f859780eaa
32 files changed
+540 -136

No files matched your search

+6 -5
View File
@@ -83,13 +83,14 @@ responsive_output=$(mktemp -d "${TMPDIR:-/tmp}/chrnx-responsive.XXXXXX")
The rebuild rejects symlinks, nested paths, nonexistent paths, and destinations
outside the canonical system temporary directory. The automated smoke test
byte-compares all 52 generated files: 42 binary derivatives and 10 manifests.
The inventory has nine portrait families at 384 px and 768 px, plus the Podcast
background family at 384 px, 768 px, and 1536 px. Every 384/768 derivative is
limited to 160 KiB; each 1536 px Podcast derivative is limited to 260 KiB. The
byte-compares all 76 generated files: 62 binary derivatives and 14 manifests.
The inventory has eleven portrait families at 384 px and 768 px, plus three
landscape background families (Podcast, About, and Projects) at 384 px, 768 px,
and 1536 px. Every 384/768 derivative is
limited to 160 KiB; each 1536 px background derivative is limited to 260 KiB. The
collage, Gaming half-body, and Podcast families are capped at 400 KiB, 340 KiB,
and 620 KiB respectively, while all generated binaries together are capped at
2.75 MiB. The complete inventory, including manifests, must rebuild
3 MiB. The complete inventory, including manifests, must rebuild
byte-identically.
The builder uses transactional publication with rollback: a failed promotion
+490 -125
View File
@@ -252,7 +252,7 @@ footer a {
.chrnx-featured-stories > h2,
.chrnx-journal-stream > h2,
.chrnx-home-projects > h2,
.chrnx-home-projects h2,
.chrnx-home-music h2,
.chrnx-home-about-preview h2 {
font-size: var(--wp--preset--font-size--x-large);
@@ -313,12 +313,18 @@ footer a {
text-transform: uppercase;
}
/*
* Break an unbroken token so it cannot widen the card, but never clip:
* card titles stay fully readable by contract.
*/
.chrnx-featured-story__title,
.chrnx-journal-card__title,
.chrnx-podcast-card__title,
.chrnx-related-card__title {
margin: 0;
font-size: var(--wp--preset--font-size--large);
word-break: normal;
overflow-wrap: anywhere;
}
.chrnx-featured-story__excerpt,
@@ -326,6 +332,20 @@ footer a {
.chrnx-podcast-card__excerpt,
.chrnx-related-card__excerpt {
color: var(--chrnx-muted);
word-break: normal;
overflow-wrap: anywhere;
}
/* The placeholder ships as a <picture>, so the wrapper must fill the slot. */
.chrnx-featured-story__link > .chrnx-responsive-portrait,
.chrnx-journal-card__link > .chrnx-responsive-portrait,
.chrnx-podcast-card__link > .chrnx-responsive-portrait,
.chrnx-related-card__link > .chrnx-responsive-portrait,
.chrnx-release-card__art > .chrnx-responsive-portrait,
.chrnx-release-detail__art > .chrnx-responsive-portrait {
display: block;
width: 100%;
height: 100%;
}
.chrnx-featured-story__fallback,
@@ -337,6 +357,11 @@ footer a {
radial-gradient(circle at 76% 24%, var(--chrnx-accent-soft) 0 14%, transparent 15%);
}
/*
* The placeholder sits at half opacity over the per-topic gradient, so a grid
* of missing images still varies by topic instead of repeating one bright
* wedge. Its dark corner is favoured in narrow card slots.
*/
.chrnx-featured-story__fallback,
.chrnx-journal-card__fallback,
.chrnx-podcast-card__fallback,
@@ -345,6 +370,8 @@ footer a {
background-image:
linear-gradient(135deg, transparent 0 46%, color-mix(in srgb, var(--chrnx-card-accent, var(--chrnx-green)) 35%, transparent) 47% 52%, transparent 53%),
radial-gradient(circle at 72% 28%, color-mix(in srgb, var(--chrnx-card-accent, var(--chrnx-green)) 28%, transparent) 0 15%, transparent 16%);
object-position: 22% 18%;
opacity: 0.55;
}
.chrnx-featured-story__fallback.is-topic-code,
@@ -353,6 +380,12 @@ footer a {
--chrnx-card-accent: #59c3c3;
}
.chrnx-featured-story__fallback.is-topic-projects,
.chrnx-journal-card__fallback.is-topic-projects,
.chrnx-related-card__fallback.is-topic-projects {
--chrnx-card-accent: #4fb0a8;
}
.chrnx-featured-story__fallback.is-topic-research,
.chrnx-journal-card__fallback.is-topic-research,
.chrnx-related-card__fallback.is-topic-research {
@@ -460,47 +493,53 @@ footer a {
border-top: 0;
}
.chrnx-home > .chrnx-home-music {
/* Both wrappers now delegate their surface to the stage, so neither pads. */
.chrnx-home > .chrnx-home-music,
.chrnx-home > .chrnx-home-projects {
padding-block: 0;
}
/*
* ponytail: bare wrapper. The frame, background and min-height belong to
* .chrnx-character-stage inside it; duplicating them here drew two
* nested boxes.
*/
.chrnx-home-projects {
position: relative;
isolation: isolate;
min-height: 34rem;
overflow: hidden;
padding-inline: clamp(1.5rem, 5vw, 4rem);
border: 1px solid var(--chrnx-line);
border-radius: calc(var(--chrnx-radius) * 1.5);
background-color: var(--chrnx-surface);
background-image:
linear-gradient(125deg, var(--chrnx-surface) 0 58%, transparent 58%),
radial-gradient(circle at 80% 35%, var(--chrnx-accent-soft), transparent 48%);
box-shadow: var(--chrnx-shadow);
}
.chrnx-home-projects > h2,
.chrnx-home-projects > .wp-block-columns {
position: relative;
z-index: 2;
max-width: 62%;
}
.chrnx-home-projects .wp-block-columns {
.chrnx-selected-work__list {
display: grid;
gap: 0;
grid-template-columns: 1fr;
margin-bottom: 0;
margin: 0;
padding: 0;
border-top: 1px solid var(--chrnx-line);
list-style: none;
}
.chrnx-home-projects .wp-block-column {
.chrnx-selected-work__item {
padding-block: 1.25rem;
border-bottom: 1px solid var(--chrnx-line);
}
.chrnx-home-projects .wp-block-column h3 {
.chrnx-selected-work__title {
margin: 0;
overflow-wrap: anywhere;
}
.chrnx-selected-work__title a {
color: inherit;
text-decoration: none;
}
.chrnx-selected-work__title a:hover {
text-decoration: underline;
}
.chrnx-selected-work__empty {
margin: 0;
color: var(--chrnx-muted);
}
.chrnx-responsive-portrait {
@@ -514,22 +553,6 @@ footer a {
filter: drop-shadow(0 2rem 2rem rgb(0 0 0 / 28%));
}
.chrnx-home-projects > .chrnx-responsive-portrait {
position: absolute;
z-index: 1;
right: clamp(0.5rem, 3vw, 2rem);
bottom: 0;
width: min(41%, 23rem);
}
.chrnx-home-projects > .chrnx-responsive-portrait:last-child {
z-index: 0;
right: 24%;
width: min(28%, 15rem);
opacity: 0.38;
filter: saturate(0.55) contrast(1.08) drop-shadow(0 1rem 2rem rgb(0 0 0 / 24%));
}
.chrnx-home-music .wp-block-columns {
position: relative;
isolation: isolate;
@@ -699,7 +722,7 @@ html[data-theme="light"] .chrnx-home-music p {
.chrnx-archive > h1,
.chrnx-search > h1,
.chrnx-not-found > h1 {
font-size: var(--wp--preset--font-size--display);
font-size: var(--wp--preset--font-size--x-large);
letter-spacing: -0.035em;
}
@@ -796,14 +819,311 @@ html[data-theme="light"] .chrnx-home-music p {
object-position: bottom;
}
/* Reads as a pull quote without claiming to quote anyone. */
.chrnx-music-note {
position: relative;
max-width: 46rem;
margin-block: clamp(2rem, 5vw, 3.5rem);
padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.5rem);
border-left: 3px solid var(--chrnx-accent);
border-radius: 0 var(--chrnx-radius) var(--chrnx-radius) 0;
background: color-mix(in srgb, var(--chrnx-surface) 90%, transparent);
font-size: clamp(1.1rem, 1rem + 0.55vw, 1.45rem);
line-height: 1.5;
text-wrap: pretty;
}
.chrnx-music-note::before {
position: absolute;
top: -0.35em;
left: 0.35rem;
color: var(--chrnx-accent);
content: "\201C";
font-family: var(--wp--preset--font-family--heading);
font-size: 5rem;
line-height: 1;
opacity: 0.28;
pointer-events: none;
}
.chrnx-release-list {
display: grid;
gap: 1rem;
grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* Grunge release cards: torn light, heavy rule, dirt in the corners. */
.chrnx-release-card {
padding: 1.5rem;
position: relative;
isolation: isolate;
overflow: hidden;
padding: 1.75rem 1.5rem 1.5rem;
border-color: color-mix(in srgb, var(--chrnx-accent) 30%, var(--chrnx-line));
border-top: 3px solid var(--chrnx-accent);
background-color: var(--chrnx-surface-raised);
background-image:
linear-gradient(118deg, transparent 0 44%, color-mix(in srgb, var(--chrnx-accent) 14%, transparent) 44.5% 46%, transparent 46.5%),
linear-gradient(154deg, transparent 0 72%, color-mix(in srgb, var(--chrnx-green) 10%, transparent) 72.5% 73.5%, transparent 74%),
radial-gradient(ellipse at 88% 6%, color-mix(in srgb, var(--chrnx-accent) 22%, transparent), transparent 58%),
radial-gradient(ellipse at 4% 100%, rgb(0 0 0 / 34%), transparent 46%);
transition: transform 160ms ease, border-color 160ms ease;
}
.chrnx-release-card::after {
position: absolute;
z-index: -1;
inset: 0;
background-image: repeating-linear-gradient(96deg, rgb(255 255 255 / 3.5%) 0 1px, transparent 1px 4px);
content: "";
mix-blend-mode: overlay;
pointer-events: none;
}
.chrnx-release-card:hover {
border-top-color: var(--chrnx-green);
transform: translateY(-3px);
}
.chrnx-release-card__link {
display: block;
color: inherit;
text-decoration: none;
}
.chrnx-release-card__art {
display: block;
overflow: hidden;
margin-bottom: 1rem;
border: 1px solid var(--chrnx-line);
border-radius: calc(var(--chrnx-radius) * 0.6);
aspect-ratio: 1;
}
.chrnx-release-card__cover,
.chrnx-release-card__fallback {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.chrnx-release-card__fallback,
.chrnx-release-detail__fallback {
background-color: var(--chrnx-surface);
background-image:
linear-gradient(132deg, transparent 0 46%, color-mix(in srgb, var(--chrnx-accent) 42%, transparent) 47% 50%, transparent 51%),
linear-gradient(28deg, transparent 0 64%, color-mix(in srgb, var(--chrnx-green) 26%, transparent) 65% 67%, transparent 68%),
radial-gradient(circle at 70% 28%, color-mix(in srgb, var(--chrnx-accent) 34%, transparent), transparent 52%);
}
.chrnx-release-card__title {
margin: 0 0 0.4rem;
text-wrap: balance;
}
.chrnx-release-card__link:hover .chrnx-release-card__title {
color: var(--chrnx-green);
}
.chrnx-release-card__status,
.chrnx-release-detail__status {
margin: 0;
color: var(--chrnx-muted);
font-family: var(--wp--preset--font-family--metadata);
font-size: var(--wp--preset--font-size--small);
letter-spacing: 0.04em;
}
/* Platform icons: only rendered when a URL exists, never as dead links. */
.chrnx-platform-links {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
margin: 0.85rem 0 0;
padding: 0;
list-style: none;
}
.chrnx-platform-links__link {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 44px;
min-height: 44px;
border-radius: 0.35rem;
color: var(--chrnx-muted);
text-decoration: none;
}
.chrnx-platform-links__link:hover,
.chrnx-platform-links__link:focus-visible {
background: color-mix(in srgb, var(--chrnx-green) 18%, transparent);
color: var(--chrnx-text);
}
/* Album page. */
.chrnx-release-detail__head {
display: grid;
gap: clamp(1.5rem, 4vw, 3rem);
grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
align-items: start;
margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.chrnx-release-detail__head.is-bare {
grid-template-columns: minmax(0, 22rem);
}
.chrnx-release-detail__art {
position: relative;
overflow: hidden;
border: 1px solid color-mix(in srgb, var(--chrnx-accent) 34%, var(--chrnx-line));
border-radius: var(--chrnx-radius);
aspect-ratio: 1;
box-shadow: var(--chrnx-shadow);
}
.chrnx-release-detail__cover,
.chrnx-release-detail__fallback {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.chrnx-release-detail__description {
margin: 0.75rem 0 0;
color: var(--chrnx-text);
}
.chrnx-release-detail__empty {
padding: 2rem;
border: 1px dashed var(--chrnx-line);
border-radius: var(--chrnx-radius);
color: var(--chrnx-muted);
}
/* Tracklist: number, player, then title. */
.chrnx-tracklist {
display: grid;
gap: 0;
margin: 0;
padding: 0;
border-top: 1px solid var(--chrnx-line);
list-style: none;
}
/* Explicit columns so a track without audio keeps its title in place. */
.chrnx-tracklist__item {
display: grid;
gap: 0.5rem 1rem;
grid-template-columns: 2.5rem minmax(0, 17rem) minmax(0, 1fr);
align-items: center;
padding-block: 1rem;
border-bottom: 1px solid var(--chrnx-line);
}
.chrnx-tracklist__player {
grid-column: 2;
}
.chrnx-tracklist__body {
grid-column: 3;
}
.chrnx-tracklist__item:hover {
background: color-mix(in srgb, var(--chrnx-accent) 7%, transparent);
}
.chrnx-tracklist__number {
grid-column: 1;
color: var(--chrnx-muted);
font-family: var(--wp--preset--font-family--metadata);
font-size: var(--wp--preset--font-size--small);
}
.chrnx-tracklist__title {
margin: 0;
font-size: var(--wp--preset--font-size--medium);
}
.chrnx-tracklist__title a {
color: inherit;
text-decoration: none;
}
.chrnx-tracklist__title a:hover {
text-decoration: underline;
}
.chrnx-tracklist__body .chrnx-platform-links {
margin-top: 0.25rem;
}
.chrnx-track-player {
display: block;
width: 100%;
max-width: 17rem;
height: 2.5rem;
}
/* Single track page. */
.chrnx-track-meta {
display: grid;
gap: 1rem 1.5rem;
grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
align-items: center;
margin-block: 2rem;
padding: 1.25rem;
border: 1px solid color-mix(in srgb, var(--chrnx-accent) 30%, var(--chrnx-line));
border-left: 3px solid var(--chrnx-accent);
border-radius: var(--chrnx-radius);
background: var(--chrnx-surface-raised);
}
.chrnx-track-meta__release {
margin: 0;
}
.chrnx-track-meta__label,
.chrnx-track-meta__number {
color: var(--chrnx-muted);
font-family: var(--wp--preset--font-family--metadata);
font-size: var(--wp--preset--font-size--small);
}
.chrnx-track-meta__number {
display: block;
margin-top: 0.35rem;
}
.chrnx-track-meta .chrnx-platform-links {
margin-top: 0.35rem;
}
@media (max-width: 720px) {
.chrnx-release-detail__head,
.chrnx-track-meta {
grid-template-columns: minmax(0, 1fr);
}
.chrnx-tracklist__item {
grid-template-columns: 2.5rem minmax(0, 1fr);
}
.chrnx-tracklist__body {
grid-column: 2;
}
.chrnx-tracklist__player {
grid-row: 2;
grid-column: 1 / -1;
}
.chrnx-track-player {
max-width: none;
}
}
.chrnx-podcast-landing > .chrnx-responsive-portrait {
@@ -818,36 +1138,6 @@ html[data-theme="light"] .chrnx-home-music p {
display: none;
}
.chrnx-about__portraits {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
align-items: end;
overflow: hidden;
margin-block: 2rem 3rem;
border: 1px solid var(--chrnx-line);
border-radius: calc(var(--chrnx-radius) * 1.5);
background: linear-gradient(145deg, var(--chrnx-surface), var(--chrnx-accent-soft));
}
.chrnx-about__portraits .chrnx-responsive-portrait {
min-width: 0;
margin: 0 -14%;
}
.chrnx-about__portraits .chrnx-responsive-portrait:first-child {
margin-left: 0;
}
.chrnx-about__portraits .chrnx-responsive-portrait:last-child {
margin-right: 0;
}
.chrnx-about__portraits .chrnx-section-portrait {
max-height: 24rem;
object-fit: contain;
object-position: bottom;
}
.chrnx-journal-stream__empty,
.chrnx-not-found .wp-block-search,
.chrnx-search .wp-block-query-no-results {
@@ -899,11 +1189,6 @@ html[data-theme="light"] .chrnx-home-music p {
grid-template-columns: 1fr;
}
.chrnx-home-projects > h2,
.chrnx-home-projects > .wp-block-columns {
max-width: 70%;
}
.chrnx-topic-hero {
grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.6fr);
}
@@ -957,30 +1242,12 @@ html[data-theme="light"] .chrnx-home-music p {
min-height: 10rem;
}
.chrnx-home-projects {
min-height: 36rem;
padding-inline: 1.5rem;
}
.chrnx-home-projects > h2,
.chrnx-home-projects > .wp-block-columns {
max-width: 100%;
}
.chrnx-home-projects > .chrnx-responsive-portrait {
right: 0;
width: min(68%, 19rem);
}
.chrnx-home-projects > .chrnx-responsive-portrait:last-child {
display: none;
}
.chrnx-home-music .wp-block-columns {
padding: 2rem 1.5rem 0;
}
.chrnx-home > .chrnx-home-music {
.chrnx-home > .chrnx-home-music,
.chrnx-home > .chrnx-home-projects {
padding-block: 0;
}
@@ -1029,16 +1296,6 @@ html[data-theme="light"] .chrnx-home-music p {
margin: 0 auto 2rem;
}
.chrnx-about__portraits {
grid-template-columns: repeat(3, 70%);
overflow-x: auto;
scroll-snap-type: x mandatory;
}
.chrnx-about__portraits .chrnx-responsive-portrait {
margin: 0;
scroll-snap-align: center;
}
}
@media (prefers-reduced-motion: reduce) {
@@ -1056,10 +1313,6 @@ html[data-theme="light"] .chrnx-home-music p {
.chrnx-related-card:hover {
transform: none;
}
.chrnx-about__portraits {
scroll-behavior: auto;
}
}
/* Shared character-led section frame. */
@@ -1169,6 +1422,24 @@ html[data-theme="light"] .chrnx-home-music p {
margin: 0;
}
/*
* The copy surface stays solid so text contrast stays guaranteed and testable.
* This strip continues it into the art column so the panel stops ending in a
* hard vertical line. It lives inside the art column to avoid overflowing the
* stage, and sits under the character. Text never reaches it.
*/
.chrnx-character-stage__art::after {
position: absolute;
z-index: 0;
top: 0;
bottom: 0;
left: 0;
width: clamp(2rem, 14%, 6rem);
background-image: linear-gradient(to right, var(--chrnx-character-copy-surface), transparent);
content: "";
pointer-events: none;
}
.chrnx-character-stage__art::before {
position: absolute;
z-index: 1;
@@ -1203,15 +1474,19 @@ html[data-theme="light"] .chrnx-home-music p {
filter: var(--chrnx-character-shadow) saturate(0.96) contrast(1.04);
}
/*
* An echo, not a second subject: pushed to the edge and faint enough that it
* reads as depth. At 0.34 next to the primary it looked like a duplicate.
*/
.chrnx-character-stage__secondary-art {
position: absolute;
z-index: 1;
right: 27%;
right: 2%;
bottom: 0;
width: min(29%, 18rem);
width: min(24%, 15rem);
height: auto;
opacity: 0.34;
filter: saturate(0.55) contrast(1.08) drop-shadow(0 1rem 2rem rgb(0 0 0 / 24%));
opacity: 0.13;
filter: saturate(0.25) contrast(1.12) blur(1px);
}
.chrnx-character-stage__atmosphere > .chrnx-responsive-portrait {
@@ -1291,6 +1566,18 @@ html[data-theme="light"] .chrnx-music-landing .chrnx-character-stage {
--chrnx-character-copy-surface: rgb(13 17 23 / 86%);
}
@media (prefers-color-scheme: light) {
:root:not([data-theme]) .chrnx-character-stage {
--chrnx-character-copy-surface: rgb(255 253 247 / 90%);
}
:root:not([data-theme]) .chrnx-home-music .chrnx-character-stage,
:root:not([data-theme]) .chrnx-music-landing .chrnx-character-stage {
--chrnx-character-copy-surface: rgb(13 17 23 / 86%);
}
}
.chrnx-home-music .chrnx-character-stage__content,
.chrnx-home-music .chrnx-character-stage__content h2,
.chrnx-home-music .chrnx-character-stage__content p,
@@ -1325,6 +1612,25 @@ html[data-theme="light"] .chrnx-music-landing .chrnx-character-stage {
text-align: center;
}
/* Landscape backdrops sit behind everything and stay quiet under the copy. */
.chrnx-character-stage__atmosphere > .chrnx-responsive-atmosphere {
position: absolute;
z-index: 0;
inset: 0;
display: block;
width: 100%;
height: 100%;
}
.chrnx-character-stage__backdrop {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: right center;
opacity: 0.62;
}
.chrnx-music-landing .chrnx-character-stage__atmosphere > .chrnx-responsive-portrait,
.chrnx-podcast-landing .chrnx-character-stage__atmosphere > .chrnx-responsive-portrait {
position: absolute;
@@ -1417,16 +1723,6 @@ html[data-theme="light"] .chrnx-music-landing .chrnx-character-stage {
box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 18%);
}
.chrnx-character-facets {
position: relative;
z-index: 0;
opacity: 0.84;
}
.chrnx-character-facets .chrnx-section-portrait {
filter: saturate(0.72) contrast(1.02) drop-shadow(0 1rem 1.25rem rgb(0 0 0 / 20%));
}
@media (max-width: 780px) {
.chrnx-topic-hero {
@@ -1491,3 +1787,72 @@ html[data-theme="light"] .chrnx-music-landing .chrnx-character-stage {
transition: none !important;
}
}
/* Subscribe form: rendered only when a provider endpoint is configured. */
.chrnx-subscribe-form {
max-width: 42rem;
margin-block: clamp(2rem, 5vw, 3rem);
padding: clamp(1.5rem, 4vw, 2.5rem);
border: 1px solid color-mix(in srgb, var(--chrnx-green) 30%, var(--chrnx-line));
border-left: 3px solid var(--chrnx-green);
border-radius: var(--chrnx-radius);
background: var(--chrnx-surface-raised);
}
.chrnx-subscribe-form__title {
margin: 0 0 0.5rem;
}
.chrnx-subscribe-form__note {
margin: 0 0 1.25rem;
color: var(--chrnx-muted);
}
.chrnx-subscribe-form__form {
display: grid;
gap: 0.5rem;
grid-template-columns: minmax(0, 1fr) auto;
align-items: end;
}
.chrnx-subscribe-form__label {
grid-column: 1 / -1;
color: var(--chrnx-muted);
font-family: var(--wp--preset--font-family--metadata);
font-size: var(--wp--preset--font-size--small);
}
.chrnx-subscribe-form__input {
box-sizing: border-box;
width: 100%;
min-height: 45px;
padding-inline: 0.75rem;
border: 1px solid var(--chrnx-line);
border-radius: 0.35rem;
background: var(--chrnx-bg);
color: var(--chrnx-text);
font: inherit;
}
.chrnx-subscribe-form__button {
min-height: 45px;
padding-inline: 1.25rem;
border: 0;
border-radius: 0.35rem;
background: var(--chrnx-green);
color: var(--chrnx-bg);
font: inherit;
font-weight: 700;
cursor: pointer;
}
.chrnx-subscribe-form__button:hover {
background: color-mix(in srgb, var(--chrnx-green) 82%, var(--chrnx-text));
}
@media (max-width: 599px) {
.chrnx-subscribe-form__form {
grid-template-columns: minmax(0, 1fr);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@@ -0,0 +1,5 @@
{
"source": "about-grunge.png",
"formats": [ "avif", "webp" ],
"widths": [ 384, 768, 1536 ]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@@ -0,0 +1,5 @@
{
"source": "placeholder-post.png",
"formats": [ "avif", "webp" ],
"widths": [ 384, 768 ]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@@ -0,0 +1,5 @@
{
"source": "placeholder-release.png",
"formats": [ "avif", "webp" ],
"widths": [ 384, 768 ]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

@@ -0,0 +1,5 @@
{
"source": "projects-grunge.png",
"formats": [ "avif", "webp" ],
"widths": [ 384, 768, 1536 ]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

+6 -3
View File
@@ -37,7 +37,10 @@ function chrnx_get_topic_portrait_markup( string $topic_slug, string $alt = '',
$markup = '<picture class="chrnx-responsive-portrait"' . $decorative . '>';
$markup .= '<source type="image/avif" srcset="' . esc_url( $base_uri . '-384.avif' ) . ' 384w, ' . esc_url( $base_uri . '-768.avif' ) . ' 768w" sizes="' . esc_attr( $sizes ) . '">';
$markup .= '<source type="image/webp" srcset="' . esc_url( $base_uri . '-384.webp' ) . ' 384w, ' . esc_url( $base_uri . '-768.webp' ) . ' 768w" sizes="' . esc_attr( $sizes ) . '">';
$markup .= '<img' . ( '' !== $class ? ' class="' . esc_attr( $class ) . '"' : '' ) . ' src="' . esc_url( get_theme_file_uri( $source ) ) . '" width="' . esc_attr( $dimensions[0] ) . '" height="' . esc_attr( $dimensions[1] ) . '" loading="' . esc_attr( $loading ) . '"' . $priority . ' decoding="async" sizes="' . esc_attr( $sizes ) . '" alt="' . esc_attr( $alt ) . '">';
// The fallback is the 768 WebP, not the multi-megabyte master: every browser
// that renders <picture> has supported WebP since 2020, and shipping design
// masters as a runtime fallback cost megabytes per image.
$markup .= '<img' . ( '' !== $class ? ' class="' . esc_attr( $class ) . '"' : '' ) . ' src="' . esc_url( $base_uri . '-768.webp' ) . '" width="' . esc_attr( $dimensions[0] ) . '" height="' . esc_attr( $dimensions[1] ) . '" loading="' . esc_attr( $loading ) . '"' . $priority . ' decoding="async" sizes="' . esc_attr( $sizes ) . '" alt="' . esc_attr( $alt ) . '">';
$markup .= '</picture>';
return $markup;
@@ -51,7 +54,7 @@ function chrnx_get_topic_portrait_markup( string $topic_slug, string $alt = '',
* @return string Safe picture markup or an empty string.
*/
function chrnx_get_atmosphere_markup( string $asset_key, string $class_name = '' ): string {
if ( 'podcast-frequency' !== $asset_key ) {
if ( ! in_array( $asset_key, array( 'podcast-frequency', 'about-grunge', 'projects-grunge' ), true ) ) {
return '';
}
@@ -73,7 +76,7 @@ function chrnx_get_atmosphere_markup( string $asset_key, string $class_name = ''
$markup = '<picture class="chrnx-responsive-atmosphere" aria-hidden="true">';
$markup .= '<source type="image/avif" srcset="' . esc_url( $base_uri . '-384.avif' ) . ' 384w, ' . esc_url( $base_uri . '-768.avif' ) . ' 768w, ' . esc_url( $base_uri . '-1536.avif' ) . ' 1536w" sizes="' . esc_attr( $sizes ) . '">';
$markup .= '<source type="image/webp" srcset="' . esc_url( $base_uri . '-384.webp' ) . ' 384w, ' . esc_url( $base_uri . '-768.webp' ) . ' 768w, ' . esc_url( $base_uri . '-1536.webp' ) . ' 1536w" sizes="' . esc_attr( $sizes ) . '">';
$markup .= '<img' . ( '' !== $class ? ' class="' . esc_attr( $class ) . '"' : '' ) . ' src="' . esc_url( get_theme_file_uri( $source ) ) . '" width="' . esc_attr( $dimensions[0] ) . '" height="' . esc_attr( $dimensions[1] ) . '" loading="' . esc_attr( $loading ) . '" decoding="async" sizes="' . esc_attr( $sizes ) . '" alt="' . esc_attr( $alt ) . '">';
$markup .= '<img' . ( '' !== $class ? ' class="' . esc_attr( $class ) . '"' : '' ) . ' src="' . esc_url( $base_uri . '-1536.webp' ) . '" width="' . esc_attr( $dimensions[0] ) . '" height="' . esc_attr( $dimensions[1] ) . '" loading="' . esc_attr( $loading ) . '" decoding="async" sizes="' . esc_attr( $sizes ) . '" alt="' . esc_attr( $alt ) . '">';
$markup .= '</picture>';
return $markup;
+18 -3
View File
@@ -137,6 +137,7 @@ chrnx_build_responsive_image() {
chrnx_image_basename=$1
chrnx_image_source_name=$2
chrnx_image_webp_quality=${3:-78}
chrnx_image_avif_quality=${4:-58}
chrnx_image_source="$chrnx_image_root/assets/images/$chrnx_image_source_name"
chrnx_image_source_extension=${chrnx_image_source_name##*.}
if [ ! -f "$chrnx_image_source" ]; then
@@ -148,7 +149,7 @@ chrnx_build_responsive_image() {
chrnx_image_resized="$chrnx_image_tmp/$chrnx_image_basename-$chrnx_image_width.$chrnx_image_source_extension"
sips --resampleWidth "$chrnx_image_width" "$chrnx_image_source" --out "$chrnx_image_resized" >/dev/null
cwebp -quiet -preset picture -q "$chrnx_image_webp_quality" -alpha_q 90 -m 6 -metadata none "$chrnx_image_resized" -o "$chrnx_image_build_output/$chrnx_image_basename-$chrnx_image_width.webp"
avifenc --ignore-exif --ignore-xmp --ignore-icc --qcolor 58 --qalpha 85 --speed 6 "$chrnx_image_resized" "$chrnx_image_build_output/$chrnx_image_basename-$chrnx_image_width.avif" >/dev/null
avifenc --ignore-exif --ignore-xmp --ignore-icc --qcolor "$chrnx_image_avif_quality" --qalpha 85 --speed 6 "$chrnx_image_resized" "$chrnx_image_build_output/$chrnx_image_basename-$chrnx_image_width.avif" >/dev/null
done
}
@@ -177,6 +178,12 @@ done
chrnx_build_responsive_image "alter-ego-gaming-half-body" "alter-ego-gaming-half-body.png"
printf '{\n\t"source": "alter-ego-gaming-half-body.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768 ]\n}\n' > "$chrnx_image_build_output/alter-ego-gaming-half-body.json"
for chrnx_image_placeholder in placeholder-post placeholder-release; do
# Placeholders sit at half opacity behind text; they do not need full quality.
chrnx_build_responsive_image "$chrnx_image_placeholder" "$chrnx_image_placeholder.png" 48 40
printf '{\n\t"source": "%s.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768 ]\n}\n' "$chrnx_image_placeholder" > "$chrnx_image_build_output/$chrnx_image_placeholder.json"
done
chrnx_build_responsive_image "the-no-names-musician-cutout" "the-no-names-musician-cutout.png"
printf '{\n\t"source": "the-no-names-musician-cutout.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768 ]\n}\n' > "$chrnx_image_build_output/the-no-names-musician-cutout.json"
@@ -185,6 +192,10 @@ printf '{\n\t"source": "the-no-names-collage.jpeg",\n\t"formats": [ "avif", "web
chrnx_build_responsive_background "podcast-frequency-grunge" "podcast-frequency-grunge.png"
printf '{\n\t"source": "podcast-frequency-grunge.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768, 1536 ]\n}\n' > "$chrnx_image_build_output/podcast-frequency-grunge.json"
for chrnx_image_background in about-grunge projects-grunge; do
chrnx_build_responsive_background "$chrnx_image_background" "$chrnx_image_background.png"
printf '{\n\t"source": "%s.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768, 1536 ]\n}\n' "$chrnx_image_background" > "$chrnx_image_build_output/$chrnx_image_background.json"
done
chrnx_validate_staged_family() {
chrnx_image_basename=$1
@@ -215,12 +226,16 @@ for chrnx_image_topic in code gaming life literature podcasts research; do
done
chrnx_validate_staged_family "alter-ego-gaming-half-body" 384 768
chrnx_validate_staged_family "the-no-names-musician-cutout" 384 768
chrnx_validate_staged_family "placeholder-post" 384 768
chrnx_validate_staged_family "placeholder-release" 384 768
chrnx_validate_staged_family "the-no-names-collage" 384 768
chrnx_validate_staged_family "podcast-frequency-grunge" 384 768 1536
chrnx_validate_staged_family "about-grunge" 384 768 1536
chrnx_validate_staged_family "projects-grunge" 384 768 1536
set -- "$chrnx_image_stage"/*
if [ "$#" -ne 52 ]; then
echo "Responsive image staging expected 52 files, got $#." >&2
if [ "$#" -ne 76 ]; then
echo "Responsive image staging expected 76 files, got $#." >&2
exit 1
fi
for chrnx_image_staged in "$@"; do