fix card badges to have better rarity visibility and other bugfixes

This commit is contained in:
badblocks 2025-04-06 22:33:01 -07:00
parent 37d8bd5981
commit 262f0ea190
14 changed files with 4515 additions and 1255 deletions

View file

@ -1,4 +1,4 @@
# Generated by Django 5.1.2 on 2025-03-31 22:48
# Generated by Django 5.1.2 on 2025-04-07 04:19
import django.db.models.deletion
from django.db import migrations, models

View file

@ -45,5 +45,7 @@ def update_card_style(sender, instance, action, **kwargs):
else:
instance.style = "background: linear-gradient(to right, #AAAAAA, #AAAAAA, #AAAAAA);"
if not color_is_dark(decks.first().hex_color):
instance.style += "color: var(--color-gray-700);"
instance.style += "color: var(--color-gray-700); text-shadow: 0 0 0 var(--color-gray-700);"
else:
instance.style += "text-shadow: 0 0 0 #fff;"
instance.save(update_fields=["style"])