-
Notifications
You must be signed in to change notification settings - Fork 1
/
elemNavbar.php
37 lines (31 loc) · 1.77 KB
/
elemNavbar.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
<?php
if (!isset($settings['color1'])) $settings['color1']="w3-green";
if (!isset($settings['color2'])) $settings['color2']="w3-blue";
if (!isset($settings['color3'])) $settings['color2']="w3-hover-white";
if (!isset($navbar_links)) {
//These are the (demo) defaults. Override them in an included settings file and/or page template.
$navbar_links[0]=array("name"=>'Logo',"href"=>"#","class"=>"w3-theme-l1");
//Put your log image here below in place of "Logo" text above
//$navbar_links[0]=array("name"=>'<img src="images/logo_thumbnail.jpg">',"href"=>"#","class"=>"w3-theme-l1");
$navbar_links[1]=array("name"=>"Home","href"=>"./","class"=>"w3-hide-small " . $settings['color3']);
$navbar_links[2]=array("name"=>"About","href"=>"#","class"=>"w3-hide-small " . $settings['color3']);
$navbar_links[3]=array("name"=>"News","href"=>"#","class"=>"w3-hide-small " . $settings['color3']);
$navbar_links[4]=array("name"=>"Contact","href"=>"#","class"=>"w3-hide-small " . $settings['color3'] );
}
?>
<!-- Navbar -->
<div class="w3-top">
<div class="w3-bar <?php echo $settings['color1'] ?> w3-top w3-left-align w3-large">
<a class="w3-bar-item w3-button w3-right w3-hide-large w3-hover-white w3-large <?php echo $settings['color1'] ?>" href="javascript:void(0)" onclick="w3_open()"><i class="fa fa-bars"></i></a>
<?php
$arrlength=count($navbar_links);
for($x=0;$x<$arrlength;$x++) {
echo '<a href="' . $navbar_links[$x]['href'] . '" class="w3-bar-item w3-button ' . $navbar_links[$x]['class'] . '">' . $navbar_links[$x]['name'] . '</a>';
echo "";
}
//default behavior is to show the search form and login status.
if (!isset($hideSearchForm)) include('Hydrogen/elemSearchForm.php');
if (!isset($hideLoginStatus)) include('Hydrogen/elemLoginStatusbar.php');
?>
</div>
</div>