feat(ui): apply pure white glassmorphism capsules to balance and student code on cards
This commit is contained in:
+44
-4
@@ -4397,13 +4397,53 @@ body.dark-mode .carousel-nav-btn {
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
CÁPSULAS TRANSLÚCIDAS GLASSMORPHISM EN TARJETA VIRTUAL (SALDO Y CÓDIGO)
|
||||
========================================================================== */
|
||||
.card-balance-glass,
|
||||
.wallet-card .amount span#walletBalance,
|
||||
.wallet-card #walletBalance {
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
background: rgba(0, 0, 0, 0.52) !important;
|
||||
backdrop-filter: blur(8px) !important;
|
||||
-webkit-backdrop-filter: blur(8px) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.28) !important;
|
||||
color: #ffffff !important;
|
||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
|
||||
border-radius: 12px !important;
|
||||
padding: 4px 14px !important;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28) !important;
|
||||
font-weight: 900 !important;
|
||||
letter-spacing: -0.5px !important;
|
||||
}
|
||||
|
||||
.card-glass-badge,
|
||||
#devLiveCardCode,
|
||||
#walletStudentCode {
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
background: rgba(0, 0, 0, 0.52) !important;
|
||||
backdrop-filter: blur(8px) !important;
|
||||
-webkit-backdrop-filter: blur(8px) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.25) !important;
|
||||
color: #ffffff !important;
|
||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
|
||||
font-size: 0.74rem !important;
|
||||
font-weight: 800 !important;
|
||||
padding: 2.5px 9px !important;
|
||||
border-radius: 8px !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22) !important;
|
||||
letter-spacing: 0.4px !important;
|
||||
}
|
||||
|
||||
.wallet-card.card-text-light-bg .amount span,
|
||||
.wallet-card.card-style-light .amount span,
|
||||
.wallet-card.card-text-light-bg #walletBalance,
|
||||
.wallet-card.card-style-light #walletBalance {
|
||||
color: #047857 !important;
|
||||
color: #ffffff !important;
|
||||
font-weight: 900 !important;
|
||||
text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
|
||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
|
||||
}
|
||||
|
||||
.wallet-card.card-text-light-bg .qr-toggle-btn,
|
||||
@@ -4439,8 +4479,8 @@ body.dark-mode .carousel-nav-btn {
|
||||
.wallet-card.card-style-dark .amount span,
|
||||
.wallet-card.card-text-dark-bg #walletBalance,
|
||||
.wallet-card.card-style-dark #walletBalance {
|
||||
color: #4ade80 !important;
|
||||
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95) !important;
|
||||
color: #ffffff !important;
|
||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
|
||||
}
|
||||
|
||||
.wallet-card.card-text-dark-bg .qr-toggle-btn,
|
||||
|
||||
+8
-5
@@ -397,10 +397,10 @@
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-end;">
|
||||
<div>
|
||||
<div id="devLiveCardBalLabel" style="font-size: 0.65rem; font-weight: 800; text-transform: uppercase; color: #cbd5e1; letter-spacing: 0.5px;">Saldo Disponible</div>
|
||||
<div id="devLiveCardBalValue" style="font-size: 1.25rem; font-weight: 900; color: #4ade80; text-shadow: 0 2px 10px rgba(0,0,0,0.95);">₡5.300</div>
|
||||
<div id="devLiveCardBalLabel" style="font-size: 0.65rem; font-weight: 800; text-transform: uppercase; color: #cbd5e1; letter-spacing: 0.5px; margin-bottom: 4px;">Saldo Disponible</div>
|
||||
<div id="devLiveCardBalValue" class="card-balance-glass" style="font-size: 1.25rem; font-weight: 900;">₡5.300</div>
|
||||
</div>
|
||||
<div id="devLiveCardCode" style="font-size: 0.72rem; font-weight: 800; color: #ffffff; background: rgba(0,0,0,0.5); padding: 3px 8px; border-radius: 6px; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.2);">EST-2026-00001</div>
|
||||
<div id="devLiveCardCode" class="card-glass-badge">EST-2026-00001</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2164,16 +2164,19 @@
|
||||
<div class="student-meta" style="flex: 1; min-width: 0;">
|
||||
<div style="min-width: 0;">
|
||||
<h2 id="walletName" style="word-break: break-word; margin: 0; font-size: 1.15rem; font-weight: 800;">Cargando...</h2>
|
||||
<div style="display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px;">
|
||||
<span id="walletGrade" class="student-grade">Grado y Sección</span>
|
||||
<span id="walletStudentCode" class="card-glass-badge">Cód: EST-00000</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="balance-row">
|
||||
<div class="balance-col">
|
||||
<div class="label" id="balanceLabel">SALDO DISPONIBLE</div>
|
||||
<div class="label" id="balanceLabel" style="margin-bottom: 4px;">SALDO DISPONIBLE</div>
|
||||
<div class="amount">
|
||||
<span id="walletBalance">₡0</span>
|
||||
<span id="walletBalance" class="card-balance-glass">₡0</span>
|
||||
<span class="kids-coin-icon" id="kidsCoinIcon" style="display: none;"></span>
|
||||
</div>
|
||||
<!-- Desglose transparente cuando hay pre-órdenes flotantes -->
|
||||
|
||||
+16
-6
@@ -749,7 +749,13 @@ function updateStudentUI() {
|
||||
}
|
||||
}
|
||||
document.getElementById('walletName').textContent = currentStudent.nombre_completo;
|
||||
document.getElementById('walletGrade').textContent = `${currentStudent.grado} • Sección ${currentStudent.seccion}`;
|
||||
const codeEl = document.getElementById('walletStudentCode');
|
||||
if (codeEl) {
|
||||
codeEl.textContent = `Cód: ${currentStudent.codigo_estudiante || ''}`;
|
||||
} else {
|
||||
document.getElementById('walletGrade').textContent = `${currentStudent.grado} • Sección ${currentStudent.seccion} • Cód: ${currentStudent.codigo_estudiante}`;
|
||||
}
|
||||
|
||||
// Aplicar tema personalizado de tarjeta
|
||||
if (typeof applyCardTheme === 'function' && typeof getSavedCardTheme === 'function') {
|
||||
@@ -7591,7 +7597,8 @@ function renderCardDesignsCarousel() {
|
||||
const currentTheme = getSavedCardTheme();
|
||||
const avatarUrl = (currentStudent && currentStudent.foto_url) ? currentStudent.foto_url : 'https://api.dicebear.com/7.x/bottts/svg?seed=est';
|
||||
const studentName = (currentStudent && currentStudent.nombre_completo) ? currentStudent.nombre_completo : 'Mateo Alvarado Castro';
|
||||
const studentGrade = (currentStudent && currentStudent.grado) ? `${currentStudent.grado} • Sección ${currentStudent.seccion || 'A'} • Cód: ${currentStudent.codigo_estudiante || 'EST-001'}` : '2° Grado • Sección 2-A • Cód: EST-2026-001';
|
||||
const studentGradeOnly = (currentStudent && currentStudent.grado) ? `${currentStudent.grado} • Sección ${currentStudent.seccion || 'A'}` : '2° Grado • Sección 2-A';
|
||||
const studentCodeOnly = (currentStudent && currentStudent.codigo_estudiante) ? currentStudent.codigo_estudiante : 'EST-2026-001';
|
||||
const studentBalance = (currentStudent && currentStudent.saldo_colones !== undefined) ? currentStudent.saldo_colones.toLocaleString('es-CR') : '5.300';
|
||||
|
||||
container.innerHTML = themes.map((t, idx) => {
|
||||
@@ -7610,14 +7617,17 @@ function renderCardDesignsCarousel() {
|
||||
<div class="student-avatar">${getStudentInitials(studentName)}</div>
|
||||
<div class="student-meta" style="flex: 1; min-width: 0;">
|
||||
<h2 style="margin: 0; font-size: 1.05rem; font-weight: 800; word-break: break-word;">${studentName}</h2>
|
||||
<span class="student-grade" style="font-size: 0.72rem;">${studentGrade}</span>
|
||||
<div style="display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px;">
|
||||
<span class="student-grade" style="font-size: 0.72rem;">${studentGradeOnly}</span>
|
||||
<span class="card-glass-badge">Cód: ${studentCodeOnly}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="balance-row">
|
||||
<div class="balance-col">
|
||||
<div class="label" style="font-size: 0.68rem; font-weight: 800;">SALDO DISPONIBLE</div>
|
||||
<div class="label" style="font-size: 0.68rem; font-weight: 800; margin-bottom: 3px;">SALDO DISPONIBLE</div>
|
||||
<div class="amount">
|
||||
<span style="font-size: 1.35rem; font-weight: 900;">₡${studentBalance}</span>
|
||||
<span class="card-balance-glass" style="font-size: 1.25rem; font-weight: 900;">₡${studentBalance}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; gap: 4px; align-items: center;">
|
||||
@@ -8156,13 +8166,13 @@ function updateDevCardLivePreview() {
|
||||
if (textStyle === 'light') {
|
||||
if (cardName) { cardName.style.color = '#0f172a'; cardName.style.textShadow = '0 1px 2px rgba(255,255,255,0.9)'; }
|
||||
if (cardGrade) { cardGrade.style.color = '#334155'; cardGrade.style.textShadow = 'none'; }
|
||||
if (cardBalVal) { cardBalVal.style.color = '#047857'; cardBalVal.style.textShadow = '0 1px 2px rgba(255,255,255,0.8)'; }
|
||||
if (cardBalVal) { cardBalVal.style.color = '#ffffff'; cardBalVal.style.textShadow = '0 1px 3px rgba(0,0,0,0.8)'; }
|
||||
if (cardBalLbl) { cardBalLbl.style.color = '#334155'; }
|
||||
if (cardBrand) { cardBrand.style.color = '#0f172a'; cardBrand.style.textShadow = '0 1px 2px rgba(255,255,255,0.8)'; }
|
||||
} else {
|
||||
if (cardName) { cardName.style.color = '#ffffff'; cardName.style.textShadow = '0 2px 8px rgba(0,0,0,0.9)'; }
|
||||
if (cardGrade) { cardGrade.style.color = '#cbd5e1'; cardGrade.style.textShadow = '0 2px 6px rgba(0,0,0,0.9)'; }
|
||||
if (cardBalVal) { cardBalVal.style.color = '#4ade80'; cardBalVal.style.textShadow = '0 2px 10px rgba(0,0,0,0.95)'; }
|
||||
if (cardBalVal) { cardBalVal.style.color = '#ffffff'; cardBalVal.style.textShadow = '0 1px 3px rgba(0,0,0,0.8)'; }
|
||||
if (cardBalLbl) { cardBalLbl.style.color = '#cbd5e1'; }
|
||||
if (cardBrand) { cardBrand.style.color = '#ffffff'; cardBrand.style.textShadow = '0 2px 8px rgba(0,0,0,0.8)'; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user