This repository has been archived on 2026-11-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
videovault/app/web/templates/index.html
T

86 lines
3.1 KiB
HTML

{% block title %}Start — VideoVault{% endblock %}
{% extends "base.html" %}
{% set kind = 'thumb' %}
{% block content %}
<section class="filters-bar">
{% if primaries %}
<div class="filter-group">
<span class="f-label">Nisch:</span>
{% for c in primaries %}
<a class="tag {% if cat == c %}on{% endif %}" href="/?cat={{ c|urlencode }}">{{ c }}</a>
{% endfor %}
</div>
{% endif %}
{% if cats %}
<div class="filter-group wrap">
<span class="f-label">Kanal:</span>
{% for c in cats if c.name.startswith('Kanal:') %}
<a class="tag {% if cat == c.name %}on{% endif %}" href="/?cat={{ c.name|urlencode }}">{{ c.name }}</a>
{% endfor %}
</div>
{% endif %}
{% if cats %}
<div class="filter-group wrap">
<span class="f-label">Övriga:</span>
{% for c in cats if not c.name.startswith('Kanal:') and c.name not in primaries %}
<a class="tag {% if cat == c.name %}on{% endif %}" href="/?cat={{ c.name|urlencode }}">{{ c.name }}</a>
{% endfor %}
</div>
{% endif %}
<form class="order" method="get" action="/">
{% if q %}<input type="hidden" name="q" value="{{ q }}">{% endif %}
{% if cat %}<input type="hidden" name="cat" value="{{ cat }}">{% endif %}
{% if status %}<input type="hidden" name="status" value="{{ status }}">{% endif %}
<select name="order" onchange="this.form.submit()">
<option value="added_at DESC" {% if order=='added_at DESC' %}selected{% endif %}>Senast tillagda</option>
<option value="title ASC" {% if order=='title ASC' %}selected{% endif %}>Titel (A-Ö)</option>
<option value="duration DESC" {% if order=='duration DESC' %}selected{% endif %}>Längst</option>
</select>
</form>
</section>
{% if active %}
<section class="queue">
<h2>Kö / aktivt (<a href="/?status=queued">se alla</a>)</h2>
<div class="grid">
{% for v in active %}
<div class="card">
<div class="media"><span class="badge status">{{ v.status }}</span></div>
<div class="meta"><span class="t">{{ v.title or v.site or v.url }}</span></div>
</div>
{% endfor %}
</div>
</section>
{% endif %}
{% if videos %}
<section class="grid">
{% for v in videos %}
<div class="card" data-id="{{ v.id }}">
<a class="media" href="/video/{{ v.id }}">
{% if v.thumb_path %}
<img loading="lazy" src="{{ media_url(v,'thumb') }}" alt="{{ v.title }}">
<video class="hover-preview" muted preload="none" src="{{ media_url(v,'preview') }}" loop></video>
{% else %}
<div class="ph">🎬</div>
{% endif %}
<span class="dur">{{ v.duration }}s</span>
<span class="res">{{ v.quality }}</span>
</a>
<div class="meta">
<a class="t" href="/video/{{ v.id }}">{{ v.title or v.site }}</a>
<div class="cats">{% for c in (v.categories or '').split(',') if c %}<span class="chip-sm">{{ c }}</span>{% endfor %}</div>
</div>
</div>
{% endfor %}
</section>
<p class="count">{{ total }} träffar</p>
{% else %}
<p class="empty">Inga träffar — lägg till länkar ovan, eller vänta på att kön är klar.</p>
{% endif %}
{% if videos %}
<div style="height:12px"></div>
{% endif %}
{% endblock %}