-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpages.php
47 lines (47 loc) · 1.11 KB
/
pages.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
<?= self::enter(); ?>
<article>
<?php if ($page->exist): ?>
<header>
<h1>
<?= $page->title ?: i('Posts'); ?>
</h1>
<p>
<?= $page->description; ?>
</p>
</header>
<?php if ($pages->count): ?>
<ul class="archive">
<?php foreach ($pages as $page2): ?>
<li>
<time datetime="<?= eat($page2->time->format('c')); ?>">
<?= $page2->time('%Y-%m-%d'); ?>
</time> <a href="<?= eat($page2->link ?: $page2->url); ?>">
<?= $page2->title; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?= $page->content; ?>
<?php else: ?>
<?php if ($site->has('part')): ?>
<p>
<?= i('No more %s to show.', 'pages'); ?>
</p>
<?php else: ?>
<p>
<?= i('No %s yet.', 'pages'); ?>
</p>
<?php endif; ?>
<?php endif; ?>
<?php else: ?>
<header>
<h1>
<?= i('Error'); ?>
</h1>
<p>
<?= i('%s does not exist.', 'Page'); ?>
</p>
</header>
<?php endif; ?>
</article>
<?= self::exit(); ?>