summaryrefslogtreecommitdiff
path: root/src/web/_views/blog/main.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-12-12 10:14:46 -0500
committerFreya Murphy <freya@freyacat.org>2024-12-12 10:14:46 -0500
commit859f31065da728fcb1387645ab1c92390b372412 (patch)
tree29457dce1cd2269ac0446a59f3fe601476895f29 /src/web/_views/blog/main.php
parentswitch to POST for posting comments (diff)
downloadwebsite-859f31065da728fcb1387645ab1c92390b372412.tar.gz
website-859f31065da728fcb1387645ab1c92390b372412.tar.bz2
website-859f31065da728fcb1387645ab1c92390b372412.zip
refactor _views folder
Diffstat (limited to 'src/web/_views/blog/main.php')
-rw-r--r--src/web/_views/blog/main.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/web/_views/blog/main.php b/src/web/_views/blog/main.php
new file mode 100644
index 0000000..78abaa7
--- /dev/null
+++ b/src/web/_views/blog/main.php
@@ -0,0 +1,13 @@
+<?php /* Copyright (c) 2024 Freya Murphy */ ?>
+<?=aria_section('blog', lang('title'))?>
+ <p><?=lang('blog_desc', sub: [$this->get_url('rss.xml')])?></p>
+ <?php
+ foreach($blog as $name => $post) {
+ $meta = $post['meta'];
+ $link = $this->get_url('blog/post/' . substr($name, 0, -3));
+ echo '<a href="' . $link . '"><h3>' . $meta['name'] . '</h3></a>';
+ echo '<div class="span">' . $meta['desc'] . '</div>';
+ echo '<div class="span"><time>' . $this->format_date($meta['date']) . '</time></div>';
+ }
+ ?>
+</div>