Browse Source

Some header cleanup.

pull/43/head
Ned Zimmerman 7 years ago
parent
commit
6d6021debb
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 2
      dist/mix-manifest.json
  2. 2
      dist/styles/aldine.css
  3. 40
      header.php
  4. 4
      inc/filters/namespace.php

2
dist/mix-manifest.json vendored

@ -1,5 +1,5 @@
{
"/scripts/aldine.js": "/scripts/aldine.js?id=f0380c51980a33b2d33c",
"/styles/aldine.css": "/styles/aldine.css?id=a225aa1ffc24c78e9e14",
"/styles/aldine.css": "/styles/aldine.css?id=0aa681c6e630114c9934",
"/scripts/customizer.js": "/scripts/customizer.js?id=f1f1f4225cba4c1b35f2"
}

2
dist/styles/aldine.css vendored

File diff suppressed because one or more lines are too long

40
header.php

@ -36,21 +36,14 @@
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'pressbooks-aldine' ); ?></a>
<header id="masthead" class="header header--root" role="banner">
<header id="masthead" class="header header--root" role="banner" style="background-image: url(<?php
if ( is_front_page() ) {
echo( get_header_image() );
} else {
echo get_template_directory_uri() . '/dist/images/catalog-header.jpg';
} ?>);">
<div class="header__inner">
<div class="header__start-container">
<?php if ( ! is_front_page() ) {?>
<a class="header__home" href="<?php echo home_url( '/' ); ?>">Home</a>
<?php } ?>
<div class="header__search js-search">
<a class="icon icon-search js-toggle-search"></a>
<div class="header__search__form">
<?php get_search_form(); ?>
</div>
</div>
</div>
<div class="header__brand">
<h1>
<a class="header__logo" href="<?php echo network_home_url(); ?>">
<?php if ( has_custom_logo() ) { ?>
<?php $custom_logo_id = get_theme_mod( 'custom_logo' );
@ -63,20 +56,23 @@
<?php } else { ?>
<svg class="logo--svg">
<use xlink:href="#logo-pressbooks" />
</svg><?php }
echo get_bloginfo( 'name', 'display' ); ?>
</svg>
<?php } ?>
</a>
</h1>
<p><?php echo get_bloginfo( 'description', 'display' ); ?></p>
</div>
<div class="header__end-container">
<nav class="header__nav js-header-nav" id="navigation">
<?php wp_nav_menu( [ 'theme_location' => 'primary-menu' ] ); ?>
</nav>
<div class="header__nav">
<?php wp_nav_menu( [
'theme_location' => 'primary-menu',
'container' => 'nav',
'container_class' => 'js-header-nav',
'container_id' => 'navigation',
'menu_class' => 'menu--primary',
] ); ?>
<a class="header__menu-icon js-header-menu-toggle" href="#navigation"><?php _e( 'Toggle Menu', 'pressbooks-book' ); ?><span class="header__menu-icon__icon"></span></a>
</div>
</div>
<h1><?php echo get_bloginfo( 'name', 'display' ); ?></h1>
<p class="description"><?php echo get_bloginfo( 'description', 'display' ); ?></p>
</header><!-- #masthead -->
<div id="content" class="site-content">

4
inc/filters/namespace.php

@ -91,6 +91,10 @@ function adjust_menu( $items, $args ) {
__( 'Sign out', 'pressbooks-aldine' )
);
}
/* @codingStandardsIgnoreStart $items .= sprintf(
'<li class="header__search js-search"><a class="icon icon-search js-toggle-search"></a><div class="header__search__form">%s</div></li>',
get_search_form( false )
); @codingStandardsIgnoreEnd */
}
return $items;

Loading…
Cancel
Save