Grets commited on
Commit
29ccfa6
·
verified ·
1 Parent(s): 60ce794

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +174 -17
index.html CHANGED
@@ -1,19 +1,176 @@
1
  <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
  <!doctype html>
2
+ <html lang="de">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Physics IQ – Minimal-Template</title>
7
+ <meta name="description" content="Schlankes, schnelles Template für eine kleine Projektseite – ideal für GitHub Pages oder Hugging Face Spaces." />
8
+
9
+ <!-- Social Cards (optional, ohne Bild) -->
10
+ <meta property="og:title" content="Physics IQ – Minimal-Template" />
11
+ <meta property="og:description" content="Schnelles Static-Site-Template (HTML/CSS/JS)." />
12
+ <meta property="og:type" content="website" />
13
+ <meta name="twitter:card" content="summary_large_image" />
14
+
15
+ <style>
16
+ :root{
17
+ --bg:#0b0b0c;--surface:#111216;--text:#e9e9ee;--muted:#9aa0a6;--accent:#6ee7ff;--ring:rgba(110,231,255,.35)
18
+ }
19
+ @media (prefers-color-scheme: light){
20
+ :root{--bg:#fafafa;--surface:#fff;--text:#101114;--muted:#5f6368;--accent:#0078ff;--ring:rgba(0,120,255,.2)}
21
+ }
22
+ *{box-sizing:border-box}
23
+ html,body{height:100%}
24
+ body{
25
+ margin:0;
26
+ font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
27
+ color:var(--text);
28
+ background:
29
+ radial-gradient(1200px 800px at 10% -5%, rgba(110,231,255,.08), transparent 40%),
30
+ radial-gradient(900px 700px at 110% 10%, rgba(110,231,255,.06), transparent 40%),
31
+ var(--bg);
32
+ }
33
+ .site-header{
34
+ position:sticky;top:0;z-index:10;
35
+ display:flex;align-items:center;gap:1rem;justify-content:space-between;
36
+ padding:.8rem 1rem;border-bottom:1px solid rgba(255,255,255,.06);
37
+ background:color-mix(in oklab, var(--surface), transparent 35%);
38
+ backdrop-filter:saturate(1.2) blur(8px);
39
+ }
40
+ .logo{font-weight:700;letter-spacing:.2px;text-decoration:none;color:var(--text)}
41
+ .logo span{color:var(--accent)}
42
+ .site-nav{display:flex;gap:.75rem}
43
+ .site-nav a{color:var(--text);text-decoration:none;padding:.4rem .6rem;border-radius:.5rem}
44
+ .site-nav a:hover{outline:2px solid var(--ring);outline-offset:2px}
45
+ .nav-toggle{display:none;background:transparent;border:1px solid rgba(255,255,255,.2);color:var(--text);border-radius:.5rem;padding:.4rem .6rem}
46
+ @media (max-width: 720px){
47
+ .nav-toggle{display:inline-block}
48
+ .site-nav{position:absolute;right:1rem;top:3.4rem;flex-direction:column;padding:.6rem;background:var(--surface);border:1px solid rgba(255,255,255,.1);border-radius:.6rem;display:none}
49
+ .site-nav.open{display:flex}
50
+ }
51
+ .hero{text-align:center;padding:6rem 1rem 4rem;max-width:920px;margin:0 auto}
52
+ .hero h1{font-size:clamp(2rem,3.8vw,3rem);margin:0 0 .5rem}
53
+ .hero p{margin:0 0 1.5rem;color:var(--muted)}
54
+ .btn{display:inline-block;padding:.7rem 1rem;border-radius:.6rem;background:var(--accent);color:#06141b;text-decoration:none;font-weight:600}
55
+ .section{padding:3rem 1rem;max-width:1000px;margin:0 auto}
56
+ .features{display:grid;gap:.6rem;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
57
+ .features li{background:color-mix(in oklab, var(--surface), transparent 10%);border:1px solid rgba(255,255,255,.08);border-radius:.8rem;padding:.9rem}
58
+ .table-wrap{overflow-x:auto;background:color-mix(in oklab, var(--surface), transparent 10%);border-radius:.8rem;border:1px solid rgba(255,255,255,.08)}
59
+ .table-wrap table{width:100%;border-collapse:collapse}
60
+ .table-wrap th,.table-wrap td{padding:.7rem .8rem;border-bottom:1px solid rgba(255,255,255,.06);text-align:left}
61
+ .table-wrap th{font-weight:600}
62
+ .muted{color:var(--muted)}
63
+ .site-footer{padding:2rem 1rem 4rem;text-align:center;color:var(--muted)}
64
+ code{background:rgba(127,127,127,.15);padding:.1rem .3rem;border-radius:.3rem}
65
+ </style>
66
+ </head>
67
+ <body>
68
+ <header class="site-header">
69
+ <a href="#" class="logo">Physics<span>IQ</span></a>
70
+ <button class="nav-toggle" aria-expanded="false" aria-controls="site-nav">☰</button>
71
+ <nav id="site-nav" class="site-nav" aria-label="Hauptnavigation">
72
+ <a href="#home">Home</a>
73
+ <a href="#features">Features</a>
74
+ <a href="#leaderboard">Leaderboard</a>
75
+ <a href="#podcast">Podcast</a>
76
+ <a href="#kontakt">Kontakt</a>
77
+ </nav>
78
+ </header>
79
+
80
+ <main>
81
+ <section id="home" class="hero">
82
+ <h1>Einfaches Static-Site-Template</h1>
83
+ <p>Ideal für GitHub Pages oder Hugging Face Spaces. Keine Abhängigkeiten, nur HTML/CSS/JS.</p>
84
+ <a class="btn" href="#features">Los geht's</a>
85
+ </section>
86
+
87
+ <section id="features" class="section">
88
+ <h2>Was ist drin?</h2>
89
+ <ul class="features">
90
+ <li>Sauberes Grund-Layout (Header, Navigation, Footer)</li>
91
+ <li>Responsives Design &amp; Dark/Light via <code>prefers-color-scheme</code></li>
92
+ <li>Beispiel-Leaderboard (ohne Backend)</li>
93
+ <li>Podcast-Einbettung (HTML5-Audio)</li>
94
+ <li>Ohne Build-Schritt – einfach hochladen</li>
95
+ </ul>
96
+ </section>
97
+
98
+ <section id="leaderboard" class="section">
99
+ <h2>Leaderboard</h2>
100
+ <p class="muted">Diese Tabelle wird clientseitig aus eingebetteten JSON-Daten gerendert.</p>
101
+ <div class="table-wrap">
102
+ <table>
103
+ <thead>
104
+ <tr><th>Platz</th><th>Name</th><th>Punkte</th><th>Letztes Update</th></tr>
105
+ </thead>
106
+ <tbody id="leaderboard-body"><!-- JS rendert hier --></tbody>
107
+ </table>
108
+ </div>
109
+
110
+ <!-- Eingebettete Beispiel-Daten (funktioniert auch lokal ohne Server) -->
111
+ <script id="leaderboard-data" type="application/json">{
112
+ "rows": [
113
+ {"rank": 1, "name": "Alice", "score": 98, "updated": "2025-08-01"},
114
+ {"rank": 2, "name": "Bob", "score": 92, "updated": "2025-07-28"},
115
+ {"rank": 3, "name": "Carol", "score": 89, "updated": "2025-07-20"}
116
+ ]
117
+ }</script>
118
+ </section>
119
+
120
+ <section id="podcast" class="section">
121
+ <h2>Podcast</h2>
122
+ <p class="muted">Datei einfügen: <code>assets/podcast.mp3</code> oder diesen Block löschen.</p>
123
+ <audio controls preload="none">
124
+ <source src="assets/podcast.mp3" type="audio/mpeg" />
125
+ Dein Browser unterstützt das Audio-Element nicht.
126
+ </audio>
127
+ </section>
128
+
129
+ <section id="kontakt" class="section">
130
+ <h2>Kontakt</h2>
131
+ <p>Fragen? <a href="mailto:you@example.com">you@example.com</a></p>
132
+ <p class="muted">Optional: Links zu GitHub, Hugging Face, Twitter …</p>
133
+ </section>
134
+ </main>
135
+
136
+ <footer class="site-footer">
137
+ <small>&copy; <span id="year"></span> Dein Name. Bereitgestellt über GitHub Pages oder Hugging Face Spaces.</small>
138
+ </footer>
139
+
140
+ <script>
141
+ // Mobile-Navi
142
+ const navToggle = document.querySelector('.nav-toggle');
143
+ const nav = document.getElementById('site-nav');
144
+ if (navToggle && nav) {
145
+ navToggle.addEventListener('click', () => {
146
+ const open = nav.classList.toggle('open');
147
+ navToggle.setAttribute('aria-expanded', String(open));
148
+ });
149
+ }
150
+ // Jahr im Footer
151
+ const y = document.getElementById('year');
152
+ if (y) y.textContent = new Date().getFullYear();
153
+
154
+ // Leaderboard-Rendering
155
+ (function renderLeaderboard(){
156
+ const el = document.getElementById('leaderboard-body');
157
+ const dataEl = document.getElementById('leaderboard-data');
158
+ if (!el || !dataEl) return;
159
+ try {
160
+ const data = JSON.parse(dataEl.textContent.trim());
161
+ const rows = Array.isArray(data.rows) ? data.rows : [];
162
+ rows.sort((a,b) => a.rank - b.rank);
163
+ el.innerHTML = rows.map(r => `
164
+ <tr>
165
+ <td>${r.rank}</td>
166
+ <td>${r.name}</td>
167
+ <td>${r.score}</td>
168
+ <td>${r.updated}</td>
169
+ </tr>`).join('');
170
+ } catch (e) {
171
+ el.innerHTML = '<tr><td colspan="4">Fehler beim Laden der Daten.</td></tr>';
172
+ }
173
+ })();
174
+ </script>
175
+ </body>
176
  </html>