Refine hero and header branding display
This commit is contained in:
+3
-1
@@ -4,12 +4,14 @@ $video_id = absint( get_theme_mod( 'c1024_2026_hero_video' ) );
|
||||
$video_url = $video_id ? wp_get_attachment_url( $video_id ) : '';
|
||||
$hero_title = get_theme_mod( 'c1024_2026_hero_title', get_bloginfo( 'name' ) );
|
||||
$hero_text = get_theme_mod( 'c1024_2026_hero_text' );
|
||||
// The site subtitle complements the Customizer-controlled hero headline.
|
||||
$site_description = get_bloginfo( 'description', 'display' );
|
||||
?>
|
||||
<?php // Keep the hero available for text-only configurations when no video is selected.
|
||||
if ( $video_url || $hero_title || $hero_text ) { ?>
|
||||
<section class="hero" aria-label="<?php esc_attr_e( 'Introduction', 'c1024-2026' ); ?>">
|
||||
<?php if ( $video_url ) { ?><video class="hero-video" autoplay muted loop playsinline><source src="<?php echo esc_url( $video_url ); ?>" type="<?php echo esc_attr( get_post_mime_type( $video_id ) ); ?>"></video><?php } ?>
|
||||
<div class="hero-content"><div class="hero-eyebrow"><?php bloginfo( 'name' ); ?></div><?php if ( $hero_title ) { ?><h1 class="hero-title"><?php echo esc_html( $hero_title ); ?></h1><?php } ?><?php if ( $hero_text ) { ?><p class="hero-text"><?php echo esc_html( $hero_text ); ?></p><?php } ?></div>
|
||||
<div class="hero-content"><?php if ( $site_description ) { ?><div class="hero-eyebrow"><?php echo esc_html( $site_description ); ?></div><?php } ?><?php if ( $hero_title ) { ?><h1 class="hero-title"><?php echo esc_html( $hero_title ); ?></h1><?php } ?><?php if ( $hero_text ) { ?><p class="hero-text"><?php echo esc_html( $hero_text ); ?></p><?php } ?></div>
|
||||
</section>
|
||||
<?php } ?>
|
||||
<main id="main" class="site-main">
|
||||
|
||||
+5
-2
@@ -14,10 +14,13 @@ wp_body_open(); ?>
|
||||
<header class="site-header" id="masthead">
|
||||
<div class="header-inner">
|
||||
<div class="site-branding">
|
||||
<?php if ( has_custom_logo() ) { the_custom_logo(); } else { ?>
|
||||
<?php if ( has_custom_logo() ) { ?>
|
||||
<?php the_custom_logo(); ?>
|
||||
<?php // Keep the compact header focused on the site name; the tagline is shown in the hero. ?>
|
||||
<p class="site-description"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></p>
|
||||
<?php } else { ?>
|
||||
<a class="site-title" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
|
||||
<?php } ?>
|
||||
<?php $description = get_bloginfo( 'description', 'display' ); if ( $description ) { ?><p class="site-description"><?php echo esc_html( $description ); ?></p><?php } ?>
|
||||
</div>
|
||||
<button class="icon-button menu-toggle" type="button" data-menu-toggle aria-expanded="false" aria-controls="primary-menu"><span class="screen-reader-text"><?php esc_html_e( 'Toggle menu', 'c1024-2026' ); ?></span><svg class="icon" aria-hidden="true"><use href="#icon-menu"></use></svg></button>
|
||||
<nav class="primary-navigation" aria-label="<?php esc_attr_e( 'Primary menu', 'c1024-2026' ); ?>">
|
||||
|
||||
@@ -485,7 +485,7 @@ h4 {
|
||||
}
|
||||
.hero-eyebrow {
|
||||
font-family: "Berkeley Mono", monospace;
|
||||
font-size: 0.72rem;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: #f09b72;
|
||||
@@ -494,6 +494,7 @@ h4 {
|
||||
max-width: 850px;
|
||||
margin: 0.45rem 0;
|
||||
font-family: "Alpha Lyrae", sans-serif;
|
||||
font-feature-settings: "ss02" 1, "liga" 1;
|
||||
font-size: clamp(2.8rem, 7vw, 6rem);
|
||||
font-weight: 500;
|
||||
line-height: 0.98;
|
||||
|
||||
Reference in New Issue
Block a user