Links can be bookmarked for a later look via a toggle button on the card (🏷️/🔖), shown with a yellow border while flagged. A new sidebar section "Merkliste" links to /?review=1, filtering to just the flagged links; the count updates live via the existing facets query. Since the project has no migration framework, add a minimal startup check that ALTER TABLEs in the needs_review column for existing SQLite databases (create_all only creates missing tables). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
64 lines
2.3 KiB
HTML
64 lines
2.3 KiB
HTML
<div class="panel link-card {% if link.needs_review %}needs-review{% endif %}" id="link-{{ link.id }}">
|
||
<div class="card-head">
|
||
<span class="card-avatar" style="--h: {{ link.url | hue }};">
|
||
{{ (link.url | domain)[:1] | upper or '?' }}
|
||
</span>
|
||
|
||
<div class="card-badges">
|
||
{% if link.category %}
|
||
<span class="badge badge-cat">{{ link.category }}</span>
|
||
{% endif %}
|
||
{% if link.manufacturer %}
|
||
<span class="badge badge-man">{{ link.manufacturer }}</span>
|
||
{% endif %}
|
||
</div>
|
||
|
||
<div class="card-actions">
|
||
<button class="ghost review-toggle {% if link.needs_review %}active{% endif %}"
|
||
style="padding:3px 7px; font-size:.8rem;"
|
||
title="{% if link.needs_review %}Nicht mehr zur Durchsicht{% else %}Zur Durchsicht markieren{% endif %}"
|
||
hx-post="/links/{{ link.id }}/toggle-review"
|
||
hx-target="#link-{{ link.id }}"
|
||
hx-swap="outerHTML">{% if link.needs_review %}🔖{% else %}🏷️{% endif %}</button>
|
||
<button class="ghost" style="padding:3px 7px; font-size:.8rem;"
|
||
title="Bearbeiten"
|
||
hx-get="/links/{{ link.id }}/edit"
|
||
hx-target="#link-{{ link.id }}"
|
||
hx-swap="outerHTML">✎</button>
|
||
<button class="danger" style="padding:3px 6px;"
|
||
title="Löschen"
|
||
hx-delete="/links/{{ link.id }}"
|
||
hx-target="#link-{{ link.id }}"
|
||
hx-swap="outerHTML"
|
||
hx-confirm="Diesen Link wirklich löschen?">✕</button>
|
||
</div>
|
||
</div>
|
||
|
||
<a href="{{ link.url }}" target="_blank" rel="noopener" class="card-title">
|
||
{{ link.title or link.url }}
|
||
</a>
|
||
|
||
<p class="card-summary">
|
||
{%- if link.summary -%}
|
||
{{ link.summary }}
|
||
{%- elif link.status == 'no_content' -%}
|
||
Inhalt konnte nicht abgerufen werden – Kategorisierung anhand der URL.
|
||
{%- endif -%}
|
||
</p>
|
||
|
||
<div class="card-spacer"></div>
|
||
|
||
{% if link.tag_list %}
|
||
<div class="card-tags">
|
||
{% for tag in link.tag_list %}
|
||
<span class="badge badge-tag">#{{ tag }}</span>
|
||
{% endfor %}
|
||
</div>
|
||
{% endif %}
|
||
|
||
<div class="card-foot">
|
||
<span class="card-domain" title="{{ link.url }}">{{ link.url | domain }}</span>
|
||
<span title="hinzugefügt am {{ link.created_at | datum }}">{{ link.created_at | datum }}</span>
|
||
</div>
|
||
</div>
|