2017-12-28 22:29:14 +00:00
|
|
|
<?php
|
|
|
|
|
2017-12-28 22:37:51 +00:00
|
|
|
foreach (array_reverse(glob("news/*.json")) as $file):
|
2017-12-28 22:29:14 +00:00
|
|
|
$post = json_decode(file_get_contents($file));
|
|
|
|
if (!$post->published) continue; ?>
|
|
|
|
|
|
|
|
<div class="list-group">
|
|
|
|
<div class="list-group-item">
|
2017-12-28 22:49:52 +00:00
|
|
|
<h3 class="list-group-item-heading"><?=$post->title?></h3>
|
2017-12-28 22:37:51 +00:00
|
|
|
<em><?=$post->date?> - <?=$post->author?></em>
|
2017-12-28 22:49:52 +00:00
|
|
|
<hr style="border-top: 1px solid #000;">
|
2017-12-28 22:29:14 +00:00
|
|
|
<p class="list-group-item-text"><?=$post->content?></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php endforeach;
|