news-reader-php/templates/bucket/index.html.twig
Daniel Siepmann 8efad3e1fd
Add import of feed entries
Basic import of entries from feeds.
Also make imported feeds accessible in frontend.
2020-05-29 00:44:32 +02:00

24 lines
733 B
Twig
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends 'base.html.twig' %}
{% block title %}{{ bucket.name }} | {{ parent() }}{% endblock %}
{% block body %}
<header>
<h1>Bucket: {{ bucket.name }} <small>with {{ bucket.feeds | length }} feeds</small></h1>
<nav> </nav>
</header>
{# TODO: collect newest entries of all feeds in controller #}
{{ include('feed/entries.html.twig', {entries: bucket.feeds.first.entries | slice(0, 10) }) }}
<aside>
<h1>Feeds in this bucket</h1>
<ul>
{% for feed in bucket.feeds %}
<li>
<a href="{{ path('feed', {slug: feed.slug}) }}">{{ feed.name }}</a>
</li>
{% endfor %}
</ul>
</aside>
{% endblock %}