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

24 lines
759 B
Twig
Raw Normal View History

2016-07-31 19:36:13 +00:00
{% extends 'master.twig' %}
2016-12-12 22:22:09 +00:00
{% from 'macros.twig' import news_post %}
2016-07-31 01:32:37 +00:00
{% set title = 'News' %}
{% set posts = category.posts|batch(3) %}
{% set paginationPages = posts|keys %}
{% set paginationUrl %}{{ route('news.category', category.name) }}{% endset %}
{% block content %}
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-12 22:22:09 +00:00
{{ news_post(post.id, post.text, post.created, post.userData, post.title, post.commentCount) }}
2016-11-09 18:32:23 +00:00
{% endfor %}
{% if posts|length > 1 %}
<div>
{% include 'elements/pagination.twig' %}
<div class="clear"></div>
</div>
{% endif %}
</div>
{% endblock %}