forked from rc/aircox
53 lines
1.7 KiB
HTML
Executable File
53 lines
1.7 KiB
HTML
Executable File
{% comment %}
|
|
Configurable item to be put in a list. Support standard Publication or
|
|
ListItem instance.
|
|
|
|
Options:
|
|
* item: item to render. Fields: title, headline, cover, url, date, info, css_class
|
|
* item_date_format: format passed to the date filter instead of default one. If
|
|
it is an empty string, do not print the date.
|
|
* item_big_cover: cover should is big instead of thumbnail (width: 600)
|
|
{% endcomment %}
|
|
|
|
{% load static %}
|
|
{% load i18n %}
|
|
|
|
{% load wagtailimages_tags %}
|
|
|
|
<a {% if item.url %}href="{{ item.url }}" {% endif %}
|
|
class="list_item {% if not item_big_cover %}flex_row {% endif %}{% if item.css_class %}{{ item.css_class }}{% endif %}">
|
|
{% if item.cover %}
|
|
{% if item_big_cover %}
|
|
{% image item.cover max-640x480 class="cover big" height="" width="" %}
|
|
{% else %}
|
|
{% image item.cover fill-64x64 class="cover small" %}
|
|
{% endif %}
|
|
{% endif %}
|
|
<div class="flex_item">
|
|
<h3 class="title">{{ item.title }}</h3>
|
|
|
|
{% if item.info %}
|
|
<span class="info">{{ item.info|safe }}</span>
|
|
{% endif %}
|
|
|
|
{% if not item.show_in_menus and item.date and item_date_format != '' %}
|
|
{% with date_format=item_date_format|default:'l d F, H:i' %}
|
|
<time datetime="{{ item.date }}">
|
|
{% if item.diffusion %}
|
|
<img src="{% static "aircox/images/clock.png" %}" title="{% trans "Diffusion" %}" class="small_icon">
|
|
{{ item.diffusion.start|date:date_format }}
|
|
{% else %}
|
|
{{ item.date|date:date_format }}
|
|
{% endif %}
|
|
</time>
|
|
{% endwith %}
|
|
{% endif %}
|
|
|
|
</div>
|
|
{% if item.extra %}
|
|
<div class="extra"></div>
|
|
{% endif %}
|
|
</a>
|
|
|
|
|