feat(tags): fandom-less character nudges
Adds a header counter ('⚠ N characters need a fandom') that filters to
?null_fandom=1, plus an inline chip on each qualifying character card.
Backend accepts null_fandom_only in the list query.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,9 @@
|
||||
{%- else -%}#{%- endif -%}
|
||||
</span>
|
||||
<span class="tag-name" title="{{ tag.name }}">{{ tag.name }}</span>
|
||||
{% if tag.kind == 'character' and tag.fandom_id is none and not show_null_fandom_filter %}
|
||||
<span class="character-no-fandom-chip" title="This character has no fandom — click to assign">⚠ No fandom</span>
|
||||
{% endif %}
|
||||
<span class="tag-count">{{ tag.count }}</span>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -80,6 +80,20 @@
|
||||
aria-current="{{ 'page' if active_kind=='user' else 'false' }}"># User</a>
|
||||
</div>
|
||||
|
||||
{% if null_fandom_character_count > 0 and not show_null_fandom_filter %}
|
||||
<a href="{{ url_for('main.tag_list', kind='character', null_fandom=1) }}"
|
||||
class="null-fandom-counter-link">
|
||||
⚠ {{ null_fandom_character_count }} character{{ 's' if null_fandom_character_count != 1 }} need a fandom
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if show_null_fandom_filter %}
|
||||
<div class="null-fandom-filter-active">
|
||||
Showing characters without a fandom.
|
||||
<a href="{{ url_for('main.tag_list', kind='character') }}">Clear filter</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if tag_data %}
|
||||
<div class="tag-grid" id="tagGrid">
|
||||
{% include '_tag_cards.html' %}
|
||||
|
||||
Reference in New Issue
Block a user