Skip to content

Commit

Permalink
Update discografia.html
Browse files Browse the repository at this point in the history
Signed-off-by: Grouvex <168425996+Grouvex@users.noreply.github.com>
  • Loading branch information
Grouvex authored Feb 28, 2025
1 parent b47055c commit 4227733
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions grouvex/discografia.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ <h3 style="margin: 5px 0; font-size: 16px;">${lanzamiento.titulo}</h3>
];

// Filtrar lanzamientos recientes
const lanzamientosRecientes = todosLosLanzamientos.filter(lanzamiento => lanzamiento.fecha >= unMesAntes && lanzamiento.fecha <= ahora);
const lanzamientosRecientes = todosLosLanzamientos.filter(lanzamiento => lanzamiento.fechaL >= unMesAntes && lanzamiento.fechaL <= ahora);

// Ordenar lanzamientos por fecha (de más reciente a más antiguo)
lanzamientosRecientes.sort((a, b) => b.fecha - a.fecha);
lanzamientosRecientes.sort((a, b) => b.fechaL - a.fechaL);

const contenedorRecientes = document.getElementById('lanzamientos-recientes');
if (contenedorRecientes) {
Expand Down Expand Up @@ -376,7 +376,9 @@ <h2>Álbums</h2>
`;

albumes.forEach(album => {
actualizarFechas(album.fecha, `f1_${album.fecha}`);
if (album.fechaO != null) {actualizarFechas(album.fechaO, `fecha-${album.fechaO}`);}
if (album.fechaL != null) {actualizarFechas(album.fechaL, `fecha-${album.fechaL}`);}
if (album.fechaPS != null) {actualizarFechas(album.fechaPS, `fecha-${album.fechaPS}`);}
});
} else {
console.error('El elemento con id="contenido" no existe en el DOM.');
Expand Down Expand Up @@ -418,7 +420,9 @@ <h2>Reproducción Extendida (EP)</h2>
`;

ep.forEach(ep => {
actualizarFechas(ep.fecha, `f1_${ep.fecha}`);
if (ep.fechaO != null) {actualizarFechas(ep.fechaO, `fecha-${ep.fechaO}`);}
if (ep.fechaL != null) {actualizarFechas(ep.fechaL, `fecha-${ep.fechaL}`);}
if (ep.fechaPS != null) {actualizarFechas(ep.fechaPS, `fecha-${ep.fechaPS}`);}
});
} else {
console.error('El elemento con id="contenido" no existe en el DOM.');
Expand Down

0 comments on commit 4227733

Please sign in to comment.