forked from team/site
update posts, include author, sort posts reverse alpha
This commit is contained in:
parent
08937b740e
commit
8fd9e82f91
|
@ -73,8 +73,6 @@
|
|||
<i class="fa fa-link"></i> url shortener</a>
|
||||
<a class="btn btn-success" href="https://social.tilde.team/">
|
||||
<i class="fa fa-retweet"></i> tilde.team mastodon instance</a>
|
||||
<a class="btn btn-success" href="https://twitter.com/tildeteam">
|
||||
<i class="fa fa-twitter"></i> tilde.team updates on twitter</a>
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
|
|
4
news.php
4
news.php
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
foreach (glob("news/*.json") as $file):
|
||||
foreach (array_reverse(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>
|
||||
<em><?=$post->date?> - <?=$post->author?></em>
|
||||
<p class="list-group-item-text"><?=$post->content?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"published": true,
|
||||
"date": "Dec 28, 2017",
|
||||
"date": "dec 28, 2017",
|
||||
"title": "first post",
|
||||
"author": "",
|
||||
"author": "~ben",
|
||||
"content": "hi this is the first news post"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"published": true,
|
||||
"date": "dec 28, 2017",
|
||||
"title": "good news everyone",
|
||||
"author": "~ben",
|
||||
"content": "there's a news feed on the homepage now!! whenever there is any news, it will be posted here. if you have any big news, make a pull request on the <a href=\"https://github.com/tilde-team/site\">github repo</a> and then <a href=\"/~ben/\">~ben</a> or another github admin can merge it"
|
||||
}
|
Loading…
Reference in New Issue