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
833 B
Twig
Raw Normal View History

2016-07-31 19:36:13 +00:00
{% extends 'master.twig' %}
2016-12-21 19:55:17 +00:00
{% from '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 %}