{% 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) }}
<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 class="clear"></div>
{% endblock %}