-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
113 lines (106 loc) · 4.83 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
<?php
use \Tofino\ThemeOptions\Menu as m;
use \Tofino\ThemeOptions\Notifications as n; ?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php if(is_front_page()) { ?>
<meta property="og:image" content="<?php echo get_field('logo', 'option')['url']; ?>"/>
<?php } ?>
<?php wp_head(); ?>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ=="
crossorigin=""/>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-lInM/apFSqyy1o6s89K4iQUKg6ppXEgsVxT35HbzUupEVRh2Eu9Wdl4tHj7dZO0s1uvplcYGmt3498TtHq+log=="
crossorigin=""></script>
<?php if(get_field('primary_colour', 'options')) : ?>
<?php get_template_part('templates/custom-css'); ?>
<?php endif; ?>
</head>
<body <?php body_class(); ?>>
<?php n\notification('top'); ?>
<!--[if lte IE 9]>
<div class="alert alert-danger browser-warning">
<p><?php _e('You are using an <strong>outdated</strong> browser. <a href="http://browsehappy.com/">Update your browser</a> to improve your experience.', 'tofino'); ?></p>
</div>
<![endif]-->
<nav class="navbar navbar-expand-md <?php echo m\menu_headroom(); ?> <?php echo m\menu_sticky(); ?> <?php echo m\menu_position(); ?>">
<div class="container justify-content-center align-items-start flex-nowrap position-relative">
<button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#main-menu" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="bar-wrapper">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</span>
<span class="sr-only"><?php _e('Toggle Navigation Button', 'tofino'); ?></span>
</button>
<div class="row">
<div class="col-12 col-lg-3 text-center">
<a class="navbar-brand mr-0 mr-lg-3" href="<?php echo home_url(); ?>" title="<?php echo esc_attr(bloginfo('name')); ?>">
<?php if (get_field('logo', 'option')) : ?>
<?php $img = get_field('logo', 'option'); ?>
<img src="<?php echo $img['url']; ?>" title="<?php echo esc_attr(bloginfo('name')); ?>">
<?php else : ?>
<?php echo bloginfo('name'); ?>
<?php endif; ?>
</a>
</div>
<div class="col-12 col-lg-9 d-flex flex-column justify-content-lg-around">
<div class="d-flex flex-column flex-md-row align-items-center justify-content-center justify-content-lg-end">
<?php if( have_rows('social_networks', 'options') ): ?>
<ul class="social-list mb-2">
<?php while ( have_rows('social_networks', 'options') ) : the_row(); ?>
<li>
<a class="<?php the_sub_field('social_network'); ?>" href="<?php the_sub_field('url'); ?>" target="<?php the_sub_field('target_blank'); ?>">
<?php echo svg(get_sub_field('social_network')); ?>
</a>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
<?php if(is_plugin_active( 'gtranslate/gtranslate.php' )) { ?>
<div class="mb-2">
<?php echo do_shortcode('[gtranslate]'); ?>
</div>
<?php } ?>
<?php if( have_rows('donate', 'options') ) : ?>
<?php while ( have_rows('donate', 'options') ) : the_row(); ?>
<?php if(get_sub_field('display') === 'yes') : ?>
<div class="mb-2">
<a class="btn btn-primary btn-donate" href="<?php the_sub_field('link'); ?>"><?php the_sub_field('text'); ?></a>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
<div class="row">
<div class="col-12">
<div class="collapse navbar-collapse" id="main-menu">
<?php
if (has_nav_menu('primary_navigation')) :
wp_nav_menu([
'menu' => 'nav_menu',
'theme_location' => 'primary_navigation',
'depth' => 2,
'container' => '',
'container_class' => '',
'container_id' => '',
'menu_class' => 'navbar-nav',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
'walker' => new Tofino\Nav\NavWalker()
]);
endif; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
<?php if (get_theme_mod('footer_sticky') === 'enabled') : ?>
<div class="wrapper">
<?php endif; ?>