diff --git a/astra-child-hoponhopoff.zip b/astra-child-hoponhopoff.zip index e27224b..7627a86 100644 Binary files a/astra-child-hoponhopoff.zip and b/astra-child-hoponhopoff.zip differ diff --git a/astra-child-hoponhopoff/assets/pages-wp.css b/astra-child-hoponhopoff/assets/pages-wp.css index 0af635e..3725d29 100644 --- a/astra-child-hoponhopoff/assets/pages-wp.css +++ b/astra-child-hoponhopoff/assets/pages-wp.css @@ -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);} diff --git a/astra-child-hoponhopoff/assets/pages.js b/astra-child-hoponhopoff/assets/pages.js index 87ebcb8..13be2ff 100644 --- a/astra-child-hoponhopoff/assets/pages.js +++ b/astra-child-hoponhopoff/assets/pages.js @@ -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); }); } diff --git a/astra-child-hoponhopoff/functions.php b/astra-child-hoponhopoff/functions.php index 38d1175..28f0be0 100644 --- a/astra-child-hoponhopoff/functions.php +++ b/astra-child-hoponhopoff/functions.php @@ -23,10 +23,10 @@ add_action( 'wp_enqueue_scripts', function () { if ( wp_style_is( 'astra-theme-css', 'registered' ) ) { $deps[] = 'astra-theme-css'; } - wp_enqueue_style( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.css', $deps, '1.0.14' ); + wp_enqueue_style( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.css', $deps, '1.0.15' ); // Header interactions: burger, submenu, sticky, back-to-top, search toggle. - wp_enqueue_script( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.js', array(), '1.0.14', true ); + wp_enqueue_script( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.js', array(), '1.0.15', true ); wp_add_inline_style( 'hoho-chrome', diff --git a/astra-child-hoponhopoff/inc/pages.php b/astra-child-hoponhopoff/inc/pages.php index 5d5da30..6224915 100644 --- a/astra-child-hoponhopoff/inc/pages.php +++ b/astra-child-hoponhopoff/inc/pages.php @@ -194,6 +194,21 @@ function hoho_blog_query( array $state ) { ); } +/** + * Imported posts start with a stray "Home" breadcrumb line (left over from the + * old page builder). Drop it from the article and from card excerpts. + */ +function hoho_strip_leading_home( $text ) { + return preg_replace( '#^\s*(?:
\s*Home\s*
|Home\b\s*)#i', '', (string) $text ); +} +add_filter( + 'the_content', + function ( $content ) { + return ( is_singular( 'post' ) && in_the_loop() ) ? hoho_strip_leading_home( $content ) : $content; + }, + 20 +); + /** * Card date chip, as in the design: relative for the last week, then a date. */ @@ -240,7 +255,7 @@ function hoho_article_card( $post, $wrap = 'li' ) { - +