23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
<article class="news-card">
|
|
{@ if (isset($post['thumbnail']) && $post['thumbnail'] != '') @}
|
|
<div class="news-image">
|
|
<a href="/{{ $section }}/{{ $post['slug'] }}">
|
|
<img src="/static/article/{{ $post['thumbnail'] }}" alt="{{ $post['title'] }}" loading="lazy" />
|
|
</a>
|
|
</div>
|
|
{@ endif @}
|
|
<div class="news-content">
|
|
<div class="news-meta">
|
|
<span class="news-date">{{ $post['date'] }}</span>
|
|
{# {@ if (isset($post['category']) && is_array($post['category'])) @} #}
|
|
{@ foreach ($post['category'] as $cat) @}
|
|
<span class="news-category">{{ $cat }}</span>
|
|
{@ endforeach @}
|
|
{# {@ endif @} #}
|
|
</div>
|
|
<h2 class="news-title">
|
|
<a href="/{{ $section }}/{{ $post['slug'] }}{{{ isset($_GET['q']) ? '?q='.urlencode($_GET['q']) : '' }}}">{{{ $post['title'] }}}</a>
|
|
</h2>
|
|
<p class="news-preview">{{{ $post['preview'] }}}</p>
|
|
</div>
|
|
</article> |