-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
55 lines (55 loc) · 1.89 KB
/
Copy pathindex.php
File metadata and controls
55 lines (55 loc) · 1.89 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=">
<?php echo Theme::metaTags( 'title' ); ?>
<?php echo Theme::metaTags( 'description' ); ?>
<?php if ( ! isset( $_GET['textonly'] ) ): ?>
<style>
<?php include('css/style.css'); ?>
</style>
<?php endif; ?>
<?php Theme::plugins( 'siteHead' ) ?>
</head>
<body>
<div class="container<?php echo ($page->template())?? ''; ?>">
<?php
if ( $WHERE_AM_I === 'home' ) { ?>
<header class="mb2">
<?php echo $site->title(); ?>
</header>
<?php
$posts = $pages->getList(0,-1,1,0,1);
echo '<div class="entries mb2">';
foreach ( $posts as $page ) {
$page = new Page($page);
?>
<div class="entry mbh">
<a href="<?php echo $page->permalink(); ?>"><?php echo $page->title(); ?></a>
<span class="meta g">— <?php echo $page->date("d.m.y");?><?php echo ($page->category())? ', ' . $page->category() : ''; ?></span>
</div>
<?php
}
echo '</div>';
}
if ( $WHERE_AM_I === 'page' ) {
?>
<header class="mb2">
<?php if ( $page->parent() ) {
$parent = new Page($page->parent());
$p = '<a href="'.$parent->permalink().'">'.$parent->title().'</a> / ';
} ?>
<a href="<?php echo $site->url(); ?>"><?php echo $site->title(); ?></a> / <?php echo ($p)?? ''; ?><?php echo $page->title(); ?></header>
<?php if ($page->coverImage()): ?>
<div class="cover"><img src="<?php echo $page->coverImage(); ?>" alt="<?php echo $site->title(); ?></a>"></div>
<?php endif; ?>
<div class="entry mb2">
<?php echo $page->content(); ?>
</div><?php } ?>
<div class="footer"><?php echo $site->footer(); ?></div>
</div>
</body>
</html>