Compare commits

..

No commits in common. "e9ecbcd3d636c67602da01befe2e35204c364d03" and "35a4e18e03ee2ab06421abcc397233a443f0f21e" have entirely different histories.

72 changed files with 322 additions and 37011 deletions

1
biblioteca-cristiana.html Executable file → Normal file
View File

@ -28,7 +28,6 @@
<section id="booksContainer" class="grid"></section>
<script src="js/auth.js"></script>
<script src="js/header.js"></script>
<script src="js/biblioteca.js"></script>
</body>

0
biblioteca-cristiana20260120.html Executable file → Normal file
View File

0
css/biblioteca.css Executable file → Normal file
View File

240
css/estilos.css Executable file → Normal file
View File

@ -2,133 +2,102 @@
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Nunito:wght@400;600&display=swap');
:root {
/* ── Paleta del header (oscura / litúrgica) ── */
--color-fondo: #0D1B2E; /* Azul noche profundo */
--color-tarjeta: #FDFAF3; /* Azul mariano oscuro */
--color-primario: #2B5BA8; /* Azul mariano medio */
--color-hover: #1A3F7A; /* Azul mariano hover */
--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: #EEEEFF; /* Texto suave (header) */
/* Paleta refinada */
--color-primario: #2F3A56; /* Azul noche espiritual */
--color-hover: #24314A; /* Azul noche más oscuro */
--color-secundario: #EAF2FA; /* Azul muy suave */
--color-fondo: #FAF7F2; /* Crema papel antiguo */
--color-texto: #2b2b2b;
--color-acento: #E8A23A; /* Dorado litúrgico */
--blanco-puro: #FFFFFF;
--sombra: rgba(0, 0, 0, 0.45);
--color-santo: var(--blanco-puro);
/* ── Paleta del cuerpo (pergamino / libro antiguo) ── */
--body-fondo: #F4EFE4; /* Pergamino cálido */
--body-tarjeta: #FDFAF3; /* Crema suave */
--body-texto: #2A1C10; /* Sepia oscuro */
--body-texto-suave: #6B5040; /* Sepia medio */
--body-borde: #D5C9AC; /* Beige dorado */
--body-sombra: rgba(0, 0, 0, 0.09);
--sombra: rgba(47, 58, 86, 0.15);
}
body {
margin: 0;
font-family: 'Nunito', sans-serif;
background-color: var(--body-fondo);
color: var(--body-texto);
font-family: 'Nunito', sans-serif; /* Fuente base moderna */
background-color: var(--color-fondo);
color: var(--color-texto);
line-height: 1.6;
}
/* --- CABECERA --- */
.header-hoy {
color: var(--color-texto);
color: var(--blanco-puro);
text-align: center;
min-height: 160px;
padding: 1rem 2rem 0.8rem;
background-color: #060D18; /* Más oscuro que el cuerpo */
border-bottom: 1px solid var(--color-borde);
transition: background-color 0.8s ease;
position: relative;
min-height: 300px; /* ajusta según tu diseño */
padding: 2rem;
background-color: var(--color-primario);
border-bottom: 1px solid #ccc;
transition: background-color 0.8s ease; /* Para que el cambio litúrgico sea suave */
}
.titulo {
font-family: 'EB Garamond', serif;
margin: 0;
font-size: 1.9rem;
font-size: 2.5rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 6px;
color: var(--color-tarjeta);
text-shadow: 1px 1px 6px rgba(0,0,0,0.6);
text-shadow: 2px 2px 4px rgba(255,255,255,0.3);
}
.fecha {
letter-spacing: 2px;
font-size: 0.95rem;
margin-top: 0.3rem;
font-size: 1.2rem;
margin-top: 0.5rem;
font-family: 'EB Garamond', serif;
opacity: 0.85;
color: var(--color-texto-suave);
opacity: 0.9;
}
.ciclo {
letter-spacing: 2px;
margin-top: 0.2rem;
margin-top: 0.3rem;
opacity: 0.8;
font-family: 'EB Garamond', serif;
margin: 0;
font-size: 0.95rem;
color: var(--color-texto-suave);
opacity: 0.8;
font-size: 1.2rem;
}
#indicador-liturgico {
margin-top: 0.6rem;
margin-bottom: 0.8rem;
margin-top: 1.5rem;
margin-bottom: 2.5rem; /* Añadimos este margen para empujar el contenido hacia abajo */
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(255,255,255,0.06);
padding: 5px 14px;
gap: 10px;
background: rgba(255,255,255,0.1);
padding: 8px 20px;
border-radius: 50px;
font-weight: 600;
font-size: 0.85rem;
border: 1px solid rgba(255,255,255,0.1);
color: var(--color-texto);
}
.color-dia {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--color-texto-suave);
border: 2px solid rgba(255,255,255,0.3);
flex-shrink: 0;
}
/* --- BLOQUE DEL SANTO --- */
/*
.santo {
background: var(--color-tarjeta);
margin: 0.6rem auto;
padding: 0.8rem 1.5rem;
border: 1px solid var(--color-acento);
border-radius: 10px;
box-shadow: 0 3px 12px rgba(201, 168, 76, 0.2);
background: var(--blanco-puro);
margin: 20px auto; /* Cambiamos el negativo por uno positivo para dar aire */
padding: 1.5rem;
border: 2px solid var(--color-acento);
border-radius: 12px;
box-shadow: 0 5px 15px rgba(232, 162, 58, 0.5);
position: relative;
z-index: 10;
max-width: 380px;
max-width: 400px;
}
*/
.santo h2 {
font-family: 'EB Garamond', serif;
margin: 0;
font-size: 1.6rem;
color: var(--color-santo);
color: var(--color-primario);
}
#descripcion-santo-del-dia {
margin-top: 5px;
font-size: 0.95rem;
font-style: italic;
color: var(--color-santo);
color: #424242;
}
.santo_discreto {
@ -217,13 +186,13 @@ body {
/* --- BLOQUES DE CONTENIDO --- */
.bloque {
background-color: var(--body-tarjeta);
background-color: var(--blanco-puro);
margin: 2rem auto;
padding: 2rem;
max-width: 600px;
max-width: 600px; /* Para que no se estire demasiado en PC */
border-radius: 15px;
box-shadow: 0 4px 20px var(--body-sombra);
border: 1px solid var(--body-borde);
box-shadow: 0 4px 15px var(--sombra);
border: 2px solid var(--color-acento); /* Quitamos el borde oscuro para que sea más elegante */
text-align: center;
}
@ -297,21 +266,10 @@ body {
font-size: 1.6rem;
line-height: 1.4;
font-style: italic;
color: var(--body-texto);
color: #444;
margin: 0;
}
.bloque h3 {
font-family: 'EB Garamond', serif;
color: var(--color-acento);
font-size: 1.4rem;
margin-top: 0;
}
.bloque p {
color: var(--body-texto-suave);
}
.bloque ul {
list-style: none;
padding: 0;
@ -354,31 +312,23 @@ body {
}
.recursos a {
background: transparent;
background: var(--color-secundario);
color: var(--color-primario);
padding: 10px 15px;
border-radius: 8px;
text-decoration: none;
font-size: 0.9rem;
font-weight: 600;
border: 1px solid var(--color-primario);
transition: background 0.2s, color 0.2s;
}
.recursos a:hover {
background: var(--color-primario);
color: var(--blanco-puro);
}
/* --- ROSARIO --- */
.contenedor_rosario {
background: var(--body-tarjeta);
background: #ffffff;
border-radius: 20px;
padding: 2.5rem;
box-shadow: 0 15px 35px var(--body-sombra);
border: 1px solid var(--body-borde);
box-shadow: 0 15px 35px rgba(47, 58, 86, 0.1);
max-width: 700px;
margin: -30px auto 40px;
margin: -30px auto 40px; /* Sube un poco sobre la cabecera */
position: relative;
z-index: 10;
}
@ -386,7 +336,7 @@ body {
.contenedor_rosario h3 {
font-family: 'EB Garamond', serif;
font-size: 2rem;
color: var(--color-acento);
color: var(--color-primario);
margin-bottom: 1rem;
text-align: center;
letter-spacing: 2px;
@ -420,7 +370,7 @@ body {
font-family: 'EB Garamond', serif;
font-weight: bold;
font-size: 1.2rem;
color: var(--body-texto);
color: var(--color-primario);
}
.imagen-misterio {
@ -430,44 +380,6 @@ body {
border: 5px solid var(--color-secundario);
}
/* --- DIFUNTOS EN PORTADA --- */
.lista-difuntos-index {
list-style: none;
padding: 0;
margin: 0.5rem 0 0;
display: flex;
flex-direction: column;
gap: 0.3rem;
}
.lista-difuntos-index li {
font-size: 0.9rem;
color: var(--color-texto-suave, #ccc);
padding: 0.2rem 0;
}
.anio-difunto {
font-size: 0.8rem;
opacity: 0.7;
}
/* --- INTENCIONES EN PORTADA --- */
#lista-intenciones-index {
padding-left: 1.2rem;
margin: 0.5rem 0 0.8rem;
}
#lista-intenciones-index li {
margin-bottom: 0.4rem;
line-height: 1.5;
}
#lista-intenciones-index li.texto-suave {
list-style: none;
color: var(--color-texto-suave, #aaa);
font-style: italic;
}
#imagen-misterio {
transition: opacity 0.4s ease-in-out;
display: block;
@ -477,55 +389,3 @@ body {
max-width: 100%;
height: auto;
}
/* ================================
SESI<EFBFBD>N DE USUARIO EN HEADER
================================ */
.header-sesion {
position: absolute;
top: 0.6rem;
right: 1rem;
display: flex;
align-items: center;
gap: 0.6rem;
z-index: 100;
}
.header-usuario {
color: white;
font-size: 0.85rem;
opacity: 0.9;
}
.btn-cerrar-sesion {
padding: 0.3rem 0.8rem;
background: rgba(255,255,255,0.2);
color: white;
border: 1px solid rgba(255,255,255,0.5);
border-radius: 15px;
font-size: 0.8rem;
cursor: pointer;
transition: background 0.2s;
width: auto;
margin-top: 0;
}
.btn-cerrar-sesion:hover {
background: rgba(255,255,255,0.35);
}
.btn-sesion {
padding: 0.3rem 0.8rem;
background: rgba(255,255,255,0.15);
color: white;
border: 1px solid rgba(255,255,255,0.4);
border-radius: 15px;
font-size: 0.8rem;
text-decoration: none;
transition: background 0.2s;
}
.btn-sesion:hover {
background: rgba(255,255,255,0.3);
}

246
css/intenciones.css Executable file → Normal file
View File

@ -18,9 +18,7 @@
padding: 0.7rem;
width: 60%;
border-radius: 8px;
border: 1px solid var(--body-borde);
background: var(--body-tarjeta);
color: var(--body-texto);
border: 1px solid #ccc;
}
/* MURO DE HEXÁGONOS */
@ -35,7 +33,7 @@
.hexagono {
width: 120px;
height: 70px;
background: var(--body-tarjeta);
background: #ffffffaa;
position: relative;
cursor: pointer;
transition: transform .2s;
@ -43,7 +41,6 @@
justify-content: center;
align-items: center;
border-radius: 6px;
box-shadow: 0 2px 6px var(--body-sombra);
}
.hexagono:hover {
@ -61,12 +58,12 @@
.hexagono:before {
bottom: 100%;
border-bottom: 35px solid var(--body-tarjeta);
border-bottom: 35px solid #ffffffaa;
}
.hexagono:after {
top: 100%;
border-top: 35px solid var(--body-tarjeta);
border-top: 35px solid #ffffffaa;
}
/* ICONO DENTRO DEL HEXÁGONO */
@ -91,14 +88,11 @@
}
.modal-contenido {
background: var(--body-tarjeta);
color: var(--body-texto);
background: white;
padding: 2rem;
border-radius: 12px;
text-align: center;
max-width: 300px;
border: 1px solid var(--body-borde);
box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.cerrar {
@ -116,233 +110,3 @@
font-size: 1.1rem;
margin-top: 1rem;
}
/* PESTAÑAS */
.pestanas {
display: flex;
justify-content: center;
gap: 0.5rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
}
.pestana {
padding: 0.5rem 1.4rem;
border: 2px solid var(--color-primario);
background: transparent;
color: var(--color-primario);
border-radius: 25px;
font-size: 0.95rem;
cursor: pointer;
transition: background 0.2s, color 0.2s;
width: auto;
margin-top: 0;
}
.pestana:hover {
background: rgba(43, 91, 168, 0.08);
color: var(--color-hover);
}
.pestana.activa {
background: var(--color-primario);
color: var(--blanco-puro);
}
/* SELECTOR DE GRUPO */
.select-grupo {
padding: 0.5rem 1rem;
border-radius: 8px;
border: 1px solid var(--body-borde);
font-size: 0.95rem;
background: var(--body-tarjeta);
color: var(--body-texto);
}
/* TEXTO VACÍO */
.texto-suave {
color: var(--body-texto-suave);
font-size: 0.95rem;
margin-top: 1.5rem;
}
/* AUTOR EN MODAL */
.autor-modal {
font-size: 0.85rem;
color: var(--body-texto-suave);
margin-top: 0.3rem;
font-style: italic;
}
/* BOTÓN BORRAR EN MODAL */
.btn-borrar {
margin-top: 1rem;
padding: 0.5rem 1.2rem;
background: #c0392b;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 0.9rem;
width: auto;
}
.btn-borrar:hover {
background: #a93226;
}
/*
PANEL DIFUNTOS
*/
#panel-difuntos {
max-width: 640px;
margin: 0 auto;
text-align: left;
}
.formulario-difunto {
display: flex;
flex-direction: column;
gap: 0.8rem;
background: var(--body-tarjeta);
border: 1px solid var(--body-borde);
border-radius: 10px;
padding: 1.4rem 1.6rem;
margin-bottom: 1.8rem;
}
.formulario-difunto input[type="text"] {
padding: 0.65rem 0.9rem;
border-radius: 8px;
border: 1px solid var(--body-borde);
background: var(--body-fondo);
color: var(--body-texto);
font-size: 1rem;
width: 100%;
box-sizing: border-box;
}
.formulario-difunto input[type="text"]:focus {
outline: none;
border-color: var(--color-acento);
}
.difunto-fechas {
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.difunto-fechas label {
flex: 1;
min-width: 200px;
font-size: 0.9rem;
color: var(--body-texto-suave);
display: flex;
flex-direction: column;
gap: 0.3rem;
}
.difunto-fechas input[type="date"] {
padding: 0.55rem 0.8rem;
border-radius: 8px;
border: 1px solid var(--body-borde);
background: var(--body-fondo);
color: var(--body-texto);
font-size: 0.95rem;
width: 100%;
box-sizing: border-box;
color-scheme: light;
}
.difunto-fechas input[type="date"]:focus {
outline: none;
border-color: var(--color-acento);
}
/* LISTA DE DIFUNTOS */
.lista-difuntos {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 0.7rem;
}
.item-difunto {
display: flex;
align-items: center;
justify-content: space-between;
background: var(--body-tarjeta);
border: 1px solid var(--body-borde);
border-left: 3px solid var(--color-acento);
border-radius: 8px;
padding: 0.8rem 1rem;
gap: 0.8rem;
}
.difunto-info {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.difunto-nombre {
font-size: 1rem;
color: var(--body-texto);
font-weight: 600;
}
.difunto-fecha {
font-size: 0.82rem;
color: var(--body-texto-suave);
}
.btn-eliminar-difunto {
background: transparent;
border: 1px solid #c0392b;
color: #c0392b;
border-radius: 50%;
width: 28px;
height: 28px;
cursor: pointer;
font-size: 0.75rem;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: background 0.2s, color 0.2s;
padding: 0;
margin: 0;
}
.btn-eliminar-difunto:hover {
background: #c0392b;
color: white;
}
/* RECORDATORIO EN INDEX */
.bloque-recordatorio {
border-left: 3px solid var(--color-acento);
background: #FBF6E9;
}
.bloque-recordatorio h3 {
color: var(--color-acento);
margin-bottom: 0.6rem;
}
.bloque-recordatorio p {
color: var(--body-texto);
margin: 0.3rem 0;
line-height: 1.5;
}
.recordatorio-oracion {
margin-top: 0.8rem !important;
color: var(--body-texto-suave) !important;
font-size: 0.9rem;
}

90
css/login.css Executable file → Normal file
View File

@ -1,93 +1,57 @@
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Nunito:wght@400;600&display=swap');
:root {
--color-fondo: #0D1B2E; /* Azul noche profundo */
--color-tarjeta: #152540; /* Azul mariano oscuro */
--color-primario: #2B5BA8; /* Azul mariano medio */
--color-hover: #1A3F7A; /* Azul mariano oscuro (hover) */
--color-borde: #2D4A7A; /* Borde azulado suave */
--color-acento: #C9A84C; /* Dorado litúrgico */
--color-texto: #D8E4F5; /* Texto claro azulado */
--color-texto-suave:#8BAAD4; /* Texto secundario */
--sombra: rgba(0, 0, 0, 0.5);
}
body {
font-family: 'Nunito', sans-serif;
background: var(--color-fondo);
body {
font-family: Arial, sans-serif;
background: #f4f4f9;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
}
.container {
background: var(--color-tarjeta);
padding: 32px;
border-radius: 12px;
background: white;
padding: 30px;
border-radius: 10px;
width: 90%;
max-width: 400px;
margin-top: 120px;
box-shadow: 0 6px 24px var(--sombra);
border: 1px solid var(--color-borde);
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
h2 {
text-align: center;
margin-bottom: 20px;
color: var(--color-acento);
font-family: 'EB Garamond', serif;
font-size: 1.6rem;
font-weight: 600;
color: #333;
}
label {
font-weight: 600;
font-weight: bold;
display: block;
margin-top: 15px;
color: var(--color-texto-suave);
font-size: 0.9rem;
letter-spacing: 0.03em;
}
input {
width: 100%;
padding: 10px 12px;
padding: 10px;
margin-top: 5px;
border-radius: 6px;
border: 1px solid var(--color-borde);
background: #0D1B2E;
color: var(--color-texto);
font-family: 'Nunito', sans-serif;
font-size: 15px;
box-sizing: border-box;
transition: border-color 0.2s;
}
input:focus {
outline: none;
border-color: var(--color-primario);
border-radius: 5px;
border: 1px solid #ccc;
}
button {
width: 100%;
margin-top: 22px;
margin-top: 20px;
padding: 12px;
background: var(--color-primario);
color: #fff;
background: #2196F3;
color: white;
border: none;
border-radius: 6px;
border-radius: 5px;
font-size: 16px;
font-family: 'Nunito', sans-serif;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
button:hover {
background: var(--color-hover);
background: #1976D2;
}
.msg {
@ -96,22 +60,10 @@ button:hover {
font-size: 14px;
}
.success { color: var(--color-acento); }
.error { color: #FF6B6B; }
p {
color: var(--color-texto-suave);
text-align: center;
font-size: 14px;
margin-top: 16px;
.success {
color: green;
}
p a {
color: var(--color-primario);
text-decoration: none;
font-weight: 600;
}
p a:hover {
text-decoration: underline;
.error {
color: red;
}

0
css/oraciones-basicas.css Executable file → Normal file
View File

121
css/register.css Executable file → Normal file
View File

@ -2,142 +2,75 @@
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Nunito:wght@400;600&display=swap');
:root {
--color-fondo: #0D1B2E; /* Azul noche profundo */
--color-tarjeta: #152540; /* Azul mariano oscuro */
--color-primario: #2B5BA8; /* Azul mariano medio */
--color-hover: #1A3F7A; /* Azul mariano oscuro (hover) */
--color-borde: #2D4A7A; /* Borde azulado suave */
--color-acento: #C9A84C; /* Dorado litúrgico */
--color-texto: #D8E4F5; /* Texto claro azulado */
--color-texto-suave:#8BAAD4; /* Texto secundario */
/* Paleta refinada */
--color-primario: #2F3A56; /* Azul noche espiritual */
--color-hover: #24314A; /* Azul noche más oscuro */
--color-secundario: #EAF2FA; /* Azul muy suave */
--color-fondo: #FAF7F2; /* Crema papel antiguo */
--color-texto: #2b2b2b;
--color-acento: #E8A23A; /* Dorado litúrgico */
--blanco-puro: #FFFFFF;
--sombra: rgba(0, 0, 0, 0.5);
--sombra: rgba(47, 58, 86, 0.15);
}
body {
body {
font-family: 'Nunito', sans-serif;
background: var(--color-fondo);
margin: 0;
padding: 0;
min-height: 100vh;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background: var(--color-tarjeta);
padding: 32px;
border-radius: 12px;
background: white;
padding: 30px;
border-radius: 10px;
width: 90%;
max-width: 420px;
box-shadow: 0 6px 24px var(--sombra);
border: 1px solid var(--color-borde);
max-width: 400px;
box-shadow: 0 4px 10px rgba(0,0,0,0.5);
margin-left: auto;
margin-right: auto;
margin-top: 1.25rem;
}
h2 {
text-align: center;
margin-bottom: 20px;
color: var(--color-acento);
font-family: 'EB Garamond', serif;
font-size: 1.6rem;
font-weight: 600;
}
label {
font-weight: 600;
font-weight: bold;
display: block;
margin-top: 15px;
color: var(--color-texto-suave);
font-size: 0.9rem;
letter-spacing: 0.03em;
}
input {
width: 100%;
padding: 10px 12px;
padding: 10px;
margin-top: 5px;
border-radius: 6px;
border: 1px solid var(--color-borde);
background: #0D1B2E;
color: var(--color-texto);
font-family: 'Nunito', sans-serif;
font-size: 15px;
box-sizing: border-box;
transition: border-color 0.2s;
}
input:focus {
outline: none;
border-color: var(--color-primario);
border-radius: 5px;
border: 1px solid #ccc;
}
button {
width: 100%;
margin-top: 22px;
margin-top: 20px;
padding: 12px;
background: var(--color-primario);
color: var(--blanco-puro);
border: none;
border-radius: 6px;
border-radius: 5px;
font-size: 16px;
font-family: 'Nunito', sans-serif;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
button:hover {
background: var(--color-hover);
}
.msg {
margin-top: 15px;
text-align: center;
font-size: 14px;
}
.success { color: var(--color-acento); }
.error { color: #FF6B6B; }
p {
color: var(--color-texto-suave);
text-align: center;
font-size: 14px;
margin-top: 16px;
.success {
color: var(--color-acento);
}
p a {
color: var(--color-primario);
text-decoration: none;
font-weight: 600;
.error {
color: red;
}
p a:hover {
text-decoration: underline;
}
select {
width: 100%;
padding: 10px 12px;
margin-top: 5px;
border-radius: 6px;
border: 1px solid var(--color-borde);
background: #0D1B2E;
color: var(--color-texto);
font-size: 15px;
font-family: 'Nunito', sans-serif;
box-sizing: border-box;
transition: border-color 0.2s;
}
select:focus {
outline: none;
border-color: var(--color-primario);
}
#bloque-parroquia,
#bloque-grupo {
transition: opacity 0.2s;
}

File diff suppressed because it is too large Load Diff

0
data/anno-liturgico.md Executable file → Normal file
View File

File diff suppressed because it is too large Load Diff

0
data/calendario-liturgico-25-26.pdf Executable file → Normal file
View File

317
data/calendario-liturgico.json Executable file → Normal file
View File

@ -9,12 +9,7 @@
{ "fecha": "2026-01-20", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-21", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-22", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-23", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-24", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-25", "color": "blanco", "tiempo": "Tiempo Ordinario (Conversión de San Pablo)" },
{ "fecha": "2026-01-26", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-27", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-28", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-29", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-30", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-01-31", "color": "verde", "tiempo": "Tiempo Ordinario" },
@ -22,47 +17,14 @@
{ "fecha": "2026-02-02", "color": "blanco", "tiempo": "Tiempo Ordinario (Presentación del Señor)" },
{ "fecha": "2026-02-03", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-04", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-05", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-06", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-07", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-08", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-09", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-10", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-11", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-12", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-13", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-14", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-02-15", "color": "verde", "tiempo": "Domingo de Carnaval" },
{ "fecha": "2026-02-16", "color": "verde", "tiempo": "Carnaval (Lunes de Carnaval)" },
{ "fecha": "2026-02-17", "color": "verde", "tiempo": "Carnaval (Martes de Carnaval)" },
{ "fecha": "2026-02-14", "color": "verde", "tiempo": "Domingo de Carnaval" },
{ "fecha": "2026-02-15", "color": "verde", "tiempo": "Cuaresma (Lunes de Carnaval)" },
{ "fecha": "2026-02-16", "color": "verde", "tiempo": "Cuaresma (Martes de Carnaval)" },
{ "fecha": "2026-02-18", "color": "morado", "tiempo": "Cuaresma (Miércoles de Ceniza)" },
{ "fecha": "2026-02-19", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-02-20", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-02-21", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-02-22", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-02-23", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-02-24", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-02-25", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-02-26", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-02-27", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-02-28", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-01", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-02", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-03", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-04", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-05", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-06", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-07", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-08", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-09", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-10", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-11", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-12", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-13", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-14", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-15", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-16", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-17", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-18", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-19", "color": "blanco", "tiempo": "Cuaresma (San José)" },
{ "fecha": "2026-03-20", "color": "morado", "tiempo": "Cuaresma" },
@ -71,286 +33,21 @@
{ "fecha": "2026-03-23", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-24", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-25", "color": "violeta", "tiempo": "Cuaresma (Anunciación del Señor)" },
{ "fecha": "2026-03-26", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-27", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-28", "color": "morado", "tiempo": "Cuaresma" },
{ "fecha": "2026-03-29", "color": "rojo", "tiempo": "Semana Santa (Domingo de Ramos)" },
{ "fecha": "2026-03-30", "color": "morado", "tiempo": "Lunes de Semana Santa" },
{ "fecha": "2026-03-31", "color": "morado", "tiempo": "Martes de Semana Santa" },
{ "fecha": "2026-04-01", "color": "morado", "tiempo": "Semana Santa" },
{ "fecha": "2026-04-02", "color": "blanco", "tiempo": "Semana Santa (Jueves Santo)" },
{ "fecha": "2026-04-03", "color": "rojo", "tiempo": "Semana Santa (Viernes Santo)" },
{ "fecha": "2026-04-04", "color": "morado/negro", "tiempo": "Semana Santa" },
{ "fecha": "2026-04-05", "color": "blanco", "tiempo": "Semana Santa (Domingo de Resurrección)" },
{ "fecha": "2026-04-06", "color": "morado", "tiempo": "Lunes de Pascua" },
{ "fecha": "2026-04-07", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-08", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-09", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-10", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-11", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-12", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-13", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-14", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-15", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-16", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-17", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-18", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-19", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-20", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-21", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-22", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-23", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-24", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-25", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-26", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-27", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-28", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-29", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-30", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-01", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-02", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-03", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-04", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-05", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-06", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-07", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-08", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-09", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-10", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-11", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-12", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-13", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-14", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-15", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-16", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-04-02", "color": "blanco", "tiempo": "Triduo Pascual (Jueves Santo)" },
{ "fecha": "2026-04-03", "color": "rojo", "tiempo": "Triduo Pascual (Viernes Santo)" },
{ "fecha": "2026-04-05", "color": "blanco", "tiempo": "Tiempo Pascual (Domingo de Resurrección)" },
{ "fecha": "2026-05-17", "color": "blanco", "tiempo": "Tiempo Pascual (Ascensión del Señor)" },
{ "fecha": "2026-05-18", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-19", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-20", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-21", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-22", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-23", "color": "morado", "tiempo": "Tiempo Pascual" },
{ "fecha": "2026-05-24", "color": "rojo", "tiempo": "Tiempo Pascual (Pentecostés)" },
{ "fecha": "2026-05-25", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-05-26", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-05-27", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-05-28", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-05-29", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-05-30", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-05-31", "color": "blanco", "tiempo": "Tiempo Ordinario (Santísima Trinidad)" },
{ "fecha": "2026-06-01", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-02", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-03", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-04", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-05", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-06", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-07", "color": "blanco", "tiempo": "Tiempo Ordinario (Corpus Christi)" },
{ "fecha": "2026-06-08", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-09", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-10", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-11", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-12", "color": "blanco", "tiempo": "Tiempo Ordinario (Sagrado Corazón de Jesús)" },
{ "fecha": "2026-06-13", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-14", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-15", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-16", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-17", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-18", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-19", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-20", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-21", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-22", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-23", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-24", "color": "blanco", "tiempo": "Tiempo Ordinario (Natividad de San Juan Bautista)" },
{ "fecha": "2026-06-25", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-26", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-27", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-28", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-06-29", "color": "rojo", "tiempo": "Tiempo Ordinario (San Pedro y San Pablo)" },
{ "fecha": "2026-06-30", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-01", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-02", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-03", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-04", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-05", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-06", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-07", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-08", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-09", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-10", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-11", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-12", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-13", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-14", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-15", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-16", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-17", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-18", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-19", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-20", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-21", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-22", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-23", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-24", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-25", "color": "blanco", "tiempo": "Tiempo Ordinario (Santiago Apóstol)" },
{ "fecha": "2026-07-26", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-27", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-28", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-29", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-30", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-07-31", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-01", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-02", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-03", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-04", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-05", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-06", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-07", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-08", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-09", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-10", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-11", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-12", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-13", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-14", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-15", "color": "blanco", "tiempo": "Tiempo Ordinario (Asunción de la Virgen)" },
{ "fecha": "2026-08-16", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-17", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-18", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-19", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-20", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-21", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-22", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-23", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-24", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-25", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-26", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-27", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-28", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-29", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-30", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-08-31", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-01", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-02", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-03", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-04", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-05", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-06", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-07", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-08", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-09", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-10", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-11", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-12", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-13", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-14", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-15", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-16", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-17", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-18", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-19", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-20", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-21", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-22", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-23", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-24", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-25", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-26", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-27", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-28", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-29", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-09-30", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-01", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-02", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-03", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-04", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-05", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-06", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-07", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-08", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-09", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-10", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-11", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-12", "color": "blanco", "tiempo": "Nuestra Señora del Pilar" },
{ "fecha": "2026-10-13", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-14", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-15", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-16", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-17", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-18", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-19", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-20", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-21", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-22", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-23", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-24", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-25", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-26", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-27", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-28", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-29", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-30", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-10-31", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-01", "color": "blanco", "tiempo": "Tiempo Ordinario (Todos los Santos)" },
{ "fecha": "2026-11-02", "color": "morado/negro", "tiempo": "Tiempo Ordinario (Fieles Difuntos)" },
{ "fecha": "2026-11-03", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-04", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-05", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-06", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-07", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-08", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-09", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-10", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-11", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-12", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-13", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-14", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-15", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-16", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-17", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-18", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-19", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-20", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-21", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-22", "color": "blanco", "tiempo": "Tiempo Ordinario (Cristo Rey)" },
{ "fecha": "2026-11-23", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-24", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-25", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-26", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-27", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-28", "color": "verde", "tiempo": "Tiempo Ordinario" },
{ "fecha": "2026-11-29", "color": "morado", "tiempo": "Adviento (I Domingo de Adviento)" },
{ "fecha": "2026-11-30", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-01", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-02", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-03", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-04", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-05", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-06", "color": "morado", "tiempo": "Adviento (II Domingo de Adviento)" },
{ "fecha": "2026-12-07", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-08", "color": "azul/blanco", "tiempo": "Adviento (Inmaculada Concepción)" },
{ "fecha": "2026-12-09", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-10", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-11", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-12", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-13", "color": "morado", "tiempo": "Adviento (III Domingo de Adviento)" },
{ "fecha": "2026-12-14", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-15", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-16", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-17", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-18", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-19", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-20", "color": "morado", "tiempo": "Adviento (IV Domingo de Adviento)" },
{ "fecha": "2026-12-21", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-22", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-23", "color": "morado", "tiempo": "Adviento" },
{ "fecha": "2026-12-24", "color": "morado/blanco", "tiempo": "Adviento (Nochebuena)" },
{ "fecha": "2026-12-25", "color": "blanco", "tiempo": "Navidad (Natividad del Señor)" },
{ "fecha": "2026-12-26", "color": "blanco", "tiempo": "Navidad (San Esteban)" },
{ "fecha": "2026-12-27", "color": "blanco", "tiempo": "Navidad (San Juan Evangelista)" },
{ "fecha": "2026-12-28", "color": "blanco", "tiempo": "Navidad (Inocentes)" },
{ "fecha": "2026-12-29", "color": "blanco", "tiempo": "Navidad" },
{ "fecha": "2026-12-30", "color": "blanco", "tiempo": "Navidad" },
{ "fecha": "2026-12-31", "color": "blanco", "tiempo": "Navidad" }
{ "fecha": "2026-12-25", "color": "blanco", "tiempo": "Navidad (Natividad del Señor)" }
]

0
data/colores-liturgicos.json Executable file → Normal file
View File

0
data/difuntos.json Executable file → Normal file
View File

0
data/intenciones.json Executable file → Normal file
View File

0
data/libros.json Executable file → Normal file
View File

0
data/salmos.json Executable file → Normal file
View File

0
data/santos.json Executable file → Normal file
View File

3
header.html Executable file → Normal file
View File

@ -20,9 +20,6 @@
<div id="descripcion-santo-del-dia">(Patrona de los conductores)</div>
</div>
<!-- Sesión del usuario -->
<div id="header-sesion" class="header-sesion"></div>
<button class="menu-toggle" id="menu-toggle"></button>
<nav class="menu-principal" id="menu-principal">

0
img/biblia.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

0
img/biblioteca.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 217 KiB

0
img/dolorosos1.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.7 MiB

After

Width:  |  Height:  |  Size: 5.7 MiB

0
img/dolorosos2.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.8 MiB

After

Width:  |  Height:  |  Size: 6.8 MiB

0
img/dolorosos3.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 5.2 MiB

0
img/dolorosos4.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 5.2 MiB

0
img/dolorosos5.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.5 MiB

After

Width:  |  Height:  |  Size: 5.5 MiB

0
img/favicon.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

0
img/faviconClaro.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

0
img/gloriosos1.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

0
img/gloriosos2.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.0 MiB

After

Width:  |  Height:  |  Size: 5.0 MiB

0
img/gloriosos3.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.4 MiB

After

Width:  |  Height:  |  Size: 5.4 MiB

0
img/gloriosos4.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.5 MiB

After

Width:  |  Height:  |  Size: 5.5 MiB

0
img/gloriosos5.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.3 MiB

After

Width:  |  Height:  |  Size: 5.3 MiB

0
img/gozosos1.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 7.7 MiB

After

Width:  |  Height:  |  Size: 7.7 MiB

0
img/gozosos2.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 8.9 MiB

After

Width:  |  Height:  |  Size: 8.9 MiB

0
img/gozosos3.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.3 MiB

After

Width:  |  Height:  |  Size: 6.3 MiB

0
img/gozosos4.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.9 MiB

After

Width:  |  Height:  |  Size: 5.9 MiB

0
img/gozosos5.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.1 MiB

After

Width:  |  Height:  |  Size: 6.1 MiB

0
img/iconos/cruz.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

0
img/iconos/flor.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

0
img/iconos/vela.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

0
img/libros/biblia-cee.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

0
img/libros/biblia-cee.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

0
img/libros/catecismo-astete.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

0
img/libros/catecismo-astete.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

0
img/luminosos1.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.1 MiB

After

Width:  |  Height:  |  Size: 6.1 MiB

0
img/luminosos2.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.8 MiB

After

Width:  |  Height:  |  Size: 5.8 MiB

0
img/luminosos3.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.4 MiB

After

Width:  |  Height:  |  Size: 5.4 MiB

0
img/luminosos4.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 5.1 MiB

After

Width:  |  Height:  |  Size: 5.1 MiB

0
img/luminosos5.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.7 MiB

After

Width:  |  Height:  |  Size: 4.7 MiB

0
img/oraciones.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

0
img/peliculas.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 158 KiB

0
img/rosario.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 279 KiB

After

Width:  |  Height:  |  Size: 279 KiB

0
img/santos.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

21
index.html Executable file → Normal file
View File

@ -12,25 +12,27 @@
<div id="header-container"></div>
<main class="contenedor">
<!-- RECORDATORIO DE DIFUNTOS (aparece solo cuando coincide un aniversario) -->
<section id="seccion-recordatorio" class="bloque bloque-recordatorio" style="display:none;"></section>
<!-- DIFUNTO -->
<section class="tarjeta-difunto">
<div id="difunto-hoy"></div>
</section>
<!-- SALMO -->
<section class="bloque">
<blockquote class="salmo" id="salmo-pcpal">
Cargando bendiciones...
</blockquote>
<blockquote class="salmo" id="__salmo">
Salmo del día no disponible
</section>
<!-- INTENCIÓN -->
<section class="bloque" id="seccion-intenciones">
<h3 id="titulo-intenciones">🙏 Intención de hoy</h3>
<ul id="lista-intenciones-index">
<section class="bloque">
<h3>🙏 Intención de hoy</h3>
<p class="intencion">
<ul>
<li>Por la paz en el mundo y el fin de los conflictos.</li>
<li>Por los enfermos y sus familias, para que encuentren consuelo y sanación.</li>
<li>Por los líderes del mundo, para que gobiernen con sabiduría y justicia.</li>
</ul>
</p>
<a href="intenciones.html" class="boton">Intenciones de oración</a>
</section>
@ -79,7 +81,6 @@
</main>
<script src="js/auth.js"></script>
<script src="js/header.js"></script>
<script src="js/codigo.js"></script>
</body>

46
intenciones.html Executable file → Normal file
View File

@ -14,63 +14,25 @@
<div class="contenedor-intenciones">
<h3>🙏 Intenciones de Oración</h3>
<p class="texto-suave">Cada intención se guarda solo en tu dispositivo.</p>
<!-- PESTAÑAS -->
<div class="pestanas" id="pestanas">
<button class="pestana activa" data-ambito="personal">✝ Personales</button>
<button class="pestana" data-ambito="parroquia" id="tab-parroquia" style="display:none;">⛪ Parroquia</button>
<button class="pestana" data-ambito="grupo" id="tab-grupo" style="display:none;">🕊 Comunidad</button>
<button class="pestana" data-ambito="difuntos" id="tab-difuntos">🕯 Mis Difuntos</button>
</div>
<!-- SELECTOR DE GRUPO (solo visible en pestaña "grupo") -->
<div id="selector-grupo" style="display:none; text-align:center; margin-bottom:1rem;">
<select id="select-grupo" class="select-grupo"></select>
</div>
<!-- PANEL DIFUNTOS -->
<div id="panel-difuntos" style="display:none;">
<p class="texto-suave" style="margin-bottom:1.2rem;">Guarda aquí a tus difuntos para rezar por ellos en sus fechas señaladas. Solo tú los verás.</p>
<div class="formulario-difunto">
<input type="text" id="difunto-nombre" placeholder="Nombre..." maxlength="100">
<div class="difunto-fechas">
<label>🎂 Nacimiento <input type="date" id="difunto-nacimiento"></label>
<label>✝ Fallecimiento <input type="date" id="difunto-defuncion"></label>
</div>
<button id="btn-guardar-difunto" class="boton">Añadir</button>
</div>
<ul id="lista-difuntos" class="lista-difuntos"></ul>
<p id="sin-difuntos" class="texto-suave" style="display:none; margin-top:1rem;">Aún no has añadido ningún difunto.</p>
</div>
<!-- FORMULARIO -->
<div class="formulario-intencion" id="formulario-intencion">
<input type="text" id="nueva-intencion" placeholder="Escribe tu intención de oración..." maxlength="300">
<div class="formulario-intencion">
<input type="text" id="nueva-intencion" placeholder="Escribe tu intención...">
<button id="btn-guardar" class="boton">Añadir</button>
</div>
<!-- MURO DE HEXÁGONOS -->
<div id="muro-intenciones" class="muro-hexagonos"></div>
<!-- ESTADO VACÍO -->
<p id="sin-intenciones" class="texto-suave" style="display:none;">
Aún no hay intenciones en este ámbito. ¡Sé el primero en añadir una!
</p>
</div>
<!-- MODAL -->
<div id="modal-intencion" class="modal">
<div class="modal-contenido">
<span id="cerrar-modal" class="cerrar">&times;</span>
<img id="icono-modal" class="icono-modal" src="" alt="icono">
<img id="icono-modal" class="icono-modal" src="">
<p id="texto-modal" class="texto-modal"></p>
<p id="autor-modal" class="autor-modal"></p>
<button id="btn-borrar-modal" class="btn-borrar" style="display:none;">Eliminar intención</button>
</div>
</div>
<script src="js/api-config.js"></script>
<script src="js/auth.js"></script>
<script src="js/header.js"></script>
<script src="js/intenciones.js"></script>

View File

@ -1,31 +0,0 @@
// Configuración central de la API
// En local (localhost / 127.0.0.1) apunta al backend Docker; en producción, al servidor real.
const API_BASE = (
location.hostname === "localhost" ||
location.hostname === "127.0.0.1" ||
location.hostname === "" // file:// abierto directamente
) ? "http://localhost:8080"
: "https://recursos-catolicos.es:8080";
/**
* Realiza una llamada autenticada a la API.
* Si el servidor devuelve 401 (token caducado/inválido), cierra la sesión automáticamente.
*/
async function apiCall(endpoint, options = {}) {
const token = getToken();
const headers = {
"Content-Type": "application/json",
...(token ? { "Authorization": `Bearer ${token}` } : {}),
...(options.headers || {})
};
const response = await fetch(`${API_BASE}${endpoint}`, {
...options,
headers
});
if (response.status === 401) {
cerrarSesion();
return null;
}
return response;
}

View File

@ -1,54 +0,0 @@
// ================================
// UTILIDADES DE AUTENTICACIÓN
// ================================
/** Devuelve el token JWT o null si no hay sesión. */
function getToken() {
return localStorage.getItem("token");
}
/** Devuelve el objeto usuario guardado en sesión, o null. */
function getUsuario() {
const u = localStorage.getItem("usuario");
return u ? JSON.parse(u) : null;
}
/**
* Verifica que el usuario esté autenticado.
* Si no lo está, redirige a login.html y devuelve null.
*/
function verificarAuth() {
if (!getToken()) {
window.location.href = "login.html";
return null;
}
return getUsuario();
}
/** Cierra la sesión eliminando los datos locales y redirige al login. */
function cerrarSesion() {
localStorage.removeItem("token");
localStorage.removeItem("usuario");
window.location.href = "login.html";
}
/**
* Muestra el nombre del usuario y el botón de cerrar sesión en el header.
* Llama a esta función después de cargar el header.
*/
function mostrarSesionEnHeader() {
const usuario = getUsuario();
const contenedor = document.getElementById("header-sesion");
if (!contenedor) return;
if (usuario) {
contenedor.innerHTML = `
<span class="header-usuario">👤 ${usuario.nombre}</span>
<button class="btn-cerrar-sesion" onclick="cerrarSesion()">Salir</button>
`;
} else {
contenedor.innerHTML = `
<a href="login.html" class="btn-sesion">Iniciar sesión</a>
`;
}
}

0
js/biblioteca.js Executable file → Normal file
View File

212
js/codigo.js Executable file → Normal file
View File

@ -1,13 +1,17 @@
/* ============================================
INICIALIZACIÓN DE ELEMENTOS DE LA PÁGINA
(independiente del header)
/* ============================================
ESPERAR A QUE EL HEADER SE CARGUE
============================================ */
document.addEventListener("DOMContentLoaded", () => {
window.addEventListener("load", () => {
// Damos un pequeño margen para que header.html termine de insertarse
setTimeout(() => {
inicializarVariables();
difuntos();
visualizarDatos();
visualizarSalmo();
visualizarRosario();
recordatorioDifuntos();
cargarIntencionesIndex();
cargarYActualizarTodo();
}, 200);
});
@ -18,7 +22,7 @@ document.addEventListener("DOMContentLoaded", () => {
let fechaHoyElem, indicadorLiturgicoElem, cabeceraHoy, menuPrincipalElem,
nombreCicloElem, cicloParImparElem, descripcionSantoDelDiaElem,
errorElem, salmoDelDiaElem;
errorElem, difuntoHoyElem, salmoDelDiaElem;
@ -30,7 +34,8 @@ function inicializarVariables() {
cabeceraHoy = document.getElementById('header-hoy');
menuPrincipalElem = document.getElementById('menu-principal');
errorElem = document.getElementById('__error');
salmoDelDiaElem = document.getElementById('salmo-pcpal');
difuntoHoyElem = document.getElementById('difunto-hoy');
salmoDelDiaElem = document.getElementById('__salmo');
fechaHoyElem = document.getElementById('fecha-hoy');
nombreCicloElem = document.getElementById('nombre_ciclo');
@ -41,44 +46,68 @@ function inicializarVariables() {
/* ============================================
DIFUNTOS
============================================ */
async function difuntos() {
const hoy = new Date();
const mesHoy = hoy.getMonth() + 1;
const diaHoy = hoy.getDate();
try {
const res = await fetch('data/difuntos.json');
const listaDifuntos = await res.json();
const elDifunto = listaDifuntos.find(d => {
if (!d.fallecimiento || d.fallecimiento.includes('XXXX')) return false;
const f = d.fallecimiento.split('-');
return parseInt(f[1]) === mesHoy && parseInt(f[2]) === diaHoy;
});
if (elDifunto && difuntoHoyElem) {
difuntoHoyElem.innerHTML = `<span class="nombre-difunto">DEP 🕊️ ${elDifunto.nombre}</span>`;
const intencionGral = document.querySelector('.intencion');
if (intencionGral) {
intencionGral.innerHTML = `<li>Hoy pedimos especialmente por ${elDifunto.nombre}</li>`;
}
}
} catch (e) {
console.error("Error en la carga de difuntos:", e);
}
}
/* ============================================
SALMO DEL DÍA
============================================ */
async function visualizarSalmo() {
// Buscamos el elemento directamente para evitar fallos de referencia global
const salmoElem = document.getElementById('salmo-pcpal');
if (!salmoElem) {
console.error("No se encontró el elemento 'salmo-pcpal' en el DOM");
return;
}
const salmoElem = document.getElementById('__salmo');
try {
const res = await fetch('data/salmos.json');
if (!res.ok) throw new Error("Error en fetch");
if (!res.ok) throw new Error("No se pudo cargar el salmo");
const listaSalmos = await res.json();
// Cálculo del día del año corregido
const hoy = new Date();
const inicioAnio = new Date(hoy.getFullYear(), 0, 0);
const dif = hoy - inicioAnio;
const diaDelAnio = Math.floor(dif / (1000 * 60 * 60 * 24));
// Obtenemos el salmo (0 a 149)
const indiceHoy = diaDelAnio % listaSalmos.length;
const salmoDeHoy = listaSalmos[indiceHoy];
if (salmoDeHoy && salmoDeHoy.texto) {
salmoElem.textContent = salmoDeHoy.texto;
} else {
salmoElem.textContent = "El Señor es mi pastor, nada me falta.";
if (salmoDeHoy && salmoElem) {
salmoElem.innerHTML = `${salmoDeHoy.texto}`;
}
} catch (e) {
console.error("Error cargando el salmo:", e);
salmoElem.textContent = "Bendice, alma mía, al Señor.";
if (salmoElem) salmoElem.textContent = "El Señor es mi pastor, nada me falta.";
}
}
@ -123,97 +152,6 @@ function visualizarDatos() {
/* ============================================
CALENDARIO LITÚRGICO
============================================ */
/* ============================================
RECORDATORIO DE DIFUNTOS
============================================ */
async function recordatorioDifuntos() {
const seccion = document.getElementById("seccion-recordatorio");
if (!seccion) return;
const hoy = new Date();
const mmdd = String(hoy.getMonth() + 1).padStart(2, "0") + "-" + String(hoy.getDate()).padStart(2, "0");
// 1. Lista compartida desde difuntos.json (normalizar fallecimiento -> defuncion)
let difuntosJSON = [];
try {
const res = await fetch('data/difuntos.json');
if (res.ok) {
const data = await res.json();
difuntosJSON = data.map(d => ({
nombre: d.nombre,
nacimiento: d.nacimiento,
defuncion: d.fallecimiento,
nota: d.nota || ""
}));
}
} catch (e) { /* sin conexion */ }
// 2. Difuntos personales desde localStorage
const usuarioGuardado = typeof getUsuario === 'function' ? getUsuario() : null;
const clave = usuarioGuardado
? `difuntos_personales_${usuarioGuardado.id}`
: "difuntos_personales_anonimo";
const difuntosLocal = JSON.parse(localStorage.getItem(clave) || "[]");
// 3. Combinar (locales primero, sin duplicados por nombre)
const nombresSeen = new Set();
const todos = [...difuntosLocal, ...difuntosJSON].filter(d => {
if (!d.nombre || nombresSeen.has(d.nombre)) return false;
nombresSeen.add(d.nombre);
return true;
});
if (todos.length === 0) return;
// 4. Detectar aniversarios de hoy
const recordatorios = [];
todos.forEach(d => {
if (d.nacimiento && !d.nacimiento.includes('XXXX')) {
const partes = d.nacimiento.split("-");
if (partes.length === 3 && partes[1] + "-" + partes[2] === mmdd) {
const anios = hoy.getFullYear() - parseInt(partes[0]);
recordatorios.push("\uD83C\uDF82 Hoy habr\u00eda sido el cumplea\u00F1os de <strong>" + d.nombre + "</strong> &mdash; " + anios + " a\u00F1os");
}
}
if (d.defuncion && !d.defuncion.includes('XXXX')) {
const partes = d.defuncion.split("-");
if (partes.length === 3 && partes[1] + "-" + partes[2] === mmdd) {
const anios = hoy.getFullYear() - parseInt(partes[0]);
recordatorios.push("\uD83D\uDD6F Hoy es el " + anios + ".\u00BA aniversario del fallecimiento de <strong>" + d.nombre + "</strong>");
}
}
});
// 5. Construir HTML
seccion.style.display = "block";
let html = '<h3>\uD83D\uDD6F En el recuerdo</h3>';
if (recordatorios.length > 0) {
html += recordatorios.map(r => `<p>${r}</p>`).join("");
html += '<p class="recordatorio-oracion"><em>"D\u00E1les, Se\u00F1or, el descanso eterno y brille para ellos la luz perpetua."</em></p>';
html += '<hr style="border-color:rgba(255,255,255,0.15);margin:0.8rem 0;">';
}
html += '<ul class="lista-difuntos-index">';
todos.forEach(d => {
let anioStr = "";
if (d.defuncion && !d.defuncion.includes('XXXX')) {
const anio = parseInt(d.defuncion.split('-')[0]);
if (anio > 1000) anioStr = ' <span class="anio-difunto">(\u2020 ' + anio + ')</span>';
}
html += '<li>\uD83D\uDD4A ' + d.nombre + anioStr + '</li>';
});
html += '</ul>';
seccion.innerHTML = html;
}
/* ============================================
CALENDARIO LITÚRGICO
============================================ */
@ -263,49 +201,3 @@ async function cargarYActualizarTodo() {
console.error("Error cargando el calendario:", error);
}
}
/* ============================================
INTENCIONES DEL USUARIO EN LA PORTADA
============================================ */
async function cargarIntencionesIndex() {
const lista = document.getElementById("lista-intenciones-index");
if (!lista) return;
const usuario = typeof getUsuario === 'function' ? getUsuario() : null;
if (!usuario) return; // sin sesión: se mantienen las intenciones genéricas
// Actualizar título y enlace
const titulo = document.getElementById("titulo-intenciones");
if (titulo) titulo.textContent = "\uD83D\uDE4F Mis intenciones";
let intenciones = [];
// Intentar cargar desde la API
try {
if (typeof apiCall === 'function') {
const response = await apiCall("/intenciones/personales");
if (response && response.ok) {
intenciones = await response.json();
}
}
} catch (e) { /* sin conexión al backend */ }
// Fallback a localStorage
if (intenciones.length === 0) {
const clave = `intenciones_${usuario.id}`;
const local = JSON.parse(localStorage.getItem(clave) || localStorage.getItem("intenciones") || "[]");
intenciones = local.map(i => ({ texto: i.texto }));
}
if (intenciones.length === 0) {
lista.innerHTML = '<li class="texto-suave">A\u00FAn no tienes intenciones. <a href="intenciones.html">A\u00F1adir</a></li>';
return;
}
// Mostrar hasta 5 intenciones
lista.innerHTML = intenciones.slice(0, 5)
.map(i => `<li>${i.texto}</li>`)
.join("");
}

67
js/header.js Executable file → Normal file
View File

@ -13,7 +13,6 @@ fetch("header.html")
santoDelDia();
visualizarDatos();
cargarYActualizarTodo();
mostrarSesionEnHeader();
})
.catch(err => console.error("Error cargando header:", err));
@ -53,54 +52,48 @@ function inicializarVariables() {
async function cargarYActualizarTodo() {
const hoy = new Date();
const offset = hoy.getTimezoneOffset() * 60000;
const fechaISO = new Date(hoy - offset).toISOString().split('T')[0];
const fechaISO = hoy.toISOString().split('T')[0];
cicloParImparElem.textContent = hoy.getFullYear() % 2 === 0 ? "Año Par" : "Año Impar";
const ciclo = hoy.getFullYear() % 3;
nombreCicloElem.textContent = ciclo === 0 ? "Ciclo C -" : ciclo === 1 ? "Ciclo A -" : "Ciclo B -";
if (hoy.getFullYear() % 3 === 0) {
nombreCicloElem.textContent = "Ciclo C -";
} else if (hoy.getFullYear() % 3 === 1) {
nombreCicloElem.textContent = "Ciclo A -";
} else {
nombreCicloElem.textContent = "Ciclo B -";
}
try {
const respuesta = await fetch('data/calendario-liturgico.json');
const datosCalendario = await respuesta.json();
const datosHoy = datosCalendario.find(dia => dia.fecha === fechaISO);
// Buscar el día exacto o, si no existe, el último día anterior
const datosHoy = [...datosCalendario]
.filter(d => d.fecha <= fechaISO)
.sort((a, b) => b.fecha.localeCompare(a.fecha))[0];
// Fondos oscuros litúrgicos (más oscuros que el cuerpo #0D1B2E)
const mapaFondos = {
"verde": "#228B22", // Verde Esperanza (Tiempo Ordinario) - Más vivo
"morado": "#7D2181", // Morado Penitencial (Adviento/Cuaresma) - Más real
"blanco": "#FFFFFF", // Blanco Pureza (Pascua/Navidad/Santos) - Blanco puro
"rojo": "#B22222", // Rojo Sangre/Fuego (Mártires/Pentecostés) - Un rojo con fuerza
"azul": "#1E90FF", // Azul Purísima (Inmaculada) - Un azul cielo celestial
"rosa": "#F49AC2", // Rosa Gaudete/Laetare (Domingos de alegría)
"morado/negro": "#2E0854", // Un morado muy solemne para momentos de luto/difuntos
"violeta": "#9932CC" // Violeta para destacar elementos de oración
};
// Colores vivos para el dot indicador
const mapaColoresVivos = {
"verde": "#4CAF50", "morado": "#5d2d91", "blanco": "#F0E8D0",
"rojo": "#F44336", "azul": "#42A5F5", "rosa": "#EC407A",
"morado/negro": "#5d2d91", "violeta": "#78909C"
const mapaColores = {
"verde": "#2d5a27",
"morado": "#5d2d91",
"blanco": "#ffffff",
"rojo": "#b30000",
"azul": "#0074d9",
"rosa": "#e7b1cc",
"violeta": "#a0b5b0"
};
if (datosHoy) {
const colorBg = mapaFondos[datosHoy.color] || "#060D18";
cabeceraHoy.style.backgroundColor = colorBg;
if (menuPrincipalElem) menuPrincipalElem.style.backgroundColor = colorBg;
const colorReal = mapaColores[datosHoy.color] || "#333";
const colorTexto = (datosHoy.color === "blanco" || datosHoy.color === "rosa") ? "#2b2b2b" : "#ffffff";
// Actualizar solo los spans internos, no destruir el div entero
const nombreTiempoElem = document.getElementById('tiempo-liturgico');
const colorDiaElem = document.getElementById('color-liturgico');
cabeceraHoy.style.backgroundColor = colorReal;
menuPrincipalElem.style.backgroundColor = colorReal;
cabeceraHoy.style.color = colorTexto;
if (nombreTiempoElem) nombreTiempoElem.textContent = datosHoy.tiempo;
if (colorDiaElem) {
colorDiaElem.style.backgroundColor = mapaColoresVivos[datosHoy.color] || "#8BAAD4";
}
const tituloMain = cabeceraHoy.querySelector('.titulo');
if (tituloMain) tituloMain.style.color = colorTexto;
indicadorLiturgicoElem.textContent = datosHoy.tiempo;
indicadorLiturgicoElem.style.color = colorTexto;
} else {
indicadorLiturgicoElem.textContent = "-";
}
} catch (error) {

341
js/intenciones.js Executable file → Normal file
View File

@ -1,340 +1,61 @@
// ================================
// INTENCIONES DE ORACIÓN
// Ámbitos: personal / parroquia / grupo
// Requiere: api-config.js, auth.js
// ================================
// Cargar intenciones desde localStorage
let intenciones = JSON.parse(localStorage.getItem("intenciones")) || [];
const muro = document.getElementById("muro-intenciones");
const input = document.getElementById("nueva-intencion");
const btn = document.getElementById("btn-guardar");
// Iconos disponibles
const iconos = ["vela.png", "flor.png", "cruz.png"];
let ambitoActual = "personal";
let grupoActualId = null;
let usuario = null;
// ── INICIALIZACIÓN ──────────────────────────────────────────
function init() {
usuario = verificarAuth();
if (!usuario) return; // verificarAuth ya redirige a login si no hay sesión
configurarPestanas();
configurarSelectorGrupo();
cargarIntenciones();
document.getElementById("btn-guardar").addEventListener("click", guardarIntencion);
document.getElementById("nueva-intencion").addEventListener("keydown", e => {
if (e.key === "Enter") guardarIntencion();
});
document.getElementById("btn-guardar-difunto").addEventListener("click", agregarDifunto);
document.getElementById("difunto-nombre").addEventListener("keydown", e => {
if (e.key === "Enter") agregarDifunto();
});
}
// ── PESTAÑAS ────────────────────────────────────────────────
function configurarPestanas() {
// Mostrar pestaña de parroquia si el usuario pertenece a una
if (usuario.parroquia) {
const tabParroquia = document.getElementById("tab-parroquia");
tabParroquia.style.display = "";
tabParroquia.textContent = `${usuario.parroquia.nombre}`;
}
// Mostrar pestaña de comunidad si el usuario tiene grupos
if (usuario.grupos && usuario.grupos.length > 0) {
document.getElementById("tab-grupo").style.display = "";
}
document.querySelectorAll(".pestana").forEach(btn => {
btn.addEventListener("click", () => {
document.querySelectorAll(".pestana").forEach(b => b.classList.remove("activa"));
btn.classList.add("activa");
ambitoActual = btn.dataset.ambito;
const esDifuntos = ambitoActual === "difuntos";
document.getElementById("panel-difuntos").style.display = esDifuntos ? "block" : "none";
document.getElementById("formulario-intencion").style.display = esDifuntos ? "none" : "flex";
document.getElementById("muro-intenciones").style.display = esDifuntos ? "none" : "flex";
document.getElementById("sin-intenciones").style.display = "none";
if (esDifuntos) {
cargarDifuntos();
} else {
actualizarSelectorGrupo();
cargarIntenciones();
}
});
});
}
// ── SELECTOR DE GRUPO ───────────────────────────────────────
function configurarSelectorGrupo() {
if (!usuario.grupos || usuario.grupos.length === 0) return;
const select = document.getElementById("select-grupo");
usuario.grupos.forEach(g => {
const option = document.createElement("option");
option.value = g.id;
option.textContent = g.nombre;
select.appendChild(option);
});
grupoActualId = usuario.grupos[0].id;
select.addEventListener("change", () => {
grupoActualId = parseInt(select.value);
cargarIntenciones();
});
}
function actualizarSelectorGrupo() {
const selector = document.getElementById("selector-grupo");
selector.style.display = ambitoActual === "grupo" ? "block" : "none";
}
// La clave del fallback de intenciones también es por usuario
function keyIntenciones() {
return `intenciones_${usuario ? usuario.id : "anonimo"}`;
}
// ── CARGA DE INTENCIONES ─────────────────────────────────────
async function cargarIntenciones() {
const muro = document.getElementById("muro-intenciones");
const sinIntenciones = document.getElementById("sin-intenciones");
muro.innerHTML = "";
let endpoint;
if (ambitoActual === "personal") {
endpoint = "/intenciones/personales";
} else if (ambitoActual === "parroquia") {
endpoint = `/intenciones/parroquia/${usuario.parroquia.id}`;
} else {
if (!grupoActualId) return;
endpoint = `/intenciones/grupo/${grupoActualId}`;
}
try {
const response = await apiCall(endpoint);
if (!response || !response.ok) {
sinIntenciones.style.display = "block";
return;
}
const intenciones = await response.json();
if (intenciones.length === 0) {
sinIntenciones.style.display = "block";
return;
}
sinIntenciones.style.display = "none";
intenciones.forEach(i => crearHexagono(i));
} catch (e) {
// Si no hay conexión, mostrar las intenciones personales del localStorage como fallback
if (ambitoActual === "personal") {
const local = JSON.parse(localStorage.getItem(keyIntenciones()) || localStorage.getItem("intenciones") || "[]");
if (local.length === 0) {
sinIntenciones.style.display = "block";
} else {
local.forEach(i => crearHexagono({ texto: i.texto, icono: i.icono, esPropia: true }));
}
} else {
sinIntenciones.style.display = "block";
}
}
}
// ── GUARDAR INTENCIÓN ────────────────────────────────────────
async function guardarIntencion() {
const input = document.getElementById("nueva-intencion");
const texto = input.value.trim();
if (!texto) return;
const icono = iconos[Math.floor(Math.random() * iconos.length)];
const body = { texto, icono, ambito: ambitoActual };
if (ambitoActual === "parroquia") body.parroquiaId = usuario.parroquia.id;
if (ambitoActual === "grupo") body.grupoId = grupoActualId;
try {
const response = await apiCall("/intenciones", {
method: "POST",
body: JSON.stringify(body)
});
if (response && response.ok) {
const nueva = await response.json();
crearHexagono({ ...nueva, esPropia: true });
document.getElementById("sin-intenciones").style.display = "none";
}
} catch (e) {
// Fallback local solo para intenciones personales
if (ambitoActual === "personal") {
const local = JSON.parse(localStorage.getItem(keyIntenciones()) || "[]");
local.push({ texto, icono });
localStorage.setItem(keyIntenciones(), JSON.stringify(local));
crearHexagono({ texto, icono, esPropia: true, id: null });
document.getElementById("sin-intenciones").style.display = "none";
}
}
input.value = "";
}
// ── HEXÁGONO ─────────────────────────────────────────────────
function crearHexagono(intencion) {
const muro = document.getElementById("muro-intenciones");
// Crear un hexágono
function crearHexagono(intencion, icono) {
const hex = document.createElement("div");
hex.className = "hexagono";
hex.dataset.texto = intencion.texto;
hex.dataset.icono = intencion.icono || iconos[0];
hex.dataset.autor = intencion.autorNombre || "";
hex.dataset.id = intencion.id || "";
hex.dataset.esPropia = intencion.esPropia || (intencion.usuarioId === usuario?.id) ? "true" : "false";
hex.dataset.intencion = intencion;
hex.dataset.icono = icono;
hex.innerHTML = `<img src="img/iconos/${icono}" class="icono-intencion">`;
hex.innerHTML = `<img src="img/iconos/${hex.dataset.icono}" class="icono-intencion" alt="icono intención">`;
muro.appendChild(hex);
}
// ── DIFUNTOS ─────────────────────────────────────────────────
// Guardar intención
btn.addEventListener("click", () => {
const texto = input.value.trim();
if (texto === "") return;
// La clave incluye el id del usuario para que cada cuenta tenga sus propios difuntos
function keyDifuntos() {
return `difuntos_personales_${usuario ? usuario.id : "anonimo"}`;
}
const icono = iconos[Math.floor(Math.random() * iconos.length)];
function obtenerDifuntos() {
return JSON.parse(localStorage.getItem(keyDifuntos()) || "[]");
}
intenciones.push({ texto, icono });
localStorage.setItem("intenciones", JSON.stringify(intenciones));
function agregarDifunto() {
const nombre = document.getElementById("difunto-nombre").value.trim();
if (!nombre) return;
crearHexagono(texto, icono);
input.value = "";
});
const nacimiento = document.getElementById("difunto-nacimiento").value || null;
const defuncion = document.getElementById("difunto-defuncion").value || null;
const difuntos = obtenerDifuntos();
difuntos.push({ id: Date.now().toString(), nombre, nacimiento, defuncion });
localStorage.setItem(keyDifuntos(), JSON.stringify(difuntos));
document.getElementById("difunto-nombre").value = "";
document.getElementById("difunto-nacimiento").value = "";
document.getElementById("difunto-defuncion").value = "";
cargarDifuntos();
}
function eliminarDifunto(id) {
const difuntos = obtenerDifuntos().filter(d => d.id !== id);
localStorage.setItem(keyDifuntos(), JSON.stringify(difuntos));
}
function cargarDifuntos() {
const lista = document.getElementById("lista-difuntos");
const sinDifuntos = document.getElementById("sin-difuntos");
const difuntos = obtenerDifuntos();
lista.innerHTML = "";
if (difuntos.length === 0) {
sinDifuntos.style.display = "block";
return;
}
sinDifuntos.style.display = "none";
difuntos.forEach(d => {
const li = document.createElement("li");
li.className = "item-difunto";
const etiquetas = [];
if (d.nacimiento) {
const f = new Date(d.nacimiento + "T12:00:00");
etiquetas.push(`<span class="difunto-fecha">🎂 ${f.toLocaleDateString("es-ES", { day: "numeric", month: "long", year: "numeric" })}</span>`);
}
if (d.defuncion) {
const f = new Date(d.defuncion + "T12:00:00");
etiquetas.push(`<span class="difunto-fecha">✝ ${f.toLocaleDateString("es-ES", { day: "numeric", month: "long", year: "numeric" })}</span>`);
}
li.innerHTML = `
<div class="difunto-info">
<span class="difunto-nombre">🕯 ${d.nombre}</span>
${etiquetas.join("")}
</div>
<button class="btn-eliminar-difunto" data-id="${d.id}" title="Eliminar"></button>
`;
lista.appendChild(li);
});
lista.querySelectorAll(".btn-eliminar-difunto").forEach(btn => {
btn.addEventListener("click", () => {
eliminarDifunto(btn.dataset.id);
cargarDifuntos();
});
});
}
// ── MODAL ────────────────────────────────────────────────────
// Mostrar intenciones guardadas
intenciones.forEach(i => crearHexagono(i.texto, i.icono));
// MODAL
const modal = document.getElementById("modal-intencion");
const cerrar = document.getElementById("cerrar-modal");
const textoModal = document.getElementById("texto-modal");
const iconoModal = document.getElementById("icono-modal");
const autorModal = document.getElementById("autor-modal");
const btnBorrar = document.getElementById("btn-borrar-modal");
let intencionActivaId = null;
// Abrir modal al tocar un hexágono
document.addEventListener("click", e => {
const hex = e.target.closest(".hexagono");
if (!hex) return;
textoModal.textContent = hex.dataset.texto;
textoModal.textContent = hex.dataset.intencion;
iconoModal.src = "img/iconos/" + hex.dataset.icono;
autorModal.textContent = hex.dataset.autor ? `${hex.dataset.autor}` : "";
intencionActivaId = hex.dataset.id || null;
// Solo mostrar botón borrar si es la propia intención
btnBorrar.style.display = hex.dataset.esPropia === "true" ? "inline-block" : "none";
modal.classList.add("visible");
});
// Cerrar modal
cerrar.onclick = () => modal.classList.remove("visible");
modal.onclick = e => { if (e.target === modal) modal.classList.remove("visible"); };
btnBorrar.onclick = async () => {
if (!intencionActivaId) return;
try {
const response = await apiCall(`/intenciones/${intencionActivaId}`, { method: "DELETE" });
if (response && response.ok) {
modal.classList.remove("visible");
cargarIntenciones();
}
} catch (e) {
// Fallback local
const local = JSON.parse(localStorage.getItem(keyIntenciones()) || "[]");
const idx = local.findIndex(i => i.texto === textoModal.textContent);
if (idx !== -1) {
local.splice(idx, 1);
localStorage.setItem(keyIntenciones(), JSON.stringify(local));
}
modal.classList.remove("visible");
cargarIntenciones();
}
modal.onclick = e => {
if (e.target === modal) modal.classList.remove("visible");
};
// ── ARRANQUE (se llama desde header.js tras cargar el header) ──
// header.js invoca las funciones de inicialización tras insertar el header.
// Para intenciones, usamos DOMContentLoaded como punto de entrada seguro.
document.addEventListener("DOMContentLoaded", init);

7
js/login.js Executable file → Normal file
View File

@ -13,7 +13,7 @@ async function login() {
}
try {
const response = await fetch(`${API_BASE}/auth/login`, {
const response = await fetch("http://aplicacionesdevanguardia.es:8080/auth/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email, password })
@ -22,14 +22,13 @@ async function login() {
if (response.ok) {
const data = await response.json();
// Guardar token y datos del usuario
// Guardar token
localStorage.setItem("token", data.token);
localStorage.setItem("usuario", JSON.stringify(data.usuario));
msg.textContent = "Inicio de sesión correcto.";
msg.classList.add("success");
// Redirigir a la página de intenciones
// Redirigir a la página privada
setTimeout(() => {
window.location.href = "intenciones.html";
}, 1000);

101
js/register.js Executable file → Normal file
View File

@ -1,108 +1,28 @@
// Carga las parroquias disponibles al iniciar la página
async function cargarParroquias() {
try {
const response = await fetch(`${API_BASE}/parroquias`);
if (!response.ok) return;
const parroquias = await response.json();
const selectParroquia = document.getElementById("parroquia");
parroquias.forEach(p => {
const option = document.createElement("option");
option.value = p.id;
option.textContent = p.nombre;
selectParroquia.appendChild(option);
});
} catch (e) {
// Si no hay conexión, el selector queda vacío pero el formulario sigue funcional
}
}
// Carga los grupos de la parroquia seleccionada
async function cargarGrupos(parroquiaId) {
const selectGrupo = document.getElementById("grupo");
selectGrupo.innerHTML = '<option value="">-- Selecciona un grupo --</option>';
if (!parroquiaId) return;
try {
const response = await fetch(`${API_BASE}/parroquias/${parroquiaId}/grupos`);
if (!response.ok) return;
const grupos = await response.json();
grupos.forEach(g => {
const option = document.createElement("option");
option.value = g.id;
option.textContent = g.nombre;
selectGrupo.appendChild(option);
});
} catch (e) {
// Sin conexión: el selector queda vacío
}
}
// Muestra u oculta los campos de parroquia/grupo según el tipo de usuario
function actualizarFormularioPorTipo() {
const tipo = document.getElementById("tipo-usuario").value;
const bloqueParroquia = document.getElementById("bloque-parroquia");
const bloqueGrupo = document.getElementById("bloque-grupo");
if (tipo === "individual") {
bloqueParroquia.style.display = "none";
bloqueGrupo.style.display = "none";
} else if (tipo === "parroquia") {
bloqueParroquia.style.display = "block";
bloqueGrupo.style.display = "none";
} else if (tipo === "grupo") {
bloqueParroquia.style.display = "block";
bloqueGrupo.style.display = "block";
}
}
async function registrar() {
async function registrar() {
const nombre = document.getElementById("nombre").value.trim();
const email = document.getElementById("email").value.trim();
const password = document.getElementById("password").value.trim();
const tipo = document.getElementById("tipo-usuario").value;
const msg = document.getElementById("mensaje");
msg.textContent = "";
msg.className = "msg";
if (!nombre || !email || !password || !tipo) {
msg.textContent = "Por favor, completa todos los campos obligatorios.";
if (!nombre || !email || !password) {
msg.textContent = "Por favor, completa todos los campos.";
msg.classList.add("error");
return;
}
const parroquiaId = document.getElementById("parroquia")?.value || null;
const grupoId = document.getElementById("grupo")?.value || null;
if (tipo === "parroquia" && !parroquiaId) {
msg.textContent = "Selecciona una parroquia.";
msg.classList.add("error");
return;
}
if (tipo === "grupo" && (!parroquiaId || !grupoId)) {
msg.textContent = "Selecciona parroquia y grupo.";
msg.classList.add("error");
return;
}
const body = { nombre, email, password, tipoUsuario: tipo };
if (parroquiaId) body.parroquiaId = parseInt(parroquiaId);
if (grupoId) body.grupoId = parseInt(grupoId);
try {
const response = await fetch(`${API_BASE}/auth/register`, {
const response = await fetch("http://aplicacionesdevanguardia.es:8080/auth/register", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body)
body: JSON.stringify({ nombre, email, password })
});
if (response.ok) {
msg.textContent = "Cuenta creada correctamente. Ya puedes iniciar sesión.";
msg.textContent = "Cuenta creada correctamente.";
msg.classList.add("success");
setTimeout(() => { window.location.href = "login.html"; }, 2000);
} else {
const error = await response.text();
msg.textContent = "Error: " + error;
@ -113,11 +33,4 @@ async function registrar() {
msg.textContent = "No se pudo conectar con el servidor.";
msg.classList.add("error");
}
}
// Inicialización
document.getElementById("tipo-usuario").addEventListener("change", actualizarFormularioPorTipo);
document.getElementById("parroquia").addEventListener("change", e => cargarGrupos(e.target.value));
cargarParroquias();
actualizarFormularioPorTipo();
}

0
js/rosario.js Executable file → Normal file
View File

0
js/rosario20260118.js Executable file → Normal file
View File

4
login.html Executable file → Normal file
View File

@ -24,12 +24,8 @@
<button onclick="login()">Entrar</button>
<div id="mensaje" class="msg"></div>
<p>¿No tienes una cuenta? <a href="register.html">Regístrate aquí</a></p>
<div class="msg" id="login-msg" style="display: none;">PPPPP</div>
</div>
<script src="js/api-config.js"></script>
<script src="js/auth.js"></script>
<script src="js/header.js"></script>
<script src="js/login.js"></script>

1
oraciones-basicas.html Executable file → Normal file
View File

@ -69,7 +69,6 @@
</main>
<script src="js/auth.js"></script>
<script src="js/header.js"></script>
<script src="js/codigo.js"></script>

View File

@ -9,6 +9,5 @@
<h1>Hola Mundo</h1>
<p>Esta es una página de prueba.</p>
<p>¡Bienvenido a la programación web!</p>
<p>Espero que disfrutes aprendiendo HTML.</p>
</body>
</html>

36
register.html Executable file → Normal file
View File

@ -15,46 +15,20 @@
<div class="container">
<h2>Crear cuenta</h2>
<label for="nombre">Nombre</label>
<input type="text" id="nombre" placeholder="Tu nombre o nombre del grupo">
<label>Nombre</label>
<input type="text" id="nombre" placeholder="Tu nombre">
<label for="email">Email</label>
<label>Email</label>
<input type="email" id="email" placeholder="correo@example.com">
<label for="password">Contraseña</label>
<input type="password" id="password" placeholder="Mínimo 8 caracteres">
<label for="tipo-usuario">Tipo de cuenta</label>
<select id="tipo-usuario">
<option value="individual">Individual</option>
<option value="parroquia">Miembro de parroquia</option>
<option value="grupo">Miembro de comunidad/grupo</option>
</select>
<!-- Se muestra solo si el tipo es parroquia o grupo -->
<div id="bloque-parroquia" style="display:none;">
<label for="parroquia">Parroquia</label>
<select id="parroquia">
<option value="">-- Selecciona tu parroquia --</option>
</select>
</div>
<!-- Se muestra solo si el tipo es grupo -->
<div id="bloque-grupo" style="display:none;">
<label for="grupo">Comunidad / Grupo</label>
<select id="grupo">
<option value="">-- Selecciona un grupo --</option>
</select>
</div>
<label>Contraseña</label>
<input type="password" id="password" placeholder="••••••••">
<button onclick="registrar()">Registrarme</button>
<div id="mensaje" class="msg"></div>
<p>¿Ya tienes cuenta? <a href="login.html">Inicia sesión aquí</a></p>
</div>
<script src="js/api-config.js"></script>
<script src="js/auth.js"></script>
<script src="js/header.js"></script>
<script src="js/register.js"></script>

1
rosario.html Executable file → Normal file
View File

@ -20,7 +20,6 @@
<img src="img/gozosos1.jpg" alt="Rosario Image" id="imagen-misterio" class="imagen-misterio">
</div>
<script src="js/auth.js"></script>
<script src="js/header.js"></script>
<script src="js/rosario.js"></script>
</body>