woodwind/woodwind/templates/_entry.jinja2
2016-06-22 05:21:44 +00:00

101 lines
3 KiB
Django/Jinja

{% for context in entry.reply_context %}
<article class="reply-context">
<header>
{% if context.author_photo %}
<img src="{{context.author_photo|proxy_image}}"/>
{% endif %}
{% if context.author_name %}
{{ context.author_name }} -
{% endif %}
{{ context.permalink | domain_for_url }}
</header>
{% if context.title %}
<h1>{{ context.title|e }}</h1>
{% endif %}
{% if context.content %}
<div class="content">
{{ context.content_cleaned | proxy_all | add_preview }}
</div>
{% endif %}
<footer>
<a class="permalink" href="{{ context.permalink }}">
<time datetime="{{ context.published | isoformat }}">
{{ context.published | relative_time }}
</time>
</a>
</footer>
</article>
{% endfor %}
<article>
<details><summary><header>
{% if entry.author_photo %}
<img src="{{entry.author_photo|proxy_image}}"/>
{% endif %}
{% if entry.author_name %}
{{ entry.author_name }} -
{% endif %}
{% if entry.subscription %}
<a href="{{ entry.subscription.feed.origin }}">{{ entry.subscription.name }}</a>
<span style="font-size: 0.8em; float: right;">
<a href="{{ url_for('.index', subscription=entry.subscription.id) }}">more from this feed</a>
</span>
{% endif %}
</header>
{% if entry.title %}
<h1>{{ entry.title|e }}</h1>
{% endif %}
</summary>
{% if entry.get_property('event') %}
<p>
{% if entry.get_property('start') %}
<strong>start:</strong> {{ entry.get_property('start') }}
{% endif %}
<br/>
{% if entry.get_property('end') %}
<strong>end:</strong> {{ entry.get_property('end') }}
{% endif %}
</p>
{% endif %}
{% set photo = entry.get_property('photo') %}
{% if photo and (not entry.content or '<img' not in entry.content) %}
<div class="photo">
<img src="{{ photo | proxy_image }}" />
</div>
{% endif %}
{% if entry.content %}
<div class="content">
{{ entry.content_cleaned | proxy_all | add_preview }}
</div>
{% endif %}
</details>
<footer>
{% set location = entry.get_property('location') %}
{% if location and 'name' in location %}
<div>
<code>@</code> {% if 'url' in location %}<a href="{{ location.url }}">{{ location.name }}</a>{% else %}{{ location.name }}{% endif %}
</div>
{% endif %}
<a class="permalink" href="{{ entry.permalink }}">
<time datetime="{{ entry.published | isoformat }}">
{{ entry.published | relative_time }}
</time>
</a>
<a href="{{ url_for('.index', entry=entry.permalink) }}" target="_blank">
<i class="fa fa-external-link"></i>
</a>
{% if entry.get_property('syndication') %}
| {% for synd in entry.get_property('syndication') %} <a href="{{ synd }}">{{ synd | domain_for_url}}</a>{% endfor %}
{% endif %}
<div class="reply-area closed">
{% include '_reply.jinja2' with context %}
</div>
</footer>
</article>