forked from bootscore/bootscore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
123 lines (99 loc) · 5.06 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
<?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 Bootscore
*
* @version 5.2.0.0
*/
?>
<!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">
<!-- Favicons -->
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo get_stylesheet_directory_uri(); ?>/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo get_stylesheet_directory_uri(); ?>/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="<?php echo get_stylesheet_directory_uri(); ?>/img/favicon/favicon-16x16.png">
<link rel="manifest" href="<?php echo get_stylesheet_directory_uri(); ?>/img/favicon/site.webmanifest">
<link rel="mask-icon" href="<?php echo get_stylesheet_directory_uri(); ?>/img/favicon/safari-pinned-tab.svg" color="#0d6efd">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<header id="masthead" class="site-header">
<div class="fixed-top bg-light">
<nav id="nav-main" class="navbar navbar-expand-lg navbar-light">
<div class="container">
<!-- Navbar Brand -->
<a class="navbar-brand xs d-md-none" href="<?php echo esc_url(home_url()); ?>"><img src="<?php echo esc_url(get_stylesheet_directory_uri()); ?>/img/logo/logo-sm.svg" alt="logo" class="logo xs"></a>
<a class="navbar-brand md d-none d-md-block" href="<?php echo esc_url(home_url()); ?>"><img src="<?php echo esc_url(get_stylesheet_directory_uri()); ?>/img/logo/logo.svg" alt="logo" class="logo md"></a>
<!-- Offcanvas Navbar -->
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvas-navbar">
<div class="offcanvas-header bg-light">
<span class="h5 mb-0"><?php esc_html_e('Menu', 'bootscore'); ?></span>
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<!-- Bootstrap 5 Nav Walker Main Menu -->
<?php
wp_nav_menu(array(
'theme_location' => 'main-menu',
'container' => false,
'menu_class' => '',
'fallback_cb' => '__return_false',
'items_wrap' => '<ul id="bootscore-navbar" class="navbar-nav ms-auto %2$s">%3$s</ul>',
'depth' => 2,
'walker' => new bootstrap_5_wp_nav_menu_walker()
));
?>
<!-- Bootstrap 5 Nav Walker Main Menu End -->
</div>
</div>
<div class="header-actions d-flex align-items-center">
<!-- Top Nav Widget -->
<div class="top-nav-widget">
<?php if (is_active_sidebar('top-nav')) : ?>
<div>
<?php dynamic_sidebar('top-nav'); ?>
</div>
<?php endif; ?>
</div>
<!-- Searchform Large -->
<div class="d-none d-lg-block ms-1 ms-md-2 top-nav-search-lg">
<?php if (is_active_sidebar('top-nav-search')) : ?>
<div>
<?php dynamic_sidebar('top-nav-search'); ?>
</div>
<?php endif; ?>
</div>
<!-- Search Toggler Mobile -->
<button class="btn btn-outline-secondary d-lg-none ms-1 ms-md-2 top-nav-search-md" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-search" aria-expanded="false" aria-controls="collapse-search">
<i class="fa-solid fa-magnifying-glass"></i><span class="visually-hidden-focusable">Search</span>
</button>
<!-- Navbar Toggler -->
<button class="btn btn-outline-secondary d-lg-none ms-1 ms-md-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvas-navbar" aria-controls="offcanvas-navbar">
<i class="fa-solid fa-bars"></i><span class="visually-hidden-focusable">Menu</span>
</button>
</div><!-- .header-actions -->
</div><!-- .container -->
</nav><!-- .navbar -->
<!-- Top Nav Search Mobile Collapse -->
<div class="collapse container d-lg-none" id="collapse-search">
<?php if (is_active_sidebar('top-nav-search')) : ?>
<div class="mb-2">
<?php dynamic_sidebar('top-nav-search'); ?>
</div>
<?php endif; ?>
</div>
</div><!-- .fixed-top .bg-light -->
</header><!-- #masthead -->