diff --git a/src/apps/epic/migrations/0021_rename_earthman_major_arcana_batch_2.py b/src/apps/epic/migrations/0021_rename_earthman_major_arcana_batch_2.py new file mode 100644 index 0000000..d2022f2 --- /dev/null +++ b/src/apps/epic/migrations/0021_rename_earthman_major_arcana_batch_2.py @@ -0,0 +1,56 @@ +""" +Data migration: rename/update six Earthman Major Arcana cards. + + 13 name: "Death" → "King Death & the Cosmic Tree" + 14 name: "The Traitor" → "The Great Hunt" + 15 correspondence: "The Tower / La Torre" → "The House of the Devil / Inferno" + 16 correspondence: "Purgatorio" → "The Tower / La Torre / Purgatorio" + 50 name/slug: "The Eagle" → "The Mould of Man" + 51 name/slug: "Divine Calculus" → "The Eagle" +""" +from django.db import migrations + + +FORWARD = { + 13: dict(name="King Death & the Cosmic Tree", slug="king-death-and-the-cosmic-tree"), + 14: dict(name="The Great Hunt", slug="the-great-hunt"), + 15: dict(correspondence="The House of the Devil / Inferno"), + 16: dict(correspondence="The Tower / La Torre / Purgatorio"), + 50: dict(name="The Mould of Man", slug="the-mould-of-man"), + 51: dict(name="The Eagle", slug="the-eagle"), +} + +REVERSE = { + 13: dict(name="Death", slug="death-em"), + 14: dict(name="The Traitor", slug="the-traitor"), + 15: dict(correspondence="The Tower / La Torre"), + 16: dict(correspondence="Purgatorio"), + 50: dict(name="The Eagle", slug="the-eagle"), + 51: dict(name="Divine Calculus",slug="divine-calculus"), +} + + +def apply(changes): + def fn(apps, schema_editor): + TarotCard = apps.get_model("epic", "TarotCard") + DeckVariant = apps.get_model("epic", "DeckVariant") + earthman = DeckVariant.objects.filter(slug="earthman").first() + if not earthman: + return + # Process in sorted order so card 50 vacates "the-eagle" slug before card 51 claims it. + for number in sorted(changes): + TarotCard.objects.filter( + deck_variant=earthman, arcana="MAJOR", number=number + ).update(**changes[number]) + return fn + + +class Migration(migrations.Migration): + + dependencies = [ + ("epic", "0020_rename_earthman_pope_cards_2_5"), + ] + + operations = [ + migrations.RunPython(apply(FORWARD), reverse_code=apply(REVERSE)), + ] diff --git a/src/static_src/scss/_game-kit.scss b/src/static_src/scss/_game-kit.scss index eefa60b..1f98b2a 100644 --- a/src/static_src/scss/_game-kit.scss +++ b/src/static_src/scss/_game-kit.scss @@ -142,6 +142,13 @@ // ── Game Kit page ──────────────────────────────────────────────────────────── +#id_game_kit_applets_container { + flex: 1; + min-height: 0; + display: flex; + flex-direction: column; +} + #id_game_kit_applets_container section { display: flex; flex-direction: column;