/
index.php
138 lines (116 loc) · 3.04 KB
/
index.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
131
132
133
134
135
136
137
138
<!DOCTYPE HTML>
<!--
Future Imperfect by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
Bludit CMS
bludit.com | @bludit
MIT license
Modification Dropdown Menu
28-02-2016
clickwork.ch
-->
<html>
<head>
<!-- Include HTML meta tags -->
<?php include(PATH_THEME_PHP.'head.php') ?>
</head>
<body>
<!-- Wrapper -->
<div id="wrapper">
<!-- Header -->
<header id="header">
<h1><a href="<?php echo $Site->url() ?>"><?php echo $Site->title() ?></a></h1>
<nav class="links">
<ul class="dropdown">
<?php
global $Language;
global $pagesParents;
global $Site, $Url;
$parents = $pagesParents[NO_PARENT_CHAR];
foreach($parents as $Parent) {
echo '<li><a href="'.$Parent->permalink().'">'.$Parent->title().'</a></li>';
if(isset($pagesParents[$Parent->key()]))
{
$children = $pagesParents[$Parent->key()];
// Print children
echo '<ul class="dropdown-content">';
foreach($children as $child)
{
// Check if the child is published
if( $child->published() )
{
echo '<li>';
echo '<a href="'.$child->permalink().'">'.$child->title().'</a>';
echo '</li>';
}
}
echo '</ul>';
}
}
?>
</ul>
</nav>
<nav class="main">
<ul>
<li class="menu"><a class="fa-bars" href="#menu">Menu</a></li>
</ul>
</nav>
</header>
<!-- Menu -->
<section id="menu">
<!-- Links -->
<section>
<ul class="links">
<?php
$parents = $pagesParents[NO_PARENT_CHAR];
foreach($parents as $Parent) {
echo '<li>';
echo '<a href="'.$Parent->permalink().'">
<h3>'.$Parent->title().'</h3>
<p>'.$Parent->description().'</p>
</a>';
echo '</li>';
}
?>
</ul>
</section>
<!-- Actions -->
<section>
<ul class="actions vertical">
<li><a href="<?php echo $Site->url().'admin/' ?>" class="button big fit"><?php $L->p('Login') ?></a></li>
</ul>
</section>
</section>
<!-- Main -->
<div id="main">
<?php
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') || ($Url->whereAmI()=='blog') )
{
include(PATH_THEME_PHP.'home.php');
}
elseif($Url->whereAmI()=='post')
{
include(PATH_THEME_PHP.'post.php');
}
elseif($Url->whereAmI()=='page')
{
include(PATH_THEME_PHP.'page.php');
}
?>
</div>
<!-- Sidebar -->
<section id="sidebar">
<?php include(PATH_THEME_PHP.'sidebar.php') ?>
</section>
</div>
<!-- Scripts -->
<?php Theme::jquery() ?>
<script src="<?php echo HTML_PATH_THEME ?>assets/js/skel.min.js"></script>
<script src="<?php echo HTML_PATH_THEME ?>assets/js/util.js"></script>
<!--[if lte IE 8]><script src="<?php echo HTML_PATH_THEME ?>assets/js/ie/respond.min.js"></script><![endif]-->
<script src="<?php echo HTML_PATH_THEME ?>assets/js/main.js"></script>
<!-- Plugins Site Body End -->
<?php Theme::plugins('siteBodyEnd') ?>
</body>
</html>