-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
93 lines (86 loc) · 2.75 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
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<!DOCTYPE html>
<html lang="<?php echo Theme::lang() ?>">
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="Bludit">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
<?php
echo Theme::metaTags('title');
echo Theme::metaTags('description');
echo Theme::favicon('vendors/bludit/favicon.png');
echo Theme::css('vendors/google-fonts/fonts/nunito.css');
echo Theme::css('vendors/line-awesome/css/line-awesome-font-awesome.min.css');
echo Theme::css('vendors/scribbler/scribbler-global.css');
echo Theme::css('vendors/scribbler/scribbler-doc.css');
echo Theme::css('vendors/bludit/style.css');
?>
<?php
Theme::plugins('siteHead');
?>
</head>
<body>
<?php Theme::plugins('siteBodyBegin') ?>
<div class="doc__bg"></div>
<nav class="header">
<h1 class="logo"><a href="<?php echo $site->url() ?>"><?php echo $site->title() ?></a></h1>
<ul class="menu">
<div class="menu__item toggle"><span></span></div>
<!-- Social Networks -->
<?php foreach (Theme::socialNetworks() as $key=>$label): ?>
<li class="menu__item">
<a class="link link--dark" href="<?php echo $site->{$key}(); ?>" target="_blank">
<i class="fa fa-<?php echo $key ?>"></i> <?php echo $label ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</nav>
<div class="wrapper">
<aside class="doc__nav">
<ul>
<?php
foreach ($tags->db as $key=>$fields) {
$active = '';
if ($WHERE_AM_I=='page') {
foreach ($page->tags(true) as $tagKey) {
$active = ($key==$tagKey)?'active':'';
if ($active) {
break;
}
}
} elseif ($WHERE_AM_I=='tag') {
$active = ($url->slug()==$key)?'active':'';
}
$html = '<li class="tags js-btn">';
$html .= '<a class="tag '.$active.'" href="'.DOMAIN_TAGS.$key.'">';
$html .= '<i class="fa fa-tag"></i> '.$fields['name'];
$html .= '</a>';
$html .= '</li>';
echo $html;
}
?>
</ul>
</aside>
<?php
if ($WHERE_AM_I=='page') {
include(__DIR__.'/page.php');
} else {
include(__DIR__.'/home.php');
}
?>
</div>
<footer class="footer"><?php echo $site->footer() ?>. Powered by <a href="https://www.bludit.com" target="_blank" class="link link--light">Bludit</a></footer>
<!-- JavaScript -->
<?php
echo Theme::js('vendors/highlight/highlight.min.js');
echo Theme::js('vendors/scribbler/scribbler.js');
?>
<script>hljs.initHighlightingOnLoad();</script>
<?php Theme::plugins('siteBodyEnd') ?>
</body>
</html>