-
Notifications
You must be signed in to change notification settings - Fork 1
/
posts.php
executable file
·61 lines (31 loc) · 1.8 KB
/
posts.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
<?php theme_include('header'); ?>
<div class="content-wrapper bg-third padding-top">
<?php if(has_posts()): ?>
<?php posts(); ?>
<div class="content">
<h2 class="small-title sans-serif caps">Written <time datetime="<?php echo date(DATE_W3C, article_time()); ?>"><?php echo relative_time(article_time()); ?></time> by <?php echo article_author('real_name'); ?></h2>
<a href="<?php echo article_url(); ?>"><h2 class="h2"><?php echo article_title(); ?></h2></a>
<p><?php echo article_markdown(); ?></p>
</div>
<?php $i = 0; while(posts()): ?>
<?php $bg = sprintf('background: hsl(215, 28%%, %d%%);', round(((++$i / posts_per_page()) * 20) + 20)); ?>
<hr>
<div class="content">
<h2 class="small-title sans-serif caps">Written <time datetime="<?php echo date(DATE_W3C, article_time()); ?>"><?php echo relative_time(article_time()); ?></time> by <?php echo article_author('real_name'); ?></h2>
<a href="<?php echo article_url(); ?>"><h2 class="h2"><?php echo article_title(); ?></h2></a>
<p><?php echo article_markdown(); ?></p>
</div>
<?php endwhile; ?>
</div>
<?php if(has_pagination()): ?>
<div class="section-padding center pages pagination">
<nav>
<item style="float:left;"><?php echo posts_next('← Newer'); ?></item>
<item style="float:right;"><?php echo posts_prev('Prev →'); ?></item>
</nav>
</div>
<?php endif; ?>
<?php else: ?>
<p>Looks like you have some writing to do!</p>
<?php endif; ?>
<?php theme_include('footer'); ?>