2018-04-14 02:58:53 +00:00
|
|
|
{% extends '@mio/news/master.twig' %}
|
2018-04-16 00:33:54 +00:00
|
|
|
{% from '@mio/macros.twig' import paginate %}
|
|
|
|
{% from '@mio/news/macros.twig' import news_preview %}
|
2018-04-14 02:58:53 +00:00
|
|
|
|
|
|
|
{% set title = category.category_name ~ ' :: News' %}
|
2018-05-16 20:48:33 +00:00
|
|
|
{% set canonical_url = '/news.php?c=' ~ category.category_id ~ (posts_offset > 0 ? '&o=' ~ posts_offset : '') %}
|
2018-04-14 02:58:53 +00:00
|
|
|
|
|
|
|
{% block news_content %}
|
2018-04-16 00:33:54 +00:00
|
|
|
<div class="container news__container">
|
|
|
|
<div class="container__title news__container__title">News » {{ category.category_name }}</div>
|
|
|
|
|
|
|
|
<div class="container__content news__container__content">
|
|
|
|
<div class="news__preview__listing">
|
2018-04-14 02:58:53 +00:00
|
|
|
{% for post in posts %}
|
2018-04-16 00:33:54 +00:00
|
|
|
{{ news_preview(post) }}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="news__sidebar">
|
|
|
|
{% if category.category_description|length > 0 %}
|
|
|
|
<div class="container news__container">
|
|
|
|
<div class="container__title">
|
|
|
|
Description
|
2018-04-14 02:58:53 +00:00
|
|
|
</div>
|
2018-04-16 00:33:54 +00:00
|
|
|
<div class="container__content">
|
|
|
|
{{ category.category_description }}
|
2018-04-14 02:58:53 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-16 00:33:54 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if featured|length > 0 %}
|
|
|
|
<div class="container news__list">
|
|
|
|
<div class="container__title">
|
|
|
|
Featured Posts
|
|
|
|
</div>
|
|
|
|
<div class="container__content">
|
|
|
|
{% for featured_post in featured %}
|
2018-05-16 20:48:33 +00:00
|
|
|
<a class="news__list__item" href="/news.php?p={{ featured_post.post_id }}">{{ featured_post.post_title }}</a>
|
2018-04-16 00:33:54 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-05-20 20:12:45 +00:00
|
|
|
{{ paginate(category.posts_count, posts_take, posts_offset, '/news.php?c=' ~ category.category_id) }}
|
2018-04-14 02:58:53 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|