lib.itmens/catalog/templates/_item_card.html

36 lines
1.1 KiB
HTML
Raw Normal View History

{% load i18n %}
2023-05-22 22:12:41 -04:00
{% if allow_embed and item.get_embed_link %}
<div class="item player">
<h5>
<a href="{{ item.url }}">{{ item.title }}</a>
<small>
{% if not hide_category %}<span class="category">[{{ item.category.label }}]</span>{% endif %}
<span class="site-list">
{% for res in item.external_resources.all %}
2023-07-20 21:59:49 -04:00
<a href="{{ res.url }}" class="{{ res.site_name }}">{{ res.site_label }}</a>
{% endfor %}
</span>
</small>
</h5>
<iframe src="{{ item.get_embed_link }}"
frameborder="0"
allowtransparency="true"
allow="encrypted-media"
style="width: 100%;
height: 120px"></iframe>
</div>
{% else %}
<div class="item">
<div class="cover">
<a href="{{ item.url }}">
<img src="{{ item.cover_image_url }}" alt="cover" />
</a>
</div>
2023-06-09 02:23:15 -04:00
<div>
{% with "_item_card_metadata_"|add:item.class_name|add:".html" as template %}
{% include template %}
{% endwith %}
</div>
</div>
{% endif %}