-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
62 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,155 +1,75 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<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"> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
font-family: 'Comfortaa', sans-serif; | ||
color: white; | ||
overflow-x: hidden; | ||
} | ||
video#bg-video { | ||
position: fixed; | ||
top: 50%; | ||
left: 50%; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
transform: translate(-50%, -50%); | ||
z-index: -1; | ||
} | ||
a { | ||
color: lightblue; | ||
cursor: pointer; | ||
} | ||
blockquote { | ||
margin: 20px 0; | ||
padding: 10px 20px; | ||
background-color: rgba(0, 0, 0, 0.7); | ||
border-left: 5px solid #ccc; | ||
color: white; | ||
} | ||
code { | ||
font-family: monospace; | ||
padding: 2px 4px; | ||
border-radius: 4px; | ||
background-color: rgba(0, 0, 0, 0.7); | ||
border-left: 5px solid #ccc; | ||
color: white; | ||
} | ||
.content { | ||
background-color: rgba(0, 0, 0, 0.7); | ||
padding: 20px; | ||
border-radius: 10px; | ||
max-width: 800px; | ||
margin: 50px auto; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); | ||
position: relative; | ||
z-index: 1; | ||
# Fondo Borroso. backdrop-filter: blur(10px); | ||
} | ||
|
||
h1, p { | ||
color: white; | ||
} | ||
|
||
#disqus_thread { | ||
margin-top: 20px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<video autoplay muted loop id="bg-video"> | ||
<source src="https://github.com/user-attachments/assets/fd54742d-a7e9-49f4-b268-da16689918c1" type="video/mp4"> | ||
Tu navegador no soporta el elemento de video. | ||
</video> | ||
|
||
<div class="content" id="content"> | ||
<p>Contenido inicial cargado dinámicamente.</p> | ||
</div> | ||
|
||
<script> | ||
async function loadContent(url, updateHistory = true) { | ||
try { | ||
const response = await fetch(url); | ||
if (!response.ok) throw new Error(`Error fetching ${url}: ${response.statusText}`); | ||
const htmlContent = await response.text(); | ||
document.getElementById('content').innerHTML = htmlContent; | ||
<script> | ||
async function loadContent(url, updateHistory = true) { | ||
try { | ||
const response = await fetch(url); | ||
if (!response.ok) throw new Error(`Error fetching ${url}: ${response.statusText}`); | ||
const htmlContent = await response.text(); | ||
document.getElementById('content').innerHTML = htmlContent; | ||
|
||
// Actualiza la URL en la barra de direcciones sin recargar la página | ||
if (updateHistory) { | ||
history.pushState({ url: url }, '', url); | ||
} | ||
// Actualiza la URL en la barra de direcciones sin recargar la página | ||
if (updateHistory) { | ||
history.pushState({ url: url }, '', url); | ||
} | ||
|
||
// Cargar Disqus en la nueva sección | ||
const disqusDiv = document.createElement('div'); | ||
disqusDiv.id = 'disqus_thread'; | ||
document.getElementById('content').appendChild(disqusDiv); | ||
// Cargar Disqus en la nueva sección | ||
const disqusDiv = document.createElement('div'); | ||
disqusDiv.id = 'disqus_thread'; | ||
document.getElementById('content').appendChild(disqusDiv); | ||
|
||
var disqus_config = function () { | ||
this.page.url = window.location.href; | ||
this.page.identifier = document.title; | ||
}; | ||
var disqus_config = function () { | ||
this.page.url = window.location.href; | ||
this.page.identifier = document.title; | ||
}; | ||
|
||
(function() { | ||
var d = document, s = d.createElement('script'); | ||
s.src = 'https://amigos-steam.disqus.com/embed.js'; | ||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
} catch (error) { | ||
console.error(error); | ||
document.getElementById('content').innerHTML = `<p>Error loading content: ${error.message}</p>`; | ||
} | ||
(function() { | ||
var d = document, s = d.createElement('script'); | ||
s.src = 'https://amigos-steam.disqus.com/embed.js'; | ||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
} catch (error) { | ||
console.error(error); | ||
document.getElementById('content').innerHTML = `<p>Error loading content: ${error.message}</p>`; | ||
} | ||
} | ||
|
||
// Manejador de eventos para los enlaces internos | ||
document.addEventListener('click', function(event) { | ||
const target = event.target; | ||
// Manejador de eventos para los enlaces internos | ||
document.addEventListener('click', function(event) { | ||
const target = event.target; | ||
|
||
// Si el elemento clicado es un enlace interno | ||
if (target.tagName === 'A' && target.getAttribute('href').startsWith('web/')) { | ||
event.preventDefault(); // Evita la carga completa de la página | ||
const url = target.getAttribute('href'); | ||
loadContent(url); // Carga el contenido dinámicamente | ||
} | ||
}); | ||
// Si el elemento clicado es un enlace | ||
if (target.tagName === 'A') { | ||
const href = target.getAttribute('href'); | ||
|
||
// Detectar cuando el usuario navega hacia atrás/adelante | ||
window.onpopstate = function(event) { | ||
if (event.state && event.state.url) { | ||
loadContent(event.state.url, false); // Cargar sin modificar el historial | ||
// Verificar si es un enlace interno (que empieza con "web/") o relativo | ||
if (href.startsWith('web/') || href.startsWith('./') || href.startsWith('/')) { | ||
event.preventDefault(); // Evita la carga completa de la página | ||
loadContent(href); // Carga el contenido dinámicamente | ||
} else if (href.startsWith('http://') || href.startsWith('https://')) { | ||
// Para enlaces externos, no hacemos nada, el navegador los manejará | ||
return; | ||
} | ||
}; | ||
|
||
// Cargar contenido inicial basado en el idioma | ||
document.addEventListener("DOMContentLoaded", function() { | ||
const userLang = navigator.language || navigator.userLanguage; | ||
let htmlFile = 'web/ingles.html'; | ||
} | ||
}); | ||
|
||
if (userLang.startsWith('es')) { | ||
htmlFile = 'web/es.html'; | ||
} else if (userLang.startsWith('pt')) { | ||
htmlFile = 'web/pt.html'; | ||
} | ||
// Detectar cuando el usuario navega hacia atrás/adelante | ||
window.onpopstate = function(event) { | ||
if (event.state && event.state.url) { | ||
loadContent(event.state.url, false); // Cargar sin modificar el historial | ||
} | ||
}; | ||
|
||
loadContent(htmlFile); | ||
}); | ||
</script> | ||
// Cargar contenido inicial basado en el idioma | ||
document.addEventListener("DOMContentLoaded", function() { | ||
const userLang = navigator.language || navigator.userLanguage; | ||
let htmlFile = 'web/ingles.html'; | ||
|
||
<script src='https://cdn.jsdelivr.net/npm/@widgetbot/crate@3' async defer> | ||
new Crate({ | ||
server: '1278571215635877908', // Basu | ||
channel: '1280976262504124508' // #basurero-sexta-feira | ||
}) | ||
</script> | ||
if (userLang.startsWith('es')) { | ||
htmlFile = 'web/es.html'; | ||
} else if (userLang.startsWith('pt')) { | ||
htmlFile = 'web/pt.html'; | ||
} | ||
|
||
<noscript> JavaScript OFF.</noscript> | ||
</body> | ||
</html> | ||
loadContent(htmlFile); | ||
}); | ||
</script> |