-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
executable file
·73 lines (61 loc) · 2.39 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
<?php
/** @var \SpokaneFoodPolicy\Controller $sfp_controller */
global $sfp_controller;
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=edge" /><![endif]-->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php wp_head(); ?>
<link rel="icon" type="image/x-icon" href="<?php bloginfo('template_directory'); ?>/img/favicon.ico" />
</head>
<body <?php body_class(); ?>>
<div class="sfp-container">
<div class="row sfp-header">
<div class="col-sm-4 text-center sfp-logo">
<a href="/"><img src="<?php bloginfo('template_directory'); ?>/img/sfpc-logo.png"></a>
</div>
<div class="col-sm-8">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar-1" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<?php foreach ( $sfp_controller->get_menu_items( \SpokaneFoodPolicy\Controller::MENU_MAIN ) AS $menu_item ) { ?>
<li<?php if ( $menu_item->hasChildren() ) { ?> class="dropdown" <?php } ?>>
<a href="<?php echo $menu_item->getUrl(); ?>"<?php if ( $menu_item->hasChildren() ) { ?> class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"<?php } ?>>
<?php echo $menu_item->getTitle(); ?>
<?php if ( $menu_item->hasChildren() ) { ?>
<span class="caret"></span>
<?php } ?>
</a>
<div class="tomato-top"></div>
<?php if ( $menu_item->hasChildren() ) { ?>
<ul class="dropdown-menu">
<?php foreach ( $menu_item->getChildren() as $child ) { ?>
<li>
<a href="<?php echo $child->getUrl(); ?>">
<?php echo $child->getTitle(); ?>
</a>
</li>
<?php } ?>
</ul>
<?php } ?>
</li>
<?php } ?>
</ul>
</div>
</div>
</nav>
</div>
</div>
<div class="container">