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

{% extends '@yuuno/master.twig' %}
{% from '@yuuno/macros.twig' import news_post %}
{% block content %}
<div class="content">
<div class="content--right">
<div class="content__header content__header--alt">Categories</div>
{% for category in categories %}
<a class="news__category-link" href="{{ route('news.category', category.category_id) }}">{{ category.category_name }}</a>
{% endfor %}
</div>
<div class="content--left">
<div class="content__header">News</div>
{% 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 %}
</div>
<div class="clear"></div>
</div>
{% endblock %}