25 lines
1,014 B
Twig
25 lines
1,014 B
Twig
{% extends 'master.twig' %}
|
|
{% from '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 %}
|