tooltips app TDD spike + kit bag refactor to .tt
- New apps.tooltips: TooltipContent model, {% tooltip data %} inclusion
tag, _tooltip.html partial with .tt/.tt-title/.tt-description etc.
class contract; 34 tests green
- Kit bag panel (_kit_bag_panel.html): .token-tooltip → .tt + child
class renames (tt-title, tt-description, tt-shoptalk, tt-expiry)
- game-kit.js attachTooltip: .token-tooltip → .tt selector
- SCSS: .tt added alongside .token-tooltip for display:none default +
hover rules in _wallet-tokens.scss and _game-kit.scss
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
69
src/templates/apps/tooltips/_tooltip.html
Normal file
69
src/templates/apps/tooltips/_tooltip.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<div class="tt">
|
||||
|
||||
<h4 class="tt-title">{{ title }}</h4>
|
||||
|
||||
{% if type_label %}<p class="tt-type">{{ type_label }}</p>{% endif %}
|
||||
|
||||
{% if symbol %}<span class="tt-symbol">{{ symbol }}</span>{% endif %}
|
||||
|
||||
{% if degree_str %}<p class="tt-degree">{{ degree_str }}</p>{% endif %}
|
||||
|
||||
{% if description %}<p class="tt-description">{{ description }}</p>{% endif %}
|
||||
|
||||
{% if shoptalk %}<p class="tt-shoptalk"><em>{{ shoptalk }}</em></p>{% endif %}
|
||||
|
||||
{% if expiry %}<p class="tt-expiry">{{ expiry }}</p>{% endif %}
|
||||
|
||||
{% if effect %}<p class="tt-effect">{{ effect }}</p>{% endif %}
|
||||
|
||||
{% if dignities %}
|
||||
<table class="tt-table tt-table--dignities">
|
||||
{% for key, value in dignities.items %}
|
||||
<tr><th>{{ key }}</th><td>{{ value }}</td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if aspects %}
|
||||
<ul class="tt-aspects">
|
||||
{% for asp in aspects %}
|
||||
<li><span class="tt-asp-symbol">{{ asp.symbol }}</span> {{ asp.type }} {{ asp.body }} <span class="tt-asp-orb">{{ asp.orb }}</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if keywords_up or keywords_rev %}
|
||||
<div class="tt-keywords">
|
||||
{% if keywords_up %}
|
||||
<ul class="tt-keywords-up">
|
||||
{% for kw in keywords_up %}<li>{{ kw }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if keywords_rev %}
|
||||
<ul class="tt-keywords-rev">
|
||||
{% for kw in keywords_rev %}<li>{{ kw }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if cautions %}
|
||||
<div class="tt-fyi tt-fyi--cautions">
|
||||
{% for caution in cautions %}
|
||||
<div class="tt-fyi-item">
|
||||
{% if caution.type_label %}<p class="tt-fyi-type">{{ caution.type_label }}</p>{% endif %}
|
||||
{% if caution.shoptalk %}<p class="tt-fyi-shoptalk">{{ caution.shoptalk }}</p>{% endif %}
|
||||
{% if caution.effect %}<p class="tt-fyi-effect">{{ caution.effect }}</p>{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if nav %}
|
||||
<div class="tt-nav">
|
||||
<span class="tt-nav-prv">{{ nav.prv }}</span>
|
||||
<span class="tt-nav-nxt">{{ nav.nxt }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user