From 502f875c4d325072f412ea203be6d8c37dd4f058 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 6 Dec 2025 19:22:42 +0000 Subject: [PATCH] . --- cards/templates/cards/_form.html | 8 ++++---- cards/templates/cards/base.html | 10 ++++++++++ cards/templates/cards/list.html | 12 ++++++------ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/cards/templates/cards/_form.html b/cards/templates/cards/_form.html index 698c503..b661e08 100644 --- a/cards/templates/cards/_form.html +++ b/cards/templates/cards/_form.html @@ -121,11 +121,11 @@ const f = fi.files && fi.files[0]; if(f && f.name){ const base = f.name.replace(/\.[^/.]+$/, ''); - const title = base.replace(/[_-]+/g, ' ').split(/\s+/).map(function(w){ return w.length? (w.charAt(0).toUpperCase() + w.slice(1)) : ''; }).join(' ').trim(); - if(title) nameInput.value = title; - } + const title = base.replace(/[_-]+/g, ' ').split(/\s+/).map(function(w){ return w.length? (w.charAt(0).toUpperCase() + w.slice(1)) : ''; }).join(' ').trim(); + if(title) nameInput.value = title; } - } catch(e){ /* ignore */ } + } + } catch(e){ /* ignore */ } }); // Make sure clicking the visual label triggers the input if not already clickable const outerLabel = fi.closest('.file').querySelector('.file-label'); diff --git a/cards/templates/cards/base.html b/cards/templates/cards/base.html index a3b1d41..42b40ca 100644 --- a/cards/templates/cards/base.html +++ b/cards/templates/cards/base.html @@ -78,6 +78,16 @@ .toptrump-card .stat-bar{flex:1;height:12px;background:rgba(255,255,255,0.06);border-radius:8px;overflow:hidden} .toptrump-card .stat-fill{height:100%;background:linear-gradient(90deg,var(--accent),#ffdd57);} .toptrump-card .fact-list{margin-top:0.5rem;padding-left:1rem} + /* Modal form styling for create/edit */ + .modal.is-active .modal-background{background-color:rgba(10,10,10,0.6)} + .modal .modal-content > div{display:flex; justify-content:center} + .modal .card-form.card{max-width:820px; width:100%; padding:1.25rem; border-radius:10px; box-shadow:0 18px 50px rgba(2,6,23,0.35); border:1px solid rgba(0,0,0,0.08); background:var(--card-bg)} + .modal .card-form .field{margin-bottom:0.75rem} + .modal .card-form .label{font-weight:700} + .modal .card-form .file-label .file-cta{background:rgba(0,0,0,0.03); border-radius:6px} + .modal .card-form .buttons{justify-content:flex-end} + .modal .card-form .button.is-primary{min-width:110px} + .modal .card-form .background-picker .bg-option{width:56px;height:40px} diff --git a/cards/templates/cards/list.html b/cards/templates/cards/list.html index cf10f4a..4c7169d 100644 --- a/cards/templates/cards/list.html +++ b/cards/templates/cards/list.html @@ -3,7 +3,7 @@ {% block content %}
-
+
@@ -17,11 +17,11 @@
- {% if card_count is not None %} -
- {{ card_count }} card{% if card_count > 1 %}s{% endif %} -
- {% endif %} + {% if card_count is not None %} +
+ {{ card_count }} card{% if card_count > 1 %}s{% endif %} +
+ {% endif %}