-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsql.html
More file actions
297 lines (285 loc) · 10.5 KB
/
Copy pathsql.html
File metadata and controls
297 lines (285 loc) · 10.5 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<!doctype html>
<html lang="de" class="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SQL-Labor | AP1 Tracker</title>
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<!-- PWA Meta Tags -->
<link rel="manifest" href="manifest.json" />
<link rel="apple-touch-icon" href="favicon.svg" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
/>
<meta name="theme-color" content="#0ea5e9" />
<!-- Stylesheets -->
<link rel="stylesheet" href="assets/css/style.css?v=2.5.0" />
<!-- Tailwind Configuration -->
<script src="assets/js/tailwind.js?v=2.5.0"></script>
<script>
tailwind.config = {
darkMode: "class",
theme: {
extend: {
fontFamily: {
sans: [
"system-ui",
"-apple-system",
"BlinkMacSystemFont",
"Segoe UI",
"Roboto",
"Helvetica Neue",
"Arial",
"sans-serif",
],
mono: [
"ui-monospace",
"SFMono-Regular",
"Menlo",
"Monaco",
"Consolas",
"Liberation Mono",
"Courier New",
"monospace",
],
},
colors: {
dark: {
bg: "#020617",
card: "#0f172a",
border: "#1e293b",
muted: "#94a3b8",
text: "#f8fafc",
accent: "#0ea5e9",
"accent-hover": "#0284c7",
success: "#10b981",
warning: "#f59e0b",
danger: "#ef4444",
},
},
},
},
};
</script>
</head>
<body
class="bg-dark-bg text-dark-text min-h-screen flex flex-col font-sans selection:bg-dark-accent selection:text-white"
>
<style>
.sql-next-pulse {
animation: sql-pulse 1.4s ease-in-out infinite;
border-color: rgb(16, 185, 129);
color: white;
background-color: rgb(16, 185, 129);
}
@keyframes sql-pulse {
0%,
100% {
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
transform: scale(1);
}
50% {
box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.4);
transform: scale(1.05);
}
}
.sql-next-pulse:hover {
animation: none;
transform: scale(1.06);
box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.55);
}
</style>
<!-- Header -->
<header
class="w-full border-b border-dark-border bg-dark-bg/80 backdrop-blur-md sticky top-0 z-50"
>
<div
class="max-w-6xl mx-auto px-4 h-16 flex items-center justify-between"
>
<a
href="index.html"
class="flex items-center gap-3 group hover:opacity-80 transition-opacity"
>
<div
class="w-8 h-8 rounded-lg bg-dark-card border border-dark-border flex items-center justify-center group-hover:border-dark-accent transition-colors"
>
<i
data-lucide="arrow-left"
class="text-dark-muted group-hover:text-dark-accent transition-colors"
></i>
</div>
<div class="flex flex-col">
<span class="font-bold text-lg tracking-tight leading-none"
>AP1 <span class="text-dark-accent">Tracker</span></span
>
<span class="text-[10px] text-dark-muted font-mono"
>Zurück zum Dashboard</span
>
</div>
</a>
<div class="flex items-center gap-3">
<span
id="streakBadge"
class="text-xs font-mono bg-dark-card border border-dark-border px-2 py-1 rounded text-dark-accent"
>🔥 0</span
>
<span
id="xpBadge"
class="text-xs font-mono bg-dark-card border border-dark-border px-2 py-1 rounded text-emerald-400"
>0 XP</span
>
<span
class="text-xs font-mono bg-dark-card border border-dark-border px-2 py-1 rounded text-dark-muted hidden sm:inline"
>v2.5.0</span
>
</div>
</div>
</header>
<!-- Main Content -->
<main class="flex-grow w-full max-w-6xl mx-auto px-4 py-6">
<div class="text-center mb-6">
<h1
class="text-3xl font-extrabold bg-gradient-to-r from-white to-dark-accent bg-clip-text text-transparent mb-2 pb-1 flex items-center justify-center gap-3"
>
<i data-lucide="database" class="text-dark-accent"></i>
SQL-Labor
</h1>
<p class="text-dark-muted text-sm max-w-xl mx-auto">
Trainiere SQL-Abfragen gegen eine kleine Mock-Datenbank. Tippe deine
Query in den Editor und drücke
<kbd
class="font-mono bg-dark-card border border-dark-border px-1 rounded"
>Strg+Enter</kbd
>.
</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4">
<!-- Schema-Explorer -->
<aside class="lg:col-span-1 space-y-3">
<div class="bg-dark-card border border-dark-border rounded-2xl p-4">
<div class="flex items-center justify-between mb-3">
<h2 class="font-bold text-sm text-white flex items-center gap-2">
<i
data-lucide="table-properties"
class="w-4 h-4 text-dark-accent"
></i>
Datenbank-Schema
</h2>
<button
id="btnReset"
class="text-[10px] font-mono text-dark-muted hover:text-dark-accent flex items-center gap-1"
>
<i data-lucide="rotate-ccw" class="w-3 h-3"></i> Reset
</button>
</div>
<div id="schemaExplorer" class="space-y-3"></div>
</div>
<div
class="bg-dark-card border border-dark-border rounded-2xl p-4 text-xs text-dark-muted leading-relaxed"
>
<h3
class="font-bold text-white mb-2 text-sm flex items-center gap-2"
>
<i data-lucide="lightbulb" class="w-4 h-4 text-amber-400"></i>
Hinweis
</h3>
Alle Daten werden lokal in deinem Browser gehalten. Es wird keine
Verbindung zu einem echten DBMS aufgebaut – das SQL wird direkt im
JS-Parser ausgeführt.
</div>
</aside>
<!-- Editor + Result -->
<section class="lg:col-span-2 space-y-4">
<!-- Aufgabenstellung -->
<div class="bg-dark-card border border-dark-border rounded-2xl p-5">
<div class="flex items-center justify-between flex-wrap gap-2 mb-3">
<div class="flex items-center gap-2">
<span
id="taskLevel"
class="bg-dark-accent/15 text-dark-accent px-2 py-0.5 rounded text-[10px] font-black uppercase tracking-wider"
>Stufe 1</span
>
<span id="taskCounter" class="text-dark-muted text-xs font-mono"
>1 / 10</span
>
</div>
<div class="flex items-center gap-2">
<button
id="btnPrev"
class="px-2 py-1 bg-dark-bg border border-dark-border rounded-lg text-dark-muted hover:text-white text-xs"
>
<i data-lucide="chevron-left" class="w-3 h-3 inline"></i>
Zurück
</button>
<button
id="btnNext"
class="px-2 py-1 bg-dark-bg border border-dark-border rounded-lg text-dark-muted hover:text-white text-xs"
>
Weiter
<i data-lucide="chevron-right" class="w-3 h-3 inline"></i>
</button>
</div>
</div>
<h2 id="taskTitle" class="text-lg font-bold text-white mb-2"></h2>
<p
id="taskPrompt"
class="text-dark-muted text-sm leading-relaxed"
></p>
</div>
<!-- Editor -->
<div class="bg-dark-card border border-dark-border rounded-2xl p-3">
<div class="flex items-center justify-between mb-2 px-1">
<span
class="text-[10px] font-mono uppercase tracking-wider text-dark-muted"
>SQL-Editor</span
>
<button
id="btnRun"
class="px-3 py-1.5 bg-dark-accent text-white rounded-lg font-bold text-xs hover:bg-dark-accent-hover transition-all flex items-center gap-1"
>
<i data-lucide="play" class="w-3 h-3"></i> Ausführen
</button>
</div>
<textarea
id="editor"
spellcheck="false"
class="w-full h-32 bg-dark-bg border border-dark-border rounded-lg p-3 font-mono text-sm text-slate-200 focus:outline-none focus:border-dark-accent resize-y"
placeholder="SELECT * FROM Mitarbeiter;"
></textarea>
</div>
<!-- Feedback -->
<div id="feedback"></div>
<!-- Live-Ergebnis -->
<div class="bg-dark-card border border-dark-border rounded-2xl p-4">
<div class="flex items-center justify-between mb-2">
<h2 class="font-bold text-sm text-white flex items-center gap-2">
<i data-lucide="table-2" class="w-4 h-4 text-dark-accent"></i>
Live-Ergebnis
</h2>
</div>
<div id="resultTable"></div>
</div>
</section>
</div>
</main>
<footer class="text-center text-[10px] text-dark-muted py-4 font-mono">
SQL-Labor v2.5.0 · Mock-Engine · Offline-fähig
</footer>
<script src="assets/js/lucide.min.js?v=2.5.0"></script>
<script src="assets/js/confetti.js?v=2.5.0"></script>
<script src="assets/js/sql.js?v=2.5.0"></script>
<script>
if (window.lucide) lucide.createIcons();
</script>
<script>
// Service Worker Registration
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker.register("sw.js?v=2.5.0").catch(() => {});
});
}
</script>
</body>
</html>