This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/resources/views/yuuno/news/category.twig

25 lines
847 B
Twig
Raw Normal View History

2017-03-23 15:01:53 +00:00
{% extends '@yuuno/master.twig' %}
{% from '@yuuno/macros.twig' import news_post, pagination %}
2016-07-31 01:32:37 +00:00
{% set title = 'News' %}
{% set posts = category.posts|batch(3) %}
{% block content %}
2016-12-21 19:55:17 +00:00
<div class="announce-box">
<h1>{{ category.name }}</h1>
<h3>{{ category.description }}</h3>
</div>
2016-11-09 18:32:23 +00:00
<div class="content news">
<div class="content__header">News</div>
{% for post in posts[get.page|default(1) - 1] %}
2016-12-21 19:55:17 +00:00
{{ news_post(post, true, true) }}
2016-11-09 18:32:23 +00:00
{% endfor %}
2016-12-21 19:55:17 +00:00
<div>
<a href="{{ route('news.index') }}" class="input__button"><span class="fa fa-backward"></span> Back</a>
{% if posts|length > 1 %}
{{ pagination(route('news.category', category.id), posts|keys, get.page|default(1)) }}
{% endif %}
</div>
</div>
{% endblock %}