-
Notifications
You must be signed in to change notification settings - Fork 0
/
posts.php
executable file
·32 lines (28 loc) · 1.02 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
<?php theme_include('partial/header'); ?>
<?php if (site_meta('sidebar',1)) { echo "<div class='mainWrapper'>"; } ?>
<main class="container">
<?php if(has_posts()): ?>
<?php while(posts()): ?>
<article>
<header>
<h1><a href="<?php echo article_url(); ?>"><?php echo article_title(); ?></a></h1>
<div class="meta">
<time datetime="<?php echo date(DATE_W3C, article_time()); ?>"><?php echo date('M j, Y - g:i a', article_time()); ?></time>
</div>
</header>
<?php echo split_content(article_markdown()); ?>
<p><a href="<?php echo article_url(); ?>" rel="article">Read More</a></p>
</article>
<?php endwhile; ?>
<?php else: ?>
<p>Looks like you have some writing to do!</p>
<?php endif; ?>
<?php if(has_pagination()): ?>
<ul class="pager">
<li class="previous"><?php echo posts_prev(); ?></li>
<li class="next"><?php echo posts_next(); ?></li>
</ul>
<?php endif; ?>
</main>
<?php if (site_meta('sidebar',1)) { echo "</div>"; } ?>
<?php theme_include('partial/footer'); ?>