Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +136 -135
templates/index.html
CHANGED
@@ -1,136 +1,137 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html lang="en">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8">
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<meta name="description" content="NOT ME - A voice deduction game powered by AI">
|
7 |
-
|
8 |
-
<title>NOT ME - Voice Deduction Game</title>
|
9 |
-
|
10 |
-
<!-- Import the Pixelify Sans font for our game's unique style -->
|
11 |
-
<link href="https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
12 |
-
|
13 |
-
<!-- Main stylesheet -->
|
14 |
-
<link rel="stylesheet" href="static/css/styles.css">
|
15 |
-
|
16 |
-
<!-- Socket.IO client for real-time communication -->
|
17 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js"></script>
|
18 |
-
|
19 |
-
<!-- Three.js for background animations -->
|
20 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
21 |
-
</head>
|
22 |
-
<body>
|
23 |
-
<!-- WebGL background container for particle effects -->
|
24 |
-
<canvas id="webgl-background"></canvas>
|
25 |
-
|
26 |
-
<!-- Settings button that appears after game starts -->
|
27 |
-
<button id="settings-button" class="settings-button hidden">
|
28 |
-
<span class="settings-icon">⚙️</span>
|
29 |
-
</button>
|
30 |
-
|
31 |
-
<!-- Main game container -->
|
32 |
-
<div id="game-container">
|
33 |
-
<!-- Landing Page -->
|
34 |
-
<div id="landing-page" class="game-page active">
|
35 |
-
<h1 class="game-title">
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
<
|
45 |
-
<div class="
|
46 |
-
|
47 |
-
<button id="
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
<div id="
|
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 |
-
<div class="loading-
|
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 |
-
<script type="module" src="static/js/
|
122 |
-
<script type="module" src="static/js/
|
123 |
-
<script type="module" src="static/js/
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
</
|
|
|
136 |
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<meta name="description" content="NOT ME - A voice deduction game powered by AI">
|
7 |
+
|
8 |
+
<title>NOT ME - Voice Deduction Game</title>
|
9 |
+
|
10 |
+
<!-- Import the Pixelify Sans font for our game's unique style -->
|
11 |
+
<link href="https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
12 |
+
|
13 |
+
<!-- Main stylesheet -->
|
14 |
+
<link rel="stylesheet" href="static/css/styles.css">
|
15 |
+
|
16 |
+
<!-- Socket.IO client for real-time communication -->
|
17 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js"></script>
|
18 |
+
|
19 |
+
<!-- Three.js for background animations -->
|
20 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
21 |
+
</head>
|
22 |
+
<body>
|
23 |
+
<!-- WebGL background container for particle effects -->
|
24 |
+
<canvas id="webgl-background"></canvas>
|
25 |
+
|
26 |
+
<!-- Settings button that appears after game starts -->
|
27 |
+
<button id="settings-button" class="settings-button hidden">
|
28 |
+
<span class="settings-icon">⚙️</span>
|
29 |
+
</button>
|
30 |
+
|
31 |
+
<!-- Main game container -->
|
32 |
+
<div id="game-container">
|
33 |
+
<!-- Landing Page -->
|
34 |
+
<div id="landing-page" class="game-page active">
|
35 |
+
<h1 class="game-title">
|
36 |
+
<span class="title-not">NOT</span>
|
37 |
+
<span class="title-emphasis">ME</span>
|
38 |
+
</h1>
|
39 |
+
<button id="play-button" class="button primary-button">PLAY</button>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<!-- Player Setup Page -->
|
43 |
+
<div id="setup-page" class="game-page">
|
44 |
+
<h2 class="page-title">Player Setup</h2>
|
45 |
+
<div id="player-list" class="player-grid"></div>
|
46 |
+
<div class="setup-controls">
|
47 |
+
<button id="add-player-button" class="button secondary-button">Add Player</button>
|
48 |
+
<button id="start-button" class="button primary-button" disabled>Start Game</button>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
<!-- Game Page (Recording Phase) -->
|
53 |
+
<div id="recording-page" class="game-page">
|
54 |
+
<div id="timer-display" class="timer"></div>
|
55 |
+
<div id="question-display" class="question-box"></div>
|
56 |
+
|
57 |
+
<!-- Recording interface -->
|
58 |
+
<div class="recording-controls">
|
59 |
+
<canvas id="recording-visualizer" class="visualizer"></canvas>
|
60 |
+
<button id="record-button" class="button record-button">Start Recording</button>
|
61 |
+
<div class="recording-time"></div>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
|
65 |
+
<!-- Listening Phase -->
|
66 |
+
<div id="listening-page" class="game-page">
|
67 |
+
<div id="timer-display" class="timer"></div>
|
68 |
+
<h2 class="page-title">Listen to Responses</h2>
|
69 |
+
<div id="recordings-list" class="recordings-grid">
|
70 |
+
<!-- Recording playback buttons will be dynamically added here -->
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
|
74 |
+
<!-- Voting Phase -->
|
75 |
+
<div id="voting-page" class="game-page">
|
76 |
+
<div id="timer-display" class="timer"></div>
|
77 |
+
<h2 class="page-title">Vote for the Impostor</h2>
|
78 |
+
<div id="voting-options" class="voting-grid">
|
79 |
+
<!-- Voting buttons will be dynamically added here -->
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
|
83 |
+
<!-- Results Page -->
|
84 |
+
<div id="results-page" class="game-page">
|
85 |
+
<h2 class="page-title">Round Results</h2>
|
86 |
+
<div id="results-content" class="results-container">
|
87 |
+
<!-- Results will be dynamically added here -->
|
88 |
+
</div>
|
89 |
+
<button id="next-round-button" class="button primary-button">Next Round</button>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
|
93 |
+
<!-- Overlay containers -->
|
94 |
+
<div id="loading-overlay" class="overlay">
|
95 |
+
<div class="loading-spinner"></div>
|
96 |
+
<div class="loading-message">Loading...</div>
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<div id="error-overlay" class="overlay">
|
100 |
+
<div class="error-message"></div>
|
101 |
+
</div>
|
102 |
+
|
103 |
+
<div id="settings-overlay" class="overlay">
|
104 |
+
<div class="settings-panel">
|
105 |
+
<h3>Game Settings</h3>
|
106 |
+
<div class="settings-options">
|
107 |
+
<div class="setting-item">
|
108 |
+
<label for="dark-mode">Dark Mode</label>
|
109 |
+
<input type="checkbox" id="dark-mode" checked>
|
110 |
+
</div>
|
111 |
+
<div class="setting-item">
|
112 |
+
<label for="sound-effects">Sound Effects</label>
|
113 |
+
<input type="checkbox" id="sound-effects" checked>
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
<button id="exit-game" class="button secondary-button">Exit Game</button>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
|
120 |
+
<!-- Game scripts -->
|
121 |
+
<script type="module" src="static/js/background.js"></script>
|
122 |
+
<script type="module" src="static/js/audio.js"></script>
|
123 |
+
<script type="module" src="static/js/ui.js"></script>
|
124 |
+
<script type="module" src="static/js/game.js"></script>
|
125 |
+
|
126 |
+
<!-- Audio context initialization script -->
|
127 |
+
<script>
|
128 |
+
// Initialize audio context on user interaction
|
129 |
+
document.addEventListener('click', function initAudioContext() {
|
130 |
+
if (!window.audioContext) {
|
131 |
+
window.audioContext = new (window.AudioContext || window.webkitAudioContext)();
|
132 |
+
}
|
133 |
+
document.removeEventListener('click', initAudioContext);
|
134 |
+
}, { once: true });
|
135 |
+
</script>
|
136 |
+
</body>
|
137 |
</html>
|