aboutsummaryrefslogtreecommitdiffstats
path: root/template/standard/html/main.php
blob: e6c0e10e0c0ac43a99f954798d7ebec2cb9f031f (plain)
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
<?php
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# Standard: Main Template                    [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
#                                                                              #
# [see documentation]                                                          #
#                                                                              #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#

#===============================================================================
# Escape parameters which are used several times here to reduce escapeHTML calls
#===============================================================================
$HEAD_NAME = isset($HEAD['NAME']) ? escapeHTML($HEAD['NAME']) : NULL;
$HEAD_DESC = isset($HEAD['DESC']) ? escapeHTML($HEAD['DESC']) : NULL;
$BLOGMETA_NAME = escapeHTML($BLOGMETA['NAME']);
$BLOGMETA_DESC = escapeHTML($BLOGMETA['DESC']);
?>
<!DOCTYPE html>
<html lang="<?=$BLOGMETA['LANG']?>">
<head>
	<meta charset="UTF-8" />
	<meta name="referrer" content="origin-when-crossorigin" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />

<?php if(isset($HEAD_DESC)): ?>
	<meta name="description" content="<?=$HEAD_DESC?>" />
<?php endif; ?>

<?php if(isset($HEAD['PERM'])): ?>
	<link rel="canonical" href="<?=$HEAD['PERM']?>" />
<?php endif; ?>

	<meta property="og:site_name" content="<?=$BLOGMETA_NAME?>" />
	<meta property="og:title" content="<?=$HEAD_NAME?>" />
	<meta property="og:image" content="<?=Application::getTemplateURL('rsrc/logo.png')?>" />

<?php if(isset($HEAD['OG_IMAGES'])): ?>
	<?php foreach($HEAD['OG_IMAGES'] as $imageURL): ?>
		<meta property="og:image" content="<?=$imageURL?>" />
	<?php endforeach; ?>
<?php endif; ?>

	<link rel="icon" href="<?=Application::getURL('favicon.ico')?>" />
	<link rel="stylesheet" href="<?=Application::getTemplateURL('rsrc/main.css')?>" />

	<link rel="alternate" type="application/rss+xml" title="<?=$Language->text('feed_name_items', $BLOGMETA_NAME)?>" href="<?=Application::getURL('feed/')?>" />
	<link rel="alternate" type="application/rss+xml" title="<?=$Language->text('feed_name_posts', $BLOGMETA_NAME)?>" href="<?=Application::getURL('feed/post/')?>" />
	<link rel="alternate" type="application/rss+xml" title="<?=$Language->text('feed_name_pages', $BLOGMETA_NAME)?>" href="<?=Application::getURL('feed/page/')?>" />

	<title><?="{$HEAD_NAME} | {$BLOGMETA_NAME} {$BLOGMETA_DESC}"?></title>
</head>
<body>
	<section id="container">
		<header id="main-header">
			<section>
				<a href="<?=Application::getURL()?>" title="<?="{$BLOGMETA_NAME} {$BLOGMETA_DESC}"?>">
					<img id="main-logo" src="<?=Application::getTemplateURL('rsrc/logo.png')?>" alt="<?=$BLOGMETA_NAME?>" />
				</a>
			</section>
			<nav id="main-navi">
				<label for="toogle-nav" id="toogle-nav-label" class="fa fa-bars"></label>
				<input type="checkbox" id="toogle-nav" />
				<ul>
					<li>
						<a href="<?=Application::getURL()?>" title="<?=$Language->template('navigation_home_desc', $BLOGMETA_NAME)?>">
							<i class="fa fa-home"></i><?=$Language->template('navigation_home_text')?>
						</a>
					</li>
					<li>
						<a href="<?=Application::getPostURL()?>" title="<?=$Language->text('post_overview')?>">
							<i class="fa fa-newspaper-o"></i><?=$Language->text('posts')?>
						</a>
					</li>
					<li>
						<a href="<?=Application::getPageURL()?>" title="<?=$Language->text('page_overview')?>">
							<i class="fa fa-file-text-o"></i><?=$Language->text('pages')?>
						</a>
					</li>
					<li>
						<a href="<?=Application::getUserURL()?>" title="<?=$Language->text('user_overview')?>">
							<i class="fa fa-user"></i><?=$Language->text('users')?>
						</a>
					</li>
					<li>
						<a href="<?=Application::getURL('search/')?>" title="<?=$Language->template('navigation_search_desc')?>">
							<i class="fa fa-search"></i><?=$Language->template('navigation_search_text')?>
						</a>
					</li>
				</ul>
			</nav>
		</header>
		<main>
			<?=$HTML?>
		</main>
		<footer id="main-footer">
			&copy; <?=$BLOGMETA_NAME?>
		</footer>
	</section>
</body>
</html>