-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhead.php
130 lines (120 loc) · 4.02 KB
/
head.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
<?php
// prevent script from getting called directly
if (!defined("URLAUBE")) { die(""); }
?>
<!DOCTYPE html>
<html lang="<?= html(value(Themes::class, LANGUAGE)) ?>">
<head>
<meta charset="<?= html(value(Themes::class, CHARSET)) ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
if (null !== value(Themes::class, AUTHOR)) {
?>
<meta name="author" content="<?= html(value(Themes::class, AUTHOR)) ?>">
<?php
}
?>
<meta name="description" content="<?= html(value(Themes::class, DESCRIPTION)) ?>">
<meta name="keywords" content="<?= html(value(Themes::class, KEYWORDS)) ?>">
<?php
$feeduri = feeduri();
if (null !== $feeduri) {
?>
<link rel="alternate" type="application/rss+xml" href="<?= html($feeduri) ?>" />
<?php
}
if (null !== value(Themes::class, CANONICAL)) {
?>
<link rel="canonical" href="<?= html(value(Themes::class, CANONICAL)) ?>">
<?php
}
if (null !== value(Themes::class, FAVICON)) {
?>
<link rel="icon" type="<?= html(mime_content_type(uri2path(value(Themes::class, FAVICON)))) ?>" href="<?= html(value(Themes::class, FAVICON)) ?>">
<?php
}
$next = nextpage();
if (null !== $next) {
?>
<link rel="next" href="<?= html($next) ?>">
<?php
}
$prev = prevpage();
if (null !== $prev) {
?>
<link rel="prev" href="<?= html($prev) ?>">
<?php
}
?>
<title><?= html(value(Themes::class, TITLE)) ?></title>
<!-- Bootstrap Core CSS -->
<link href="<?= html(path2uri(__DIR__."/css/bootstrap.min.css")) ?>" rel="stylesheet">
<!-- Custom CSS -->
<link href="<?= html(static::getUri(new Content())) ?>" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="<?= html(path2uri(__DIR__."/js/html5shiv.min.js")) ?>"></script>
<script src="<?= html(path2uri(__DIR__."/js/respond.min.js")) ?>"></script>
<![endif]-->
</head>
<body id="page-top" data-target=".navbar-fixed-top">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?= html(value(Main::class, ROOTURI)) ?>">
<?php
if (null !== value(Themes::class, LOGO)) {
?>
<img src="<?= html(value(Themes::class, LOGO)) ?>" alt="<?= html(value(Themes::class, SITENAME)) ?>">
<?php
} else {
?>
<?= html(value(Themes::class, SITENAME).NL) ?>
<?php
}
?>
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<!-- Hidden li included to remove active class from first menu link when scrolled up past first section section -->
<li class="hidden">
<a href="#page-top"></a>
</li>
<?php
// iterate through the menu entries to generate the link bar
$menu = value(Themes::class, MENU);
if (is_array($menu)) {
foreach ($menu as $menu_item) {
if (is_array($menu_item)) {
if (isset($menu_item[TITLE]) && isset($menu_item[URI])) {
// set active menu item
$liclass = "";
if (0 === strcmp($menu_item[URI], value(Main::class, URI))) {
$liclass = SP."class=\"active\"";
}
?>
<li<?= $liclass ?>>
<a href="<?= html($menu_item[URI]) ?>" title="<?= html($menu_item[TITLE]) ?>"><?= html($menu_item[TITLE]) ?></a>
</li>
<?php
}
}
}
}
?>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>