-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathheader.php
152 lines (119 loc) · 5.14 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
/**
* The header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package understrap
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="copyright" content="EHRI Consortium <?php echo date("Y"); ?>">
<meta name="description" content="The European Holocaust Research Infrastructure Document Blog">
<meta name="keywords" content="EHRI,Blog,Holocaust,Research,Shoah,Archives,History,Deportations,Camps,Ghettos">
<!-- FIXME: load this via the theme code? -->
<script async src="https://static.addtoany.com/menu/page.js"></script>
<?php wp_head(); ?>
<?php if ($plausible_domain = get_theme_mod('ehri_plausible_domain')): ?>
<script defer data-domain="<?php echo $plausible_domain; ?>" src="https://plausible.io/js/script.js"></script>
<?php endif; ?>
</head>
<body <?php body_class(); ?>>
<div class="site" id="page">
<!-- ******************* The Navbar Area ******************* -->
<div id="wrapper-navbar" itemscope itemtype="http://schema.org/WebSite">
<div id="wrapper-navbar-overlay">
<a class="skip-link sr-only sr-only-focusable"
href="#content"><?php esc_html_e( 'Skip to content', 'understrap' ); ?></a>
<nav id="primary-nav">
<div id="primary-nav-container">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<img id="header-logo" class="img-fluid"
src="<?php echo get_theme_file_uri( "img/[email protected]" ); ?>"
alt="EHRI Logo"/></a>
<h1 id="site-title">
<a rel="home"
href="<?php echo esc_url( home_url( '/' ) ); ?>"
title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"
itemprop="url"><?php bloginfo( 'name' ); ?>
</a>
</h1>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbar-nav-dropdown"
aria-controls="navbarNavDropdown" aria-expanded="false"
aria-label="<?php esc_attr_e( 'Toggle navigation', 'understrap' ); ?>">
<span class="navbar-toggler-icon"></span>
</button>
<!-- The WordPress Menu goes here -->
<div class="collapse navbar-collapse" id="navbar-nav-dropdown">
<ul id="navbar-nav-pages">
<?php $active_articles = is_archive() || is_single(); ?>
<li class="dropdown <?php if ( $active_articles ) echo "active"; ?>">
<a class="dropdown-toggle" id="navbar-cat-dropdown" data-toggle="dropdown"
href="#">Articles</a>
<div class="dropdown-menu" id="categories-dropdown"
aria-labelledby="navbar-cat-dropdown">
<div class="dropdown-menu-tab"></div>
<?php the_widget( 'WP_Widget_Categories' ); ?>
<a class="all-articles-menu"
href="<?php echo esc_url( home_url( '/all-articles/' ) ); ?>">
<?php _e( "List all articles" ); ?>
</a>
</div>
</li>
<?php foreach ( wp_get_nav_menu_items( 'main' ) as $item ): ?>
<li class="<?php if ( $item->object_id == get_the_ID() ) echo "active"; ?>">
<a href="<?php echo $item->url; ?>"><?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
<form action="/" class="form-inline" id="navbar-nav-search">
<div class="input-group" id="search-controls">
<label class="sr-only" for="search-input">Search</label>
<input class="form-control" type="search" name="s" placeholder="Search"
id="search-input" value="<?php echo get_query_var( 's' ); ?>"/>
<span class="input-group-append">
<button class="btn btn-outline-secondary" aria-label="Submit Search" type="submit">
<i class="material-icons" aria-hidden="true">search</i>
</button>
</span>
</div>
</form>
<!-- --><?php //wp_nav_menu(
// array(
// 'theme_location' => 'primary',
// 'container_class' => 'collapse navbar-collapse',
// 'container_id' => 'navbarNavDropdown',
// 'menu_class' => 'navbar-nav ml-auto',
// 'fallback_cb' => '',
// 'menu_id' => 'main-menu',
// 'depth' => 2,
// 'walker' => new Understrap_WP_Bootstrap_Navwalker(),
// )
// ); ?>
</div><!-- .container -->
</nav><!-- .site-navigation -->
<?php if ( is_front_page() ) : ?>
<?php get_template_part( 'global-templates/hero' ); ?>
<?php endif; ?>
</div>
</div><!-- #wrapper-navbar end -->
<!-- Floating follow buttons -->
<aside id="follow-buttons">
<header><?php _e( "Follow" ); ?></header>
<a class="follow-button" href="https://facebook.com/EHRIproject" title="Follow EHRI on Facebook">
<i class="fa fa-facebook" aria-hidden="true"></i>
<span class="sr-only">Facebook</span>
</a>
<a class="follow-button" href="https://twitter.com/EHRIproject" title="Follow EHRI on Twitter">
<i class="fa fa-twitter" aria-hidden="true"></i>
<span class="sr-only">Twitter</span>
</a>
</aside>