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/index.twig

26 lines
1 KiB
Twig
Raw Normal View History

2017-03-23 15:01:53 +00:00
{% extends '@yuuno/master.twig' %}
{% from '@yuuno/macros.twig' import news_post %}
2016-12-12 22:22:09 +00:00
{% block content %}
<div class="content">
<div class="content--right">
<div class="content__header content__header--alt">Categories</div>
{% for category in categories %}
2016-12-21 19:55:17 +00:00
<a class="news__category-link" href="{{ route('news.category', category.category_id) }}">{{ category.category_name }}</a>
2016-12-12 22:22:09 +00:00
{% endfor %}
</div>
<div class="content--left">
<div class="content__header">News</div>
2016-12-21 19:55:17 +00:00
{% if posts is defined and posts|length > 0 %}
{% for post in posts %}
{{ news_post(post, true, true, true) }}
{% endfor %}
<h1 class="news__more">Pick a category from the sidebar to view more!</h1>
{% else %}
<h1 class="news__more">There are no news posts!</h1>
{% endif %}
2016-12-12 22:22:09 +00:00
</div>
<div class="clear"></div>
</div>
{% endblock %}