blog-panel to index
This commit is contained in:
@@ -56,7 +56,7 @@ $max = ceil($max / 20) * 20;
|
||||
'speed' => $problem['steps'] < 500000 ? 2 : 3,
|
||||
'editable' => false,
|
||||
];
|
||||
echo require (__DIR__ . '/../fragments/befunge93_runner.php');
|
||||
echo require (__DIR__ . '/../fragments/widget_befunge93.php');
|
||||
|
||||
if ($problem['abbreviated']) echo '<i>This program is too big to display/execute here, click [download] to get the full program. </i><br/>';
|
||||
?>
|
||||
|
||||
33
www/fragments/panel_blog.php
Normal file
33
www/fragments/panel_blog.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
require_once(__DIR__ . '/../internals/blog.php');
|
||||
|
||||
$allposts = Blog::listAllNewestFirst();
|
||||
?>
|
||||
|
||||
<div class="index_pnl_base">
|
||||
|
||||
<div class="index_pnl_header">
|
||||
<a href="/blog">New posts</a>
|
||||
</div>
|
||||
<div class="index_pnl_content blog_pnl_content">
|
||||
|
||||
<?php
|
||||
|
||||
for ($i=0; $i<3; $i++)
|
||||
{
|
||||
$post = $allposts[$i];
|
||||
|
||||
if (!$post['visible']) continue;
|
||||
|
||||
echo "<a class='blogpnl_base' href='" . $post['url'] . "'>\n";
|
||||
echo "<div class='blogpnl_date'>" . $post['date'] . "</div>\n";
|
||||
echo "<div class='blogpnl_title'>" . $post['title'] . "</div>\n";
|
||||
echo "</a>\n";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user