From 764092e8dd04ad0a019b7673da19e6e9c2c52961 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 22 Apr 2026 15:59:37 -0400 Subject: [PATCH] refactor(templates): _gallery_item.html KIND_EMOJI dict + display_name Collapses the six-branch prefix-strip expression into a KIND_EMOJI jinja dict. Anchor hrefs use ?tag_id=. Co-Authored-By: Claude Opus 4.7 --- app/templates/_gallery_item.html | 33 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/app/templates/_gallery_item.html b/app/templates/_gallery_item.html index 61bf992..1b0bb3d 100644 --- a/app/templates/_gallery_item.html +++ b/app/templates/_gallery_item.html @@ -10,27 +10,24 @@ {% set visible_tags = image.tags | rejectattr('kind', 'in', ['archive', 'source']) | list %} {% if visible_tags %} + {% set KIND_EMOJI = { + 'artist': '🎨', + 'character': '👤', + 'series': '📺', + 'fandom': '🎭', + 'meta': '⚠️', + 'rating': '⚠️', + 'post': '📌', + 'archive': '📦', + 'user': '#', + } %}