Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
weskerty authored Sep 16, 2024
1 parent 810a4e4 commit 8cebc9b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🔮Mystic Bot🔮</title>
<title>Hispanic Galaxy</title>
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:[email protected]&display=swap" rel="stylesheet">
<link rel="icon" type="image/x-icon" href="web/favicon.ico">
<link rel="stylesheet" href="web/estilo.css"> <!-- Para Cambiar el Estilo/Tema facilmente -->
Expand Down Expand Up @@ -80,6 +80,9 @@
if (target.tagName === 'A') {
let href = target.getAttribute('href');

// Desplazar hacia arriba al hacer clic en un enlace
window.scrollTo({ top: 0, behavior: 'smooth' });

if (href.startsWith('web/') || href.startsWith('./') || href.startsWith('/')) {
event.preventDefault();

Expand All @@ -89,16 +92,19 @@

loadContent(href);
} else if (href.startsWith('http://') || href.startsWith('https://')) {

event.preventDefault();
href = getLocalizedUrl(href);
window.location.href = href;

// Usar setTimeout para permitir que el desplazamiento a la parte superior se complete antes de redirigir
setTimeout(() => {
window.location.href = href;
}, 300); // Ajusta el tiempo si es necesario
}
}
});
</script>

<!-- Este es el Widget de Discord, se puede personalizar para tu Server -->
<!-- Este es el Widget de Discord, se puede personalizar para tu Server -->
<script src='https://cdn.jsdelivr.net/npm/@widgetbot/crate@3' async defer>
new Crate({
server: '1278571215635877908', // Basu
Expand Down

0 comments on commit 8cebc9b

Please sign in to comment.