-
Notifications
You must be signed in to change notification settings - Fork 0
/
article.php
71 lines (55 loc) · 2.18 KB
/
article.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
<?php theme_include('header'); ?>
<?php if (article_custom_field('article_image') && article_custom_field('article_image') != "/content/content") :?>
<header class="banner">
<span class="background" style="background-image: url('<?=article_custom_field('article_image', article_id())?>')"></span>
</header>
<?php endif; ?>
<section class="content wrap" id="article-<?php echo article_id(); ?>">
<article>
<h1><?php echo article_title(); ?></h1>
<?php echo article_html(); ?>
</article>
<section class="footnote">
Posted <time datetime="<?php echo date(DATE_W3C, article_time()); ?>"><?php echo relative_time(article_time()); ?></time> by <?php echo article_author('real_name'); ?>.
</section>
</section>
<?php if (comments_open()): ?>
<section class="comments">
<?php if (has_comments()): ?>
<ul class="commentlist">
<?php $i = 0; while (comments()): $i++; ?>
<li class="comment" id="comment-<?php echo comment_id(); ?>">
<div class="wrap">
<h2><?php echo comment_name(); ?></h2>
<time><?php echo relative_time(comment_time()); ?></time>
<div class="content">
<?php echo htmlspecialchars(comment_text()); ?>
</div>
<span class="counter"><?php echo $i; ?></span>
</div>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
<form id="comment" class="commentform wrap" method="post" action="<?php echo comment_form_url(); ?>#comment">
<?php echo comment_form_notifications(); ?>
<p class="name">
<label for="name">Your name:</label>
<?php echo comment_form_input_name('placeholder="Your name"'); ?>
</p>
<p class="email">
<label for="email">Your email address:</label>
<?php echo comment_form_input_email('placeholder="Your email (won’t be published)"'); ?>
</p>
<p class="textarea">
<label for="text">Your comment:</label>
<?php echo comment_form_input_text('placeholder="Your comment"'); ?>
</p>
<div class="g-recaptcha" data-sitekey="<?php echo site_meta('recaptcha_sitekey'); ?>"></div>
<p class="submit">
<?php echo comment_form_button(); ?>
</p>
</form>
</section>
<?php endif; ?>
<?php theme_include('footer'); ?>