aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/single.inc.php7
-rw-r--r--templates/timeline.inc.php7
2 files changed, 12 insertions, 2 deletions
diff --git a/templates/single.inc.php b/templates/single.inc.php
index cd01127..29184d4 100644
--- a/templates/single.inc.php
+++ b/templates/single.inc.php
@@ -86,7 +86,12 @@
$datetime = date_format($date, 'Y-m-d H:i:s');
$formatted_time = date_format($date, 'M d Y H:i');
?>
- <span class="post-timestamp"><time datetime="<?= $datetime ?>" data-unix-time="<?= $post['post_timestamp'] ?>"><?= $formatted_time ?></time></span>
+ <span class="post-timestamp">
+ <time class="published" datetime="<?= $datetime ?>" data-unix-time="<?= $post['post_timestamp'] ?>"><?= $formatted_time ?></time>
+ <?php if(is_numeric($post['post_edited']) && $config['show_edits']): ?>
+ <time class="modified" datetime="<?= gmdate('Y-m-d\TH:i:s\Z', $post['post_edited']) ?>" data-unix-time="<?= $post['post_edited'] ?>">Edited on <?= date('M d Y H:i', $post['post_edited']) ?></time>
+ <?php endif; ?>
+ </span>
<nav class="post-meta">
<?php if($config['logged_in']): ?><ul>
<?php if(is_numeric($post['post_deleted'])): ?>
diff --git a/templates/timeline.inc.php b/templates/timeline.inc.php
index a29e9dd..bc06de9 100644
--- a/templates/timeline.inc.php
+++ b/templates/timeline.inc.php
@@ -37,7 +37,12 @@
$datetime = date_format($date, 'Y-m-d H:i:s');
$formatted_time = date_format($date, 'M d Y H:i');
?>
- <a class="post-timestamp" href="<?= $config['url'] ?>/<?= $post['id'] ?>"><time datetime="<?= $datetime ?>" data-unix-time="<?= $post['post_timestamp'] ?>"><?= $formatted_time ?></time></a>
+ <a class="post-timestamp" href="<?= $config['url'] ?>/<?= $post['id'] ?>">
+ <time class="published" datetime="<?= $datetime ?>" data-unix-time="<?= $post['post_timestamp'] ?>"><?= $formatted_time ?></time>
+ <?php if(is_numeric($post['post_edited']) && $config['show_edits']): ?>
+ <time class="modified" datetime="<?= gmdate('Y-m-d\TH:i:s\Z', $post['post_edited']) ?>" data-unix-time="<?= $post['post_edited'] ?>">Edited on <?= date('M d Y H:i', $post['post_edited']) ?></time>
+ <?php endif; ?>
+ </a>
<nav class="post-meta">
<?php if($config['logged_in']): ?><ul>
<li><a href="<?= $config['url'] ?>/<?= $post['id'] ?>/edit">Edit</a></li>