PICK SEA styling: deck backs, card rank+icon display, fa-hand-dots Major Arcana — TDD
- migration 0010: icon='fa-hand-dots' for all Earthman Major Arcana number >= 2 (Nomad/Schizo kept empty for distinct icons later) - sea_deck view: switch from .values() to model instances; serializes corner_rank + suit_icon computed properties alongside DB fields - sea overlay JS: _fillPos() renders <span class=fan-corner-rank> + <i fa-solid> HTML; tracks levity/gravity source via sea-card-slot--levity/gravity class; _reset() strips polarity classes; _showOk/_hideOk toggle sea-deck-stack--active - template: gravity deck before levity; OK btn inside .sea-stack-face (absolute center); DECKS label (vertical-rl CCW) on stacks left; Gravity/Levity names under each pile - _card-deck.scss: .sea-stacks-label (vertical-rl); .sea-stack-ok (absolute center on face); .sea-stack-name w. --quaUser/--terUser; glow on hover+:active+--active class — --ninUser for levity, --quaUser for gravity; sea-sig-card compact rank+icon display - sea_partial view: ctx['room'] fix carried in from Sprint B Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
49
src/apps/epic/migrations/0010_major_arcana_hand_dots_icon.py
Normal file
49
src/apps/epic/migrations/0010_major_arcana_hand_dots_icon.py
Normal file
@@ -0,0 +1,49 @@
|
||||
"""Assign fa-hand-dots icon to all Earthman Major Arcana cards with number >= 2.
|
||||
|
||||
Cards 0 (The Nomad) and 1 (The Schizo) keep their existing icon value so they
|
||||
can receive distinct icons later. All other Major Arcana groups (Popes, Implicit
|
||||
Virtues, Elements, Realms, Explicit Virtues, Zodiac, Lunars, Planets, Inner Rings,
|
||||
polarity-split finals) default to fa-hand-dots until per-group icons are assigned.
|
||||
"""
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def assign_hand_dots(apps, schema_editor):
|
||||
TarotCard = apps.get_model("epic", "TarotCard")
|
||||
DeckVariant = apps.get_model("epic", "DeckVariant")
|
||||
try:
|
||||
earthman = DeckVariant.objects.get(slug="earthman")
|
||||
except DeckVariant.DoesNotExist:
|
||||
return
|
||||
TarotCard.objects.filter(
|
||||
deck_variant=earthman,
|
||||
arcana="MAJOR",
|
||||
number__gte=2,
|
||||
icon="",
|
||||
).update(icon="fa-hand-dots")
|
||||
|
||||
|
||||
def clear_hand_dots(apps, schema_editor):
|
||||
TarotCard = apps.get_model("epic", "TarotCard")
|
||||
DeckVariant = apps.get_model("epic", "DeckVariant")
|
||||
try:
|
||||
earthman = DeckVariant.objects.get(slug="earthman")
|
||||
except DeckVariant.DoesNotExist:
|
||||
return
|
||||
TarotCard.objects.filter(
|
||||
deck_variant=earthman,
|
||||
arcana="MAJOR",
|
||||
number__gte=2,
|
||||
icon="fa-hand-dots",
|
||||
).update(icon="")
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("epic", "0009_schizo_card_ref_spans"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(assign_hand_dots, reverse_code=clear_hand_dots),
|
||||
]
|
||||
Reference in New Issue
Block a user