parsed md

This commit is contained in:
Pachira 2015-04-02 15:27:21 +02:00
parent 00003673f1
commit e9ac88f500
2 changed files with 19 additions and 18 deletions

View file

@ -159,8 +159,9 @@ class Main {
// Get user data
foreach($newsPosts as $newsId => $newsPost) {
$newsPosts[$newsId]['udata'] = Users::getUser($newsPost['uid']);
$newsPosts[$newsId]['gdata'] = Users::getGroup($newsPosts[$newsId]['udata']['group_main']);
$newsPosts[$newsId]['parsed'] = self::mdParse($newsPost['content']);
$newsPosts[$newsId]['udata'] = Users::getUser($newsPost['uid']);
$newsPosts[$newsId]['gdata'] = Users::getGroup($newsPosts[$newsId]['udata']['group_main']);
}
// Return posts

View file

@ -1,16 +1,16 @@
<a href="/news/{{ newsPost.id }}" class="news-head" id="{{ newsPost.id }}">{{ newsPost.title }}</a>
<div class="news-body">
<a class="default" href="/u/{{ newsPost.uid }}">
<div class="news-poster">
<img src="/a/{{ newsPost.uid }}" alt="{{ newsPost.udata.username }}" class="default-avatar-setting" />
<h1 style="color: #{{ newsPost.gdata.colour }} !important; text-shadow: 0 0 7px #888; padding: 0 0 10px;">{{ newsPost.udata.username }}</h1>
</div>
</a>
<div class="markdown">
{{ newsPost.content }}
</div>
</div>
<div class="clear"></div>
<div class="news-post-time">
Posted on {{ newsPost.date|date("D Y-m-d H:i:s T") }} <a class="default" href="/news/{{ newsPost.id }}#disqus_thread">View comments</a>
</div>
<a href="/news/{{ newsPost.id }}" class="news-head" id="{{ newsPost.id }}">{{ newsPost.title }}</a>
<div class="news-body">
<a class="default" href="/u/{{ newsPost.uid }}">
<div class="news-poster">
<img src="/a/{{ newsPost.uid }}" alt="{{ newsPost.udata.username }}" class="default-avatar-setting" />
<h1 style="color: #{{ newsPost.gdata.colour }} !important; text-shadow: 0 0 7px #888; padding: 0 0 10px;">{{ newsPost.udata.username }}</h1>
</div>
</a>
<div class="markdown">
{{ newsPost.parsed }}
</div>
</div>
<div class="clear"></div>
<div class="news-post-time">
Posted on {{ newsPost.date|date("D Y-m-d H:i:s T") }} <a class="default" href="/news/{{ newsPost.id }}#disqus_thread">View comments</a>
</div>