{% extends "v2/layout.html" %} {% import "v2/macros.html" as macros %} {% block page_title %} {% if not feed %} Entries {% else %} {{ feed.resolved_title or feed.url }} {% endif %} - reader {% endblock %} {% block main_title %} {% if not feed %} Entries {% else %} {{ feed.resolved_title or feed.url }} {% endif %} {% endblock %} {% block body %}
{# TODO: if data or error #} {% if form.search.data %}{{ macros.input(form.search, 'search') }}{% endif %} {% if form.feed_tags.data %}{{ macros.input(form.feed_tags, 'tag') }}{% endif %}
{% for entry in entries %}

{{- (entry.title or 'untitled') | striptags | truncate(95) -}} {#- NOTE: there must be no whitespace between the last word and the icon -#} {#- TODO: aria stuff -#} {%- if entry.link -%} {# #}{# #} {%- endif %}

{# TODO: show marked search results; title too! #} {% set summary = entry.get_content(prefer_summary=True).value | striptags | trim %} {% if summary %}

{{ summary | truncate(223) }}

{% endif %} {% set next_index = loop.index if not loop.last else loop.index - 1 -%} {% set next = url_for('.entries', **request.args) + '#entry-' + (next_index|string) %}
{#- TODO: aria stuff #} {% block entry_form scoped %}
{% for enclosure in entry.enclosures[:1] -%} {%- set links = additional_enclosure_links(enclosure, entry) | list -%} {%- set _ = links.append(('', enclosure.href)) -%} {%- set link = links[0][1] -%} {%- endfor %} {% endblock %}
{% else %}

no entries found

{% endfor %} {% endblock %}