agnes-dot-love-pureblog/includes/post-meta.php
2026-11-17 22:01:10 -05:00

34 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
$post = $post ?? [];
?>
<?php if (!empty($post['tags'])): ?>
<p class="tag-list"><svg class="icon" aria-hidden="true"><use href="#icon-tag"></use></svg> <?= render_tag_links($post['tags']) ?></p>
<?php endif; ?>
<?php if (!empty($config['community']['purecomments_enabled']) && !empty($config['community']['purecomments_url'])): ?>
<div id="comments"<?= !empty($config['community']['purecomments_autoload']) ? ' data-autoload="true"' : '' ?> data-post-slug="<?= e((string) ($post['slug'] ?? '')) ?>"></div>
<script src="<?= e($config['community']['purecomments_url']) ?>/public/embed.js" defer></script>
<?php endif; ?>
<div class="post-nav">
<div>
<?php if (!empty($previous_post)): ?>
<p><?= e(t('frontend.prev_post')) ?><br>
<a class="pagination-links" href="<?= base_path() ?>/<?= e((string) ($previous_post['slug'] ?? '')) ?>">
<?= e((string) ($previous_post['title'] ?? '')) ?>
</a></p>
<?php endif; ?>
</div>
<div class="post-nav-next">
<?php if (!empty($next_post)): ?>
<p><?= e(t('frontend.next_post')) ?><br>
<a class="pagination-links" href="<?= base_path() ?>/<?= e((string) ($next_post['slug'] ?? '')) ?>">
<?= e((string) ($next_post['title'] ?? '')) ?>
</a></p>
<?php endif; ?>
</div>
</div>