1
0
www.mikescher.com/www/pages/blog_list.php

39 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2017-12-28 22:53:41 +01:00
<?php
2020-01-16 10:56:12 +01:00
require_once (__DIR__ . '/../internals/website.php');
2017-12-28 22:53:41 +01:00
2020-01-16 10:56:12 +01:00
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
2017-12-28 22:53:41 +01:00
?>
2020-01-16 10:56:12 +01:00
<?php
$FRAME_OPTIONS->title = 'Blog';
$FRAME_OPTIONS->canonical_url = 'https://www.mikescher.com/blog';
$FRAME_OPTIONS->activeHeader = 'blog';
2017-12-28 22:53:41 +01:00
2020-01-16 10:56:12 +01:00
$allposts = $SITE->modules->Blog()->listAllNewestFirst();
?>
2017-12-28 22:53:41 +01:00
2020-01-16 10:56:12 +01:00
<div class="blockcontent">
2017-12-28 22:53:41 +01:00
2020-01-16 10:56:12 +01:00
<div class="contentheader"><h1>Blogposts and other stuff</h1><hr/></div>
2017-12-28 22:53:41 +01:00
2020-01-16 10:56:12 +01:00
<div class='bloglistelem_container'>
<?php
2017-12-28 22:53:41 +01:00
2020-01-16 10:56:12 +01:00
foreach ($allposts as $post)
{
if (!$post['visible']) continue;
2017-12-28 22:53:41 +01:00
2020-01-16 10:56:12 +01:00
if ($post['cat']=='blog') echo "<a class='bloglistelem ble_blog' href='" . $post['url'] . "'>\n";
else if ($post['cat']=='log') echo "<a class='bloglistelem ble_log' href='" . $post['url'] . "'>\n";
echo "<div class='ble_date'>" . $post['date'] . "</div>\n";
echo "<div class='ble_title'>" . $post['title'] . "</div>\n";
echo "</a>\n";
}
2017-12-28 22:53:41 +01:00
2020-01-16 10:56:12 +01:00
?>
</div>
2017-12-29 01:14:15 +01:00
</div>