Commit 1f75e377 by PLN (Algolia)

articles: ?skim=1 — the skimmer's-eye view as a URL, headings/media only

Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
parent 7f79de58
...@@ -131,6 +131,15 @@ export default function ArticleEnhance({ lang, languages }) { ...@@ -131,6 +131,15 @@ export default function ArticleEnhance({ lang, languages }) {
cleanups.push(() => play.removeEventListener('click', render)); cleanups.push(() => play.removeEventListener('click', render));
}); });
// --- skim mode (?skim=1) -------------------------------------------
// Refactoring English's skimmer test as a URL: headings, figures, code
// and tables stay; prose paragraphs fold away. Dev/review tool — the
// page ships unchanged without the param.
if (new URLSearchParams(window.location.search).get('skim') === '1') {
const prose = article.querySelector('.prose');
if (prose) prose.classList.add('prose-skim');
}
return () => cleanups.forEach((fn) => fn()); return () => cleanups.forEach((fn) => fn());
}, [lang, languages]); }, [lang, languages]);
......
...@@ -428,8 +428,25 @@ ...@@ -428,8 +428,25 @@
.article .prose :global(.embed-facade-soundcloud) { .article .prose :global(.embed-facade-soundcloud) {
display: flex; display: flex;
align-items: center; align-items: center;
min-height: 110px; gap: 1rem;
padding: 1rem 4.5rem 1rem 1.25rem; min-height: 96px;
padding: 0.9rem 1.1rem;
}
/* Static waveform-ish bars — decorative, drawn at build time, nothing remote. */
.article .prose :global(.embed-facade-soundcloud)::before {
content: "";
flex: 1;
height: 34px;
margin-left: 0.25rem;
background-image: repeating-linear-gradient(
to right,
var(--border) 0 2px,
transparent 2px 6px
);
-webkit-mask-image: linear-gradient(to bottom, transparent 12%, black 45%, black 70%, transparent 92%);
mask-image: linear-gradient(to bottom, transparent 12%, black 45%, black 70%, transparent 92%);
opacity: 0.9;
} }
.article .prose :global(.embed-play) { .article .prose :global(.embed-play) {
...@@ -450,11 +467,13 @@ ...@@ -450,11 +467,13 @@
} }
.article .prose :global(.embed-facade-soundcloud .embed-play) { .article .prose :global(.embed-facade-soundcloud .embed-play) {
left: auto; position: static;
right: 1rem; transform: none;
transform: translateY(-50%); flex: none;
order: -1;
width: 2.8rem; width: 2.8rem;
height: 2.8rem; height: 2.8rem;
font-size: 0.95rem;
} }
.article .prose :global(.embed-play:hover) { .article .prose :global(.embed-play:hover) {
...@@ -463,7 +482,7 @@ ...@@ -463,7 +482,7 @@
} }
.article .prose :global(.embed-facade-soundcloud .embed-play:hover) { .article .prose :global(.embed-facade-soundcloud .embed-play:hover) {
transform: translateY(-50%) scale(1.06); transform: scale(1.06);
} }
.article .prose :global(.embed-fallback) { .article .prose :global(.embed-fallback) {
...@@ -580,6 +599,12 @@ ...@@ -580,6 +599,12 @@
font-variant-ligatures: none; font-variant-ligatures: none;
} }
/* ?skim=1 (ArticleEnhance) — the skimmer's-eye view: structure and media
stay, prose paragraphs fold. What's left should still tell the story. */
.article .prose.prose-skim p {
display: none;
}
/* Code blocks break out of the 68ch prose measure on wide screens: code /* Code blocks break out of the 68ch prose measure on wide screens: code
wants ~120 mono columns, prose wants its measure. The breakout centers on wants ~120 mono columns, prose wants its measure. The breakout centers on
the core (which is viewport-centered), capped so it never slides under the the core (which is viewport-centered), capped so it never slides under the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment