diff --git a/frontend/css/estilos.css b/frontend/css/estilos.css index 6dac0f5..8106c24 100644 --- a/frontend/css/estilos.css +++ b/frontend/css/estilos.css @@ -10,8 +10,9 @@ --color-secundario: #1E3560; /* Azul medio-oscuro */ --color-borde: #2D4A7A; /* Borde azulado */ --color-acento: #C9A84C; /* Dorado litúrgico */ - --color-texto: #D8E4F5; /* Texto claro (header) */ - --color-texto-suave: #6B5040; /* Texto suave (tarjetas) */ + --color-texto-header:#D8E4F5; /* Texto header */ + --color-texto-suave: #6B5040; /* Texto general */ + --color-texto: #2A1C10; /* Texto general oscuro */ --blanco-puro: #FFFFFF; --sombra: rgba(0, 0, 0, 0.45); --color-santo: var(--blanco-puro); @@ -74,13 +75,14 @@ body { margin-top: 0.3rem; font-family: 'EB Garamond', serif; opacity: 0.85; - color: var(--color-texto-suave); + color: var(--color-texto-header); } .ciclo { letter-spacing: 2px; margin-top: 0.2rem; font-family: 'EB Garamond', serif; + color: var(--color-texto-header); } @@ -94,7 +96,7 @@ body { font-weight: 600; font-size: 0.85rem; border: 1px solid rgba(255,255,255,0.1); - color: var(--color-texto); + color: var(--color-texto-header); } .color-dia { @@ -141,7 +143,7 @@ body { margin-top: 0px; font-size: 0.9rem; font-style: italic; - color: var(--color-secundario); + color: var(--color-texto-suave); } .nombre-difunto { diff --git a/frontend/js/intenciones.js b/frontend/js/intenciones.js index 6b464a1..f2c180b 100644 --- a/frontend/js/intenciones.js +++ b/frontend/js/intenciones.js @@ -349,7 +349,15 @@ async function cargarDifuntos() { } if (d.defuncion) { const f = new Date(d.defuncion + "T12:00:00"); - etiquetas.push(`✝ ${f.toLocaleDateString("es-ES", { day: "numeric", month: "long", year: "numeric" })}`); + let edadStr = ""; + if (d.nacimiento && !d.nacimiento.includes('XXXX')) { + const nac = new Date(d.nacimiento + "T12:00:00"); + let edad = f.getFullYear() - nac.getFullYear(); + const cumpleEseAnio = new Date(f.getFullYear(), nac.getMonth(), nac.getDate()); + if (f < cumpleEseAnio) edad--; + if (edad >= 0) edadStr = ` · ${edad} años`; + } + etiquetas.push(`✝ ${f.toLocaleDateString("es-ES", { day: "numeric", month: "long", year: "numeric" })}${edadStr}`); } li.innerHTML = `