297 lines
6.2 KiB
HTML
297 lines
6.2 KiB
HTML
<!doctype html>
|
|
<html lang="pt-BR">
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
|
|
|
|
<meta name="author" content="Bass Pago" />
|
|
<meta name="robots" content="index, follow" />
|
|
|
|
<meta property="og:locale" content="pt_BR" />
|
|
<meta property="og:type" content="website" />
|
|
<meta property="og:site_name" content="Bass Pago" />
|
|
|
|
<meta name="theme-color" content="#000000" />
|
|
|
|
<link rel="preload" as="video" href="/preloading.mp4" type="video/mp4" />
|
|
|
|
<link rel="preload" as="font" href="https://fonts.gstatic.com/s/spacegrotesk/v16/V8mQQVjrQBjbgLWXFyfnJQ.woff2"
|
|
type="font/woff2" crossorigin />
|
|
<link rel="preload" as="image" href="/src/lib/assets/backgroundSection2.png" />
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link rel="dns-prefetch" href="https://devs.basspago.com.br" />
|
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet"
|
|
media="print" onload="this.media='all'" />
|
|
|
|
<script src="//code.jivosite.com/widget/8fspsVOybp" async></script>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
background: #000;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#video-preloader {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background: #000;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 9999;
|
|
transition: opacity 0.8s ease, visibility 0.8s ease;
|
|
}
|
|
|
|
#video-preloader.hidden {
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
}
|
|
|
|
.video-container {
|
|
position: relative;
|
|
width: 800px;
|
|
height: 450px;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.preloader-video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.video-fallback {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: #000;
|
|
border-radius: 8px;
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.fallback-logo {
|
|
width: 100px;
|
|
height: 100px;
|
|
border: 4px solid #41FE95;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 32px;
|
|
font-weight: 700;
|
|
color: #41FE95;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
#app {
|
|
opacity: 0;
|
|
transition: opacity 0.8s ease;
|
|
}
|
|
|
|
#app.loaded {
|
|
opacity: 1;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
|
|
0%,
|
|
100% {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
|
|
50% {
|
|
transform: scale(1.1);
|
|
opacity: 0.8;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.video-container {
|
|
width: 700px;
|
|
height: 394px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.video-container {
|
|
width: 600px;
|
|
height: 338px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 650px) {
|
|
.video-container {
|
|
width: 500px;
|
|
height: 281px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 550px) {
|
|
.video-container {
|
|
width: 450px;
|
|
height: 253px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.video-container {
|
|
width: 400px;
|
|
height: 225px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 420px) {
|
|
.video-container {
|
|
width: 360px;
|
|
height: 202px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 380px) {
|
|
.video-container {
|
|
width: 320px;
|
|
height: 180px;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
%sveltekit.head%
|
|
</head>
|
|
|
|
<body data-sveltekit-preload-data="hover">
|
|
<div id="video-preloader">
|
|
<div class="video-container">
|
|
<video id="preloader-video" class="preloader-video" autoplay muted playsinline preload="auto">
|
|
<source src="/preloading.mp4" type="video/mp4">
|
|
</video>
|
|
|
|
<div class="video-fallback" id="video-fallback">
|
|
<div class="fallback-logo">BP</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="app" style="display: contents">%sveltekit.body%</div>
|
|
|
|
<script>
|
|
(function () {
|
|
const preloader = document.getElementById('video-preloader');
|
|
const video = document.getElementById('preloader-video');
|
|
const fallback = document.getElementById('video-fallback');
|
|
const app = document.getElementById('app');
|
|
|
|
let videoEnded = false;
|
|
let pageLoaded = false;
|
|
|
|
function hidePreloader() {
|
|
if (preloader) {
|
|
preloader.classList.add('hidden');
|
|
|
|
setTimeout(() => {
|
|
preloader.style.display = 'none';
|
|
if (app) {
|
|
app.classList.add('loaded');
|
|
document.body.style.overflow = 'auto';
|
|
}
|
|
}, 800);
|
|
}
|
|
}
|
|
|
|
function checkIfCanHide() {
|
|
if (videoEnded && pageLoaded) {
|
|
hidePreloader();
|
|
}
|
|
}
|
|
|
|
function showFallback() {
|
|
if (video && fallback) {
|
|
video.style.display = 'none';
|
|
fallback.style.display = 'flex';
|
|
|
|
setTimeout(() => {
|
|
videoEnded = true;
|
|
checkIfCanHide();
|
|
}, 2000);
|
|
}
|
|
}
|
|
|
|
if (video) {
|
|
video.addEventListener('ended', () => {
|
|
console.log('[Preloader] Vídeo terminou');
|
|
videoEnded = true;
|
|
checkIfCanHide();
|
|
});
|
|
|
|
video.addEventListener('error', () => {
|
|
console.log('[Preloader] Erro no vídeo, usando fallback');
|
|
showFallback();
|
|
});
|
|
|
|
const playPromise = video.play();
|
|
if (playPromise !== undefined) {
|
|
playPromise
|
|
.then(() => {
|
|
console.log('[Preloader] Vídeo reproduzindo');
|
|
})
|
|
.catch(() => {
|
|
console.log('[Preloader] Erro ao reproduzir, usando fallback');
|
|
showFallback();
|
|
});
|
|
}
|
|
} else {
|
|
showFallback();
|
|
}
|
|
|
|
window.addEventListener('load', () => {
|
|
console.log('[Preloader] Página carregada');
|
|
pageLoaded = true;
|
|
checkIfCanHide();
|
|
});
|
|
|
|
setTimeout(() => {
|
|
console.log('[Preloader] Timeout de segurança');
|
|
videoEnded = true;
|
|
pageLoaded = true;
|
|
hidePreloader();
|
|
}, 10000);
|
|
|
|
document.body.style.overflow = 'hidden';
|
|
})();
|
|
</script>
|
|
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
window.addEventListener('load', () => {
|
|
navigator.serviceWorker.register('/sw.js')
|
|
.then((registration) => {
|
|
console.log('SW registered: ', registration);
|
|
})
|
|
.catch((registrationError) => {
|
|
console.log('SW registration failed: ', registrationError);
|
|
});
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html> |