njpma/app/templates/films.html

55 lines
1.4 KiB
HTML
Raw Permalink Normal View History

2021-09-28 13:10:22 +00:00
{% extends "base.html" %}
{% block body_class%}animated animated-text{% endblock %}
2021-09-28 13:10:22 +00:00
{% block main %}
2021-10-28 16:19:16 +00:00
2021-10-28 16:33:47 +00:00
<div class="films">
2022-01-27 14:42:48 +00:00
<div class="actions">
<strong>Filter:</strong>
<select id="filter-select">
2022-01-28 16:03:23 +00:00
<option value="" selected>All Types</option>
2022-01-27 14:42:48 +00:00
{% for type in types %}
<option value="{{ type.value }}">{{ type.title }}</option>
{% endfor %}
</select>
2021-10-28 16:29:44 +00:00
<strong>Sort:</strong>
<select id="sort-select">
<option value="title">Title</option>
2022-01-27 14:42:48 +00:00
<option value="year">Year</option>
2021-10-28 16:29:44 +00:00
<option value="duration">Duration</option>
</select>
</div>
2021-10-28 16:33:47 +00:00
<div id="films-list">
{% for film in films %}
<div class="film"
data-position="{{ film.position }}"
data-title="{{ film.data.title }}"
2022-01-27 14:42:48 +00:00
data-year="{{ film.data.year|default:"9999" }}"
data-duration="{{ film.duration_seconds }}"
data-type="{{ film.data.type|join:"," }}"
2021-10-28 16:33:47 +00:00
>
2021-11-12 10:21:00 +00:00
<a href="{{ film.get_absolute_url }}">
<figure>
<div>
{% for item in film.data.items %}
2021-11-24 11:45:15 +00:00
<img src="{{ stream_prefix }}/{{ item.id }}/480p.jpg">
2021-11-12 10:21:00 +00:00
{% endfor %}
</div>
2021-11-22 09:20:10 +00:00
<figcaption>
2021-11-24 11:45:15 +00:00
<img src="{{ stream_prefix }}/{{ film.data.items.0.id }}/timeline64p.jpg">
2021-11-22 09:20:10 +00:00
</figcaption>
2021-11-12 10:21:00 +00:00
<figcaption>
2021-11-22 12:59:43 +00:00
{{ film.data.title | safe }}
{% if film.data.date %}({{ film.data.date|safe}}){% endif %}
2021-11-12 10:21:00 +00:00
</figcaption>
</figure>
</a>
2021-10-28 16:33:47 +00:00
</div>
{% endfor %}
2021-09-30 18:33:47 +00:00
</div>
</div>
2021-09-28 13:10:22 +00:00
{% endblock %}
2021-10-28 16:19:16 +00:00
{% block end %}
2021-11-12 10:21:00 +00:00
<script src="{% static 'js/films.js' %}"></script>
{% endblock %}