forked from avinash201199/Memory-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
167 lines (144 loc) · 6.8 KB
/
Copy pathindex.html
File metadata and controls
167 lines (144 loc) · 6.8 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Vault‑Tec Memory — Pip‑Boy Edition</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Inter:wght@300;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="src/css/styles.css">
<link rel="stylesheet" href="src/css/theme-toggle.css">
<link rel="stylesheet" href="src/css/buttons.css">
<script src="src/js/theme.js" defer></script>
</head>
<body onload="initTheme()">
<div class="app" role="application" aria-label="Vault‑Tec Memory Game">
<aside class="panel" aria-hidden="false">
<div class="brand">
<div class="vault-badge">VT</div>
<div>
<h1 class="title">Vault‑Tec Memory</h1>
<div class="subtitle">Pip‑Boy Training — Find all Tech Pairs</div>
</div>
</div>
<div class="theme-toggle">
<button id="themeToggle" class="theme-toggle-btn" aria-label="Toggle theme">
<span class="theme-icon light">☀️</span>
<span class="theme-icon dark">🌙</span>
</button>
</div>
<div class="score-box">
<div class="score-row">
<div>
<div class="label">Moves</div>
<div class="score-big" id="moves">0</div>
</div>
<div>
<div class="label">Time</div>
<div class="score-big" id="time">00:00</div>
<div class="timer-bar" aria-hidden="true"><div id="timerBar" class="timer-bar-fill"></div></div>
</div>
</div>
<div style="display:flex;align-items:center;justify-content:space-between;gap:0.6rem">
<div>
<div class="label">Star Rating</div>
<div class="stars" id="star-rating">
<div class="star" data-star="1">★</div>
<div class="star" data-star="2">★</div>
<div class="star" data-star="3">★</div>
</div>
</div>
<div style="text-align:right">
<div class="label">Pairs</div>
<div class="score-big" id="pairs">0 / 8</div>
</div>
</div>
<div class="controls">
<button class="btn" id="restart">Restart</button>
<button class="btn ghost" id="hint">Reveal 1 Pair</button>
</div>
<div class="hint">Tip: Try to remember positions — the Pip‑Boy rewards patience.</div>
<!-- Leaderboard (top-5 per difficulty) -->
<div style="margin-top:0.8rem">
<div class="label">Leaderboard</div>
<div class="lb-list" id="leaderboardList"></div>
<div class="lb-controls">
<button class="btn ghost" id="openHighScores">High Scores</button>
<button class="btn ghost" id="exportLb">Export</button>
<button class="btn ghost" id="shareLb">Share</button>
<button class="btn ghost" id="clearLb">Clear</button>
</div>
</div>
</div>
<div style="margin-top:1rem;font-size:0.85rem;color:#89a6cf;display:flex;gap:0.6rem;align-items:center">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden><path d="M12 2v6" stroke="#ffd23f" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5 8c1-6 14-6 14 0" stroke="#89a6cf" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"></path></svg>
<div>Designed with Vault‑Tec aesthetics — blue panels, bold yellow accents and terminal fonts.</div>
</div>
</aside>
<main class="game">
<div class="top-row">
<div class="progress">Find all pairs — Good luck, Vault Dweller.</div>
<div id="difficultyControls" style="font-family:'Share Tech Mono',monospace;color:var(--muted);display:flex;gap:0.4rem;align-items:center">
<div style="color:var(--muted)">Difficulty:</div>
<button class="btn difficulty-btn" data-diff="easy">Easy</button>
<button class="btn difficulty-btn btn--active" data-diff="medium">Medium</button>
<button class="btn difficulty-btn" data-diff="hard">Hard</button>
</div>
<!-- Small controls: Mute and Play Demo -->
<div style="display:flex;gap:0.5rem;align-items:center">
<button class="btn ghost" id="mute" aria-pressed="false">Mute</button>
<button class="btn ghost" id="playDemo">Play Demo</button>
</div>
</div>
<section class="deck" id="deck" aria-live="polite" aria-label="Game cards"></section>
<!-- confetti canvas used by the win animation -->
<canvas id="confettiCanvas" aria-hidden="true"></canvas>
<div style="width:100%;display:flex;align-items:center;justify-content:center">
<button class="btn" id="restart-bottom">Restart Game</button>
</div>
</main>
</div>
<div class="page-container">
<div class="app" role="application" aria-label="Vault‑Tec Memory Game">
</div>
<footer class="footer">
<div class="footer-content">
<div class="footer-brand">
<div class="vault-badge vault-badge--small">VT</div>
<span>Vault-Tec Memory Trainer | Pip-Boy Edition</span>
</div>
<div class="footer-info">
Designed & Built for Educational Purposes
</div>
</div>
</footer>
</div>
<div class="modal-overlay" id="modalOverlay" role="dialog" aria-modal="true" aria-hidden="true">
<div class="modal-box" role="document">
<h2 id="modalTitle"></h2>
<div class="subtitle" id="modalMessage"></div>
<div class="modal-stats" id="modalStats"></div>
<div style="display:flex;gap:0.6rem;margin-top:1rem;justify-content:flex-end">
<button class="btn ghost" id="closeModal">Close</button>
<button class="btn" id="playAgain">Play Again</button>
</div>
</div>
</div>
<!-- High Scores Modal -->
<div class="modal-overlay" id="highScoresOverlay" role="dialog" aria-modal="true" aria-hidden="true">
<div class="modal-box" role="document">
<h2>High Scores</h2>
<div class="subtitle">Best records per difficulty</div>
<div class="modal-stats" style="display:block">
<div id="highScoresContainer"></div>
</div>
<div style="display:flex;gap:0.6rem;margin-top:1rem;justify-content:flex-end">
<button class="btn ghost" id="closeHighScores">Close</button>
</div>
</div>
</div>
<script src="src/js/app.js"></script>
</body>
</html>