-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
82 lines (78 loc) · 4.11 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package sheen
*/
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="o-page">
<div class="o-page__container">
<a class="skip-link screen-reader-text" href="#primary">
<?php esc_html_e( 'Skip to content', 'sheen' ); ?>
</a>
<header id="masthead" class="c-header">
<div class="c-header__menu">
<div class="c-header__branding js-header__branding">
<?php sheen_branding(); ?>
</div><!-- .site-branding -->
<nav class="c-nav" id="site-navigation">
<button class="c-nav__toggle c-nav__toggle--burger js-nav__toggle" aria-controls="primary-menu" aria-expanded="false"
aria-label="<?php esc_attr_e('Primary menu', 'sheen'); ?>">
<span></span>
</button>
<div class="c-nav__list js-nav__list">
<?php
if( !is_404() ) {
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu(
array(
'walker' => new Sheen_walker_nav_menu(),
'theme_location' => 'primary',
'menu_id' => 'primary-menu primary',
'menu_class' => 's-nav__list nav-menu',
'container' => 'ul',
)
);
}
}
?>
<?php if( !is_404() ) : ?>
<div class="c-nav__search">
<button class="c-nav__search-button js-nav__search-button" aria-label="<?php esc_attr_e('Toggle Search open', 'sheen'); ?>"
aria-controls="primary-search" aria-expanded="false">
<span class="c-header__search-icon iconify" data-icon="akar-icons:search"></span>
</button>
</div>
<?php endif; ?>
</div>
<div class="c-header__search-overlay js-header__search-overlay" id="primary-search">
<div class="c-header__search-overlay__container">
<div class="c-header__search-close">
<button class="c-btn-seacrh c-btn-seacrh--close js-btn-seacrh-close" aria-label="<?php esc_attr_e('Toggle Search close', 'sheen'); ?>"
aria-controls="primary-search" aria-expanded="true">
<span class="c-header__search-close__icon iconify" data-icon="codicon:chrome-close">
</span>
</button>
</div>
<div class="c-header__search-wrapper">
<?php get_search_form(); ?>
</div>
</div>
</div>
</nav><!-- #site-navigation -->
</div><!-- .c-header__menu -->
</header><!-- #masthead -->