-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
page.php
60 lines (60 loc) · 1.64 KB
/
page.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
<?= self::enter(); ?>
<div>
<main>
<?= self::alert(); ?>
<?php if ($page->exist): ?>
<article id="page:<?= eat($page->id); ?>">
<header>
<?php if ($site->has('parent')): ?>
<p>
<time datetime="<?= eat($page->time->format('c')); ?>">
<?= $page->time('%A, %B %d, %Y'); ?>
</time>
</p>
<?php endif; ?>
<h2>
<?php if ($link = $page->link): ?>
<a href="<?= eat($link); ?>" rel="nofollow" target="_blank">
<?= $page->title; ?>
</a>
<?php else: ?>
<?= $page->title; ?>
<?php endif; ?>
</h2>
</header>
<div>
<?= $page->content; ?>
<?php if ($link): ?>
<p>
<a href="<?= eat($link); ?>" rel="nofollow" role="button" target="_blank">
<?= i('Visit Link'); ?>
</a>
</p>
<?php endif; ?>
</div>
<?php if ($site->has('parent')): ?>
<?= self::get('page.footer'); ?>
<?php endif; ?>
</article>
<?php if (isset($state->x->pager)): ?>
<?= self::pager('page'); ?>
<?php endif; ?>
<?php if ($site->has('parent')): ?>
<?= self::comments(); ?>
<?php endif; ?>
<?php else: ?>
<article>
<header>
<h2>
<?= i('Error'); ?>
</h2>
</header>
<p role="status">
<?= i('%s does not exist.', 'Page'); ?>
</p>
</article>
<?php endif; ?>
</main>
<?= self::aside(); ?>
</div>
<?= self::exit(); ?>