fix(theme): blog posts no longer fade out; readable post layout
- Scroll reveal used threshold 0.15: a section taller than ~6.7 screens (a long article) never reached it, so after the reveal class hid it, it stayed hidden. Reveal as soon as any part enters (threshold 0). - Post header: full-width title with meta below and a normal gap - Article: heading sizes per level, photos keep their shape (no crop), icon-sized inline SVGs, full-width embeds - Strip the imported 'Home' breadcrumb line from posts and card excerpts - Theme 1.0.15 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,12 +35,10 @@ body.hoho-fullwidth{overflow-x:hidden;}
|
||||
/* Post body from the editor, styled like the design's .tour__block text. */
|
||||
.hoho-page.hoho-page .hoho-prose{display:flex;flex-direction:column;gap:var(--sp-3);}
|
||||
.hoho-page.hoho-page .hoho-prose>*{margin:0;}
|
||||
.hoho-page.hoho-page .hoho-prose :is(h2,h3,h4){margin:var(--sp-3) 0 0;font-size:1rem;font-weight:700;}
|
||||
.hoho-page.hoho-page .hoho-prose :is(p,li){font-size:1rem;font-weight:500;line-height:1.6;opacity:.7;}
|
||||
.hoho-page.hoho-page .hoho-prose a{color:var(--c-teal);text-decoration:underline;}
|
||||
.hoho-page.hoho-page .hoho-prose ul{list-style:disc!important;padding-inline-start:1.5em;}
|
||||
.hoho-page.hoho-page .hoho-prose ol{list-style:decimal!important;padding-inline-start:1.5em;}
|
||||
.hoho-page.hoho-page .hoho-prose img{width:100%;height:auto;max-height:22.1875rem;border-radius:var(--r-card);object-fit:cover;}
|
||||
.hoho-page.hoho-page .hoho-prose figure{margin:0;}
|
||||
.hoho-page.hoho-page .hoho-prose blockquote{margin:0;padding:var(--sp-3) var(--sp-4);border-radius:var(--r-card);background:var(--c-teal-05);}
|
||||
|
||||
@@ -63,3 +61,24 @@ body.hoho-fullwidth{overflow-x:hidden;}
|
||||
|
||||
/* A page's own Featured Image banner is shown as-is: no brand-teal tint. */
|
||||
.hoho-page.hoho-page .hero--has-thumb .hero__media::after{display:none;}
|
||||
|
||||
/* Blog post header: real titles are long — use the full width (the design's
|
||||
28rem cap wrapped them to four lines) with the meta underneath, and a
|
||||
normal gap before the article instead of the design's ~100px. */
|
||||
.hoho-page.hoho-page .post__head{flex-direction:column;align-items:flex-start;gap:var(--sp-2);margin-block-end:0;}
|
||||
.hoho-page.hoho-page .post__title{max-width:none;}
|
||||
.hoho-page.hoho-page .post__head + .post__body{margin-block-start:calc(var(--sp-5) - clamp(3rem, 2rem + 3vw, 6.25rem));}
|
||||
|
||||
/* Article headings by level (imported posts use h2–h6). */
|
||||
.hoho-page.hoho-page .hoho-prose h2{margin:var(--sp-4) 0 0;font-size:clamp(1.25rem,1.1rem + .6vw,1.625rem);font-weight:700;line-height:1.25;}
|
||||
.hoho-page.hoho-page .hoho-prose h3{margin:var(--sp-3) 0 0;font-size:1.25rem;font-weight:700;line-height:1.3;}
|
||||
.hoho-page.hoho-page .hoho-prose :is(h4,h5,h6){margin:var(--sp-3) 0 0;font-size:1.0625rem;font-weight:700;line-height:1.35;}
|
||||
|
||||
/* Photos keep their own shape (portrait ones were cropped to a strip). */
|
||||
.hoho-page.hoho-page .hoho-prose img{display:block;width:auto;max-width:100%;height:auto;max-height:36rem;margin-block:var(--sp-2);border-radius:var(--r-card);object-fit:contain;}
|
||||
|
||||
/* Unsized inline icons from imported content stay icon-sized. */
|
||||
.hoho-page.hoho-page .hoho-prose svg{width:1em;height:1em;vertical-align:-.125em;}
|
||||
|
||||
/* Embedded maps/videos: full width, sensible height. */
|
||||
.hoho-page.hoho-page .hoho-prose iframe{display:block;width:100%;height:auto;aspect-ratio:16/9;border:0;border-radius:var(--r-card);}
|
||||
|
||||
@@ -168,7 +168,9 @@
|
||||
});
|
||||
obs.unobserve(entry.target);
|
||||
});
|
||||
}, { threshold: 0.15, rootMargin: '0px 0px -8% 0px' });
|
||||
// threshold 0, not a ratio: a section taller than the screen (a long
|
||||
// article) can never be 15% visible and would stay hidden forever.
|
||||
}, { threshold: 0, rootMargin: '0px 0px -8% 0px' });
|
||||
|
||||
sections.forEach(function (section) { revealObserver.observe(section); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user