-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
241 lines (231 loc) · 8.88 KB
/
Copy pathindex.html
File metadata and controls
241 lines (231 loc) · 8.88 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Games · Tejas Wavde</title>
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="description" content="Twelve handcrafted games — classics and LinkedIn-style logic puzzles. Mobile-friendly, mouse/touch-first, no build deps.">
<meta name="theme-color" content="#0a0a0a">
<meta property="og:title" content="Games">
<meta property="og:description" content="Twelve handcrafted games — classics and logic puzzles.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://wavde.github.io/games/">
<meta name="twitter:card" content="summary">
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<link rel="apple-touch-icon" href="favicon.svg">
<link rel="manifest" href="manifest.json">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&display=swap">
<link rel="stylesheet" href="shared.css">
<style>
/* Hub-specific overrides on top of shared.css tokens */
.wrap { max-width: 1000px; padding: 56px 24px 80px; }
@media (max-width: 560px) { .wrap { padding: 32px 16px 48px; } }
.hero {
display: grid;
grid-template-columns: auto 1fr;
gap: 48px;
align-items: start;
margin-bottom: 48px;
}
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; gap: 20px; } }
.hero .ascii {
font-size: 11px;
}
@media (min-width: 720px) { .hero .ascii { font-size: 14px; } }
.tag {
text-transform: uppercase;
color: var(--muted);
font-size: 12px;
letter-spacing: 0.5px;
margin: 0 0 14px;
}
.tag .dot { color: var(--accent); }
.lede {
font-size: 20px;
line-height: 1.4;
color: var(--fg);
margin: 0 0 18px;
letter-spacing: -0.2px;
font-weight: 400;
}
.lede .mute { color: var(--muted); }
@media (max-width: 560px) { .lede { font-size: 17px; } }
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 0;
border: 1px solid var(--border);
border-radius: 6px;
overflow: hidden;
background: var(--bg-2);
}
.card {
display: block;
padding: 22px 20px;
border-right: 1px solid var(--border);
border-bottom: 1px solid var(--border);
background: var(--bg-2);
transition: background 0.15s ease;
position: relative;
min-height: 110px;
}
.card:hover { background: var(--panel); color: var(--fg); }
.card:hover .arrow { color: var(--accent); transform: translateX(2px); }
.card .num {
color: var(--dim);
font-size: 11px;
letter-spacing: 1px;
margin-bottom: 10px;
}
.card h3 {
margin: 0 0 6px;
font-size: 16px;
font-weight: 500;
letter-spacing: -0.2px;
color: var(--fg);
}
.card p {
margin: 0;
color: var(--muted);
font-size: 12px;
line-height: 1.5;
}
.card .arrow {
position: absolute;
top: 22px;
right: 20px;
color: var(--dim);
transition: color 0.15s, transform 0.15s;
font-size: 14px;
}
.card .badge {
display: inline-block;
margin-top: 10px;
font-size: 10px;
letter-spacing: 1px;
color: var(--accent-2);
text-transform: uppercase;
}
.footer {
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid var(--border);
color: var(--muted);
font-size: 12px;
display: flex;
flex-wrap: wrap;
gap: 14px;
justify-content: space-between;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--fg); }
.footer .links { display: flex; gap: 14px; flex-wrap: wrap; }
/* Theme toggle in footer */
.theme-toggle {
background: transparent;
border: 1px solid var(--border);
color: var(--muted);
padding: 4px 10px;
min-height: 28px;
border-radius: 4px;
font-family: inherit;
font-size: 11px;
letter-spacing: 0.5px;
text-transform: uppercase;
cursor: pointer;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--border-hi); }
</style>
</head>
<body>
<main class="wrap">
<header class="hero">
<pre class="ascii" aria-hidden="true"> ██████╗ █████╗ ███╗ ███╗███████╗███████╗
██╔════╝ ██╔══██╗████╗ ████║██╔════╝██╔════╝
██║ ███╗███████║██╔████╔██║█████╗ ███████╗
██║ ██║██╔══██║██║╚██╔╝██║██╔══╝ ╚════██║
╚██████╔╝██║ ██║██║ ╚═╝ ██║███████╗███████║
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝</pre>
<div>
<p class="tag"><span class="dot">▍</span> A small, handcrafted arcade</p>
<p class="lede">Twelve games — classics and logic puzzles. <span class="mute">Mouse/touch-first, keyboard support in select games, no logins, no ads — just pixels and problems to solve.</span></p>
<div class="prompt"><span class="sigil">$</span><span class="cmd">pick-a-game</span><span class="caret"></span></div>
</div>
</header>
<h2 class="section-head">Classics</h2>
<nav class="grid" aria-label="Classic games">
<a class="card" href="tic-tac-toe/">
<div class="num">01</div><h3>Tic-Tac-Toe</h3><p>Unbeatable minimax. Try to draw.</p><span class="arrow">→</span>
</a>
<a class="card" href="2048/">
<div class="num">02</div><h3>2048</h3><p>Slide and merge. Reach the tile.</p><span class="arrow">→</span>
</a>
<a class="card" href="minesweeper/">
<div class="num">03</div><h3>Minesweeper</h3><p>Tap to reveal, long-press to flag.</p><span class="arrow">→</span>
</a>
<a class="card" href="memory/">
<div class="num">04</div><h3>Memory Match</h3><p>Flip pairs. Beat your best time.</p><span class="arrow">→</span>
</a>
<a class="card" href="chess/">
<div class="num">05</div><h3>Chess</h3><p>vs. a small minimax engine.</p><span class="arrow">→</span>
</a>
<a class="card" href="connect-four/">
<div class="num">06</div><h3>Connect Four</h3><p>Drop four in a row. Three AI depths.</p><span class="badge">new</span><span class="arrow">→</span>
</a>
<a class="card" href="lights-out/">
<div class="num">07</div><h3>Lights Out</h3><p>Toggle every light off. Fewer moves = better.</p><span class="badge">new</span><span class="arrow">→</span>
</a>
</nav>
<h2 class="section-head">Logic Puzzles</h2>
<nav class="grid" aria-label="Logic puzzle games">
<a class="card" href="mini-sudoku/">
<div class="num">08</div><h3>Mini Sudoku</h3><p>6×6 grid, 2×3 boxes. Three difficulties.</p><span class="badge">new</span><span class="arrow">→</span>
</a>
<a class="card" href="tango/">
<div class="num">09</div><h3>Tango</h3><p>Suns and moons. No three in a row.</p><span class="badge">new</span><span class="arrow">→</span>
</a>
<a class="card" href="queens/">
<div class="num">10</div><h3>Queens</h3><p>One per row, column, and region.</p><span class="badge">new</span><span class="arrow">→</span>
</a>
<a class="card" href="zip/">
<div class="num">11</div><h3>Zip</h3><p>Draw one path. Visit the numbers in order.</p><span class="badge">new</span><span class="arrow">→</span>
</a>
<a class="card" href="patches/">
<div class="num">12</div><h3>Patches</h3><p>Cover the grid with shaped rectangles.</p><span class="badge">new</span><span class="arrow">→</span>
</a>
</nav>
<footer class="footer">
<div>© Tejas Wavde · MIT</div>
<div class="links">
<button class="theme-toggle" id="theme-toggle" type="button" aria-label="Toggle theme">theme</button>
<a href="https://github.com/wavde/games">source</a>
<a href="https://wavde.github.io">home</a>
</div>
</footer>
</main>
<script>
// Theme toggle: cycles dark → light → system
(function () {
const KEY = "games:theme";
const btn = document.getElementById("theme-toggle");
const html = document.documentElement;
function apply(mode) {
if (mode === "light" || mode === "dark") html.setAttribute("data-theme", mode);
else html.removeAttribute("data-theme");
btn.textContent = "theme: " + (mode || "system");
try { mode ? localStorage.setItem(KEY, mode) : localStorage.removeItem(KEY); } catch (e) {}
}
let mode = null;
try { mode = localStorage.getItem(KEY); } catch (e) {}
apply(mode);
btn.addEventListener("click", () => {
const cur = html.getAttribute("data-theme");
const next = cur === "dark" ? "light" : cur === "light" ? null : "dark";
apply(next);
});
})();
</script>
</body>
</html>