Files
folkugat-web/folkugat_web/assets/templates/fragments/temes/result.html
2025-10-05 20:54:04 +02:00

47 lines
1.3 KiB
HTML

<li class="flex flex-col
items-center
m-4 rounded-lg
bg-white">
<div class="flex flex-col items-start py-4 text-left w-full max-w-[655px]">
<div class="px-4 text-black font-bold">
<a href="/tema/{{ tema.id }}">
{{ tema.title }}
</a>
</div>
<div class="px-4 text-sm text-gray-500">
{% if tema.stats %}
Tocat {{ tema.stats.times_played }}
{% if tema.stats.times_played == 1 %}
cop
{% else %}
cops
{% endif %}
{% else %}
No s'ha tocat mai
{% endif %}
</div>
{% if tema.properties %}
<ul class="flex flex-wrap text-sm px-3">
{% for property in tema.properties %}
<button class="bg-beige text-white rounded
m-1 px-2"
hx-get="/api/content/temes"
hx-target="#content"
hx-include="[name=query]"
hx-vars="properties:{{ add_property_str(property.value) }}"
hx-swap="innerHTML"
>
{{ property.value }}
</button>
{% endfor %}
</ul>
{% endif %}
{% if tema.main_score() and tema.main_score().preview_url %}
<a href="/tema/{{ tema.id }}">
<img class="px-4"
src="{{ tema.main_score().preview_url }}" />
</a>
{% endif %}
</div>
</li>