diff --git a/astra-child-hoponhopoff.zip b/astra-child-hoponhopoff.zip index 7627a86..cd0a1c4 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 3725d29..ac8a1f8 100644 --- a/astra-child-hoponhopoff/assets/pages-wp.css +++ b/astra-child-hoponhopoff/assets/pages-wp.css @@ -62,13 +62,6 @@ 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;} @@ -82,3 +75,22 @@ body.hoho-fullwidth{overflow-x:hidden;} /* 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);} + +/* Breadcrumb — same rules as the plugin pages (VC_Display::astra_overrides): + first thing above the page title, in the title's colour; links softer, + current page bold and shortened if long. */ +.hoho-page.hoho-page .crumbs{color:inherit;} +.hoho-page.hoho-page .crumbs__list{color:inherit;font-size:.8125rem;font-weight:500;} +.hoho-page.hoho-page .crumbs__list a{opacity:.75;} +.hoho-page.hoho-page .crumbs__list a:hover{opacity:1;} +.hoho-page.hoho-page .crumbs__list [aria-current]{max-width:min(40ch,60vw);overflow:hidden;font-weight:700;text-overflow:ellipsis;white-space:nowrap;} +/* the design paints .hero--page breadcrumbs black; follow the title instead */ +.hoho-page.hoho-page .hero .crumbs,.hoho-page.hoho-page .hero .crumbs__list{color:var(--c-white);} +.hoho-page.hoho-page .hero--about .crumbs,.hoho-page.hoho-page .hero--about .crumbs__list{color:var(--c-black);} +.hoho-page.hoho-page .hero__content>.crumbs{margin-block-end:calc(var(--sp-1) * -1);} + +/* Blog post: title, breadcrumb and meta sit in the banner like every page. */ +.hoho-page.hoho-page .hero--post .hero__title{max-width:none;font-size:clamp(1.75rem,1.2rem + 2vw,3rem);line-height:1.15;} +.hoho-page.hoho-page .hero--post .tmeta{order:3;color:var(--c-white);} +.hoho-page.hoho-page .hero--post .tmeta__rule{background:rgba(255,255,255,.4);} +.hoho-page.hoho-page .hero--post .hero__content{gap:var(--sp-3);} diff --git a/astra-child-hoponhopoff/functions.php b/astra-child-hoponhopoff/functions.php index 28f0be0..e303ee9 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.15' ); + wp_enqueue_style( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.css', $deps, '1.0.16' ); // 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.15', true ); + wp_enqueue_script( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.js', array(), '1.0.16', true ); wp_add_inline_style( 'hoho-chrome', diff --git a/astra-child-hoponhopoff/inc/pages.php b/astra-child-hoponhopoff/inc/pages.php index 6224915..ae9e349 100644 --- a/astra-child-hoponhopoff/inc/pages.php +++ b/astra-child-hoponhopoff/inc/pages.php @@ -64,6 +64,35 @@ function hoho_banner_url( $fallback ) { return $url ? $url : hoho_asset( 'img/' . $fallback . '.webp' ); } +/** + * Breadcrumb in the same markup as the plugin's vc_breadcrumb_html(), so + * every page shares one style. $trail: list of [label, url]; Home is added. + */ +function hoho_breadcrumb_html( array $trail, $current ) { + $trail = array_merge( array( array( __( 'Home', 'hoponhopoff' ), home_url( '/' ) ) ), $trail ); + $out = ''; +} + +/** + * URL of the blog list (the Posts page, else a page slugged blogs/blog). + */ +function hoho_blog_url() { + if ( get_option( 'page_for_posts' ) ) { + return get_permalink( get_option( 'page_for_posts' ) ); + } + foreach ( hoho_page_slugs()['blog'] as $slug ) { + $page = get_page_by_path( $slug ); + if ( $page ) { + return get_permalink( $page ); + } + } + return home_url( '/blogs/' ); +} + /** * Social profile links (footer + contact page). Override with the * `hoho_socials` filter. diff --git a/astra-child-hoponhopoff/style.css b/astra-child-hoponhopoff/style.css index c422100..ad82be7 100644 --- a/astra-child-hoponhopoff/style.css +++ b/astra-child-hoponhopoff/style.css @@ -5,7 +5,7 @@ Description: Astra child theme that replaces the Astra header and footer with th Author: Amir Bagheri Author URI: https://ravisite.com Template: astra -Version: 1.0.15 +Version: 1.0.16 Text Domain: hoponhopoff */ diff --git a/astra-child-hoponhopoff/templates/blog.php b/astra-child-hoponhopoff/templates/blog.php index 715a7c6..f38b9f6 100644 --- a/astra-child-hoponhopoff/templates/blog.php +++ b/astra-child-hoponhopoff/templates/blog.php @@ -45,7 +45,7 @@ for ( $n = 1; $n <= $hoho_max; $n++ ) {
-

+