thumbnail view: Link to collection if known & requested

master
Felix Stupp 2 years ago
parent a2c7ad2bbe
commit e8ee39aa29
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -112,6 +112,7 @@
<h2>Episodes</h2>
{{ macros.media_thumbnail_list(
links=media_links,
link_collection=False,
) }}
{% endif %}
</body>

@ -14,6 +14,7 @@
<h2>Episodes</h2>
{{ macros.media_thumbnail_list(
links=media_links,
link_collection=False,
) }}
</body>
</html>

@ -20,6 +20,7 @@
{% if links_from_pinned_collections %}
{{ macros.media_thumbnail_list(
links=links_from_pinned_collections,
link_collection=True,
) }}
{% else %}
<i>No pinned collections with episodes to watch found. <a href="/collection/pinned">See pinned collections</a></i>

@ -208,6 +208,9 @@
top: 0;
left: 0;
}
.thumbnail_view > .episode_info[href] {
--box-color: rgba(153, 50, 204, .8);
}
.thumbnail_view > .additional_info {
top: 0;
right: 0;
@ -374,6 +377,7 @@
{% macro media_thumbnail_view(
element=None,
link=None,
link_collection=True,
) %}
{% set element = link.element if link else element %}
<div class="thumbnail_entry" id="media_element_{{ element.id }}" title="{{ element.title }}">
@ -387,6 +391,9 @@
{% if link and (link.season or link.episode) %}
<a
class="episode_info"
{% if link_collection -%}
href="{{ link.collection.info_link }}"
{%- endif -%}
>
{%- if link.season != 0 -%}
s{{ "%02d" % link.season }}
@ -432,6 +439,7 @@
{% macro media_thumbnail_list(
elements=None,
links=None,
link_collection=True,
) %}
{%- set l = elements or links -%}
<div class="thumbnail_list">
@ -440,6 +448,7 @@
{{ media_thumbnail_view(
element=o if not links else None,
link=o if links else None,
link_collection=link_collection,
) }}
{% endfor %}
</div>

Loading…
Cancel
Save