Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| public:computers:pureblog [02/03/26 08:51 GMT] – [Addons] john | public:computers:pureblog [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | < | ||
| - | |||
| - | |||
| - | ====== Pureblog ====== | ||
| - | |||
| - | ** Description ** | ||
| - | |||
| - | ===== Section One ===== | ||
| - | |||
| - | |||
| - | ===== Addons ===== | ||
| - | |||
| - | <file archive.php> | ||
| - | <?php | ||
| - | declare(strict_types=1); | ||
| - | |||
| - | $allPosts = get_all_posts(false); | ||
| - | $postsByYear = []; | ||
| - | |||
| - | foreach ($allPosts as $entry) { | ||
| - | $year = !empty($entry[' | ||
| - | $postsByYear[$year][] = $entry; | ||
| - | } | ||
| - | |||
| - | krsort($postsByYear, | ||
| - | |||
| - | $pageTitle = ' | ||
| - | $metaDescription = ' | ||
| - | ?> | ||
| - | <?php require PUREBLOG_BASE_PATH . '/ | ||
| - | <?php render_masthead_layout($config); | ||
| - | <main class=archive> | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | |||
| - | <?php if (!$allPosts): | ||
| - | <p>No published posts yet.</ | ||
| - | <?php else: ?> | ||
| - | <?php foreach ($postsByYear as $year => $yearPosts): | ||
| - | < | ||
| - | <ul> | ||
| - | <?php foreach ($yearPosts as $postItem): ?> | ||
| - | <li> | ||
| - | <?php if (!empty($postItem[' | ||
| - | < | ||
| - | <time datetime="<? | ||
| - | <?= e(date(' | ||
| - | </ | ||
| - | < | ||
| - | & | ||
| - | <?php endif; ?> | ||
| - | <a href="/<? | ||
| - | <?= e((string) ($postItem[' | ||
| - | </a> | ||
| - | </li> | ||
| - | <?php endforeach; ?> | ||
| - | </ul> | ||
| - | <?php endforeach; ?> | ||
| - | <?php endif; ?> | ||
| - | </ | ||
| - | </ | ||
| - | <?php render_footer_layout($config); | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | ===== Further Information ===== | ||
| - | |||
| - | |||
| - | {{tag>}} | ||
| - | |||
| - | Page created | ||
| - | |||
| - | Page updated : ~~LASTMOD~~ | ||