-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
86 lines (86 loc) · 2.85 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
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
<?= self::enter(); ?>
<?php if ($site->has('parent')): ?>
<div class="row">
<div class="col-sm-8">
<?php if ($page['image'] && $image = $page->image): ?>
<img alt="<?= eat($page->title); ?>" class="featured-image img-fluid rounded" src="<?= eat($image); ?>">
<?php endif; ?>
<div class="mainheading">
<?php if ($tags = $page->tags): ?>
<div class="after-post-tags">
<ul class="tags">
<?php foreach ($tags as $tag): ?>
<li>
<a href="<?= eat($tag->link); ?>" rel="tag">
<?= $tag->title; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<h1 class="posttitle">
<?= $page->title; ?>
</h1>
</div>
<div class="article-post serif-font">
<?= $page->content; ?>
<div class="clearfix"></div>
</div>
<p>
<small>
<span class="post-date">
<time class="post-date" datetime="<?= eat($page->time->format('c')); ?>">
<?= $page->time('%d %b %Y'); ?>
</time>
</span>
</small>
</p>
<?= self::pager(); ?>
<?php if ($author = $page->author): ?>
<?php if (is_object($author) && $author instanceof User): ?>
<div class="post-top-meta row">
<div class="col-md-2">
<img alt="<?= eat((string) $author); ?>" class="author-thumb" src="<?= eat($author->avatar(80)); ?>">
</div>
<div class="col-md-10">
<a class="link-dark" href="<?= eat($author->link ?? $author->url); ?>" target="_blank">
<?= $author; ?>
</a><?php if ($follow = $author->follow): ?><a class="btn follow" href="<?= eat($follow); ?>" target="_blank">
<?= i('Follow'); ?>
</a><?php endif; ?>
<span class="author-description">
<?= $author->description ?? To::description($author->content); ?>
</span>
</div>
</div>
<?php else: ?>
<!-- TODO -->
<?php endif; ?>
<?php endif; ?>
<section>
<?= self::comments(); ?>
</section>
</div>
<div class="col-sm-4">
<?= self::aside(); ?>
</div>
</div>
<?php else: ?>
<?php if ($page['image'] && $image = $page->image): ?>
<div class="mb-5 mx-auto text-center">
<img alt="<?= eat($page->title); ?>" class="featured-image mx-auto rounded text-center" src="<?= eat($image); ?>">
</div>
<?php endif; ?>
<div class="col-lg-8 mx-auto">
<div class="mainheading">
<h1 class="posttitle">
<?= $page->title; ?>
</h1>
</div>
<div class="article-post serif-font">
<?= $page->content; ?>
</div>
</div>
<?php endif; ?>
<?= self::exit(); ?>