| 1 | <article class="news-card"> |
| 2 | {@ if (isset($post['thumbnail']) && $post['thumbnail'] != '') @} |
| 3 | <div class="news-image"> |
| 4 | <a href="/{{ $section }}/{{ $post['slug'] }}"> |
| 5 | <img src="{{ ass_url('article/'.$post['thumbnail']) }}" alt="{{ $post['title'] }}" loading="lazy" /> |
| 6 | </a> |
| 7 | </div> |
| 8 | {@ endif @} |
| 9 | <div class="news-content"> |
| 10 | <div class="news-meta"> |
| 11 | <span class="news-date">{{ $post['date'] }}</span> |
| 12 | {@ foreach ($post['category'] as $cat) @} |
| 13 | <span class="news-category">{{ $cat }}</span> |
| 14 | {@ endforeach @} |
| 15 | </div> |
| 16 | <h2 class="news-title"> |
| 17 | <a href="/{{ $section }}/{{ $post['slug'] }}{{{ isset($_GET['q']) ? '?q='.urlencode($_GET['q']) : '' }}}">{{{ $post['title'] }}}</a> |
| 18 | </h2> |
| 19 | <p class="news-preview">{{{ $post['preview'] }}}</p> |
| 20 | </div> |
| 21 | </article> |