16 lines
436 B
PHP
16 lines
436 B
PHP
|
<?php
|
||
|
|
||
|
foreach (glob("news/*.json") as $file):
|
||
|
$post = json_decode(file_get_contents($file));
|
||
|
if (!$post->published) continue; ?>
|
||
|
|
||
|
<div class="list-group">
|
||
|
<div class="list-group-item">
|
||
|
<h4 class="list-group-item-heading"><?=$post->title?></h4>
|
||
|
<em><?=$post->date?></em>
|
||
|
<p class="list-group-item-text"><?=$post->content?></p>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<?php endforeach;
|