forked from brendacalazans/DBQuest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
150 lines (132 loc) · 5.09 KB
/
index.html
File metadata and controls
150 lines (132 loc) · 5.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Meta tags para SEO e acessibilidade -->
<meta name="description" content="DBQuest - Plataforma gamificada de aprendizado de banco de dados com exercícios interativos, sistema de vidas e ranking competitivo.">
<meta name="keywords" content="banco de dados, SQL, NoSQL, aprendizado, gamificação, educação">
<meta name="author" content="DBQuest Team">
<!-- Open Graph para redes sociais -->
<meta property="og:title" content="DBQuest - Aprenda Banco de Dados de Forma Interativa">
<meta property="og:description" content="Plataforma gamificada de aprendizado de banco de dados com exercícios interativos.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://dbquest.vercel.app">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="DBQuest - Aprenda Banco de Dados">
<meta name="twitter:description" content="Plataforma gamificada de aprendizado de banco de dados.">
<title>DBQuest - Redirecionando...</title>
<script type="module">
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.12.2/firebase-app.js";
import { getAuth, onAuthStateChanged } from "https://www.gstatic.com/firebasejs/10.12.2/firebase-auth.js";
const firebaseConfig = {
apiKey: "AIzaSyDoI9Az5udHaeUHOybJc5-YW75oV-kKtgs",
authDomain: "dataquest-c39fd.firebaseapp.com",
databaseURL: "https://dataquest-c39fd-default-rtdb.firebaseio.com",
projectId: "dataquest-c39fd",
storageBucket: "dataquest-c39fd.appspot.com",
messagingSenderId: "130744038521",
appId: "1:130744038521:web:432aaa66a10650210e50a8"
};
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
// Redireciona baseado no estado de autenticação
onAuthStateChanged(auth, (user) => {
if (user) {
window.location.href = '/src/pages/home.html';
} else {
window.location.href = '/src/pages/auth.html';
}
});
</script>
<style>
/* Estilos inline para a página de carregamento */
body {
margin: 0;
padding: 0;
background: #1f2937;
color: white;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
font-family: system-ui, -apple-system, sans-serif;
}
.loading-container {
text-align: center;
padding: 1rem;
}
.loading-title {
font-size: clamp(2rem, 5vw, 3rem);
margin-bottom: 1rem;
font-weight: bold;
}
.loading-text {
font-size: 1rem;
color: rgba(255, 255, 255, 0.9);
}
/* Animação de loading acessível */
.loading-spinner {
margin: 1.5rem auto;
width: 40px;
height: 40px;
border: 4px solid rgba(255, 255, 255, 0.3);
border-top-color: #a78bfa;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Respeitar preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
.loading-spinner {
animation: none;
border-top-color: #a78bfa;
opacity: 0.7;
}
}
</style>
</head>
<body>
<!-- Link para pular para o conteúdo principal (acessibilidade) -->
<a href="#main-content" class="sr-only">Pular para o conteúdo principal</a>
<!-- Conteúdo principal com role e aria-label -->
<main id="main-content" role="main" aria-label="Carregamento">
<div class="loading-container">
<h1 class="loading-title">DBQuest</h1>
<div class="loading-spinner" role="status" aria-label="Carregando"></div>
<p class="loading-text" aria-live="polite">Redirecionando...</p>
</div>
</main>
<style>
/* Classe para screen readers only */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
.sr-only:focus {
position: static;
width: auto;
height: auto;
padding: 0.5rem 1rem;
margin: 0;
overflow: visible;
clip: auto;
white-space: normal;
background: #6366f1;
color: white;
text-decoration: none;
border-radius: 0.25rem;
}
</style>
</body>
</html>