-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
216 lines (204 loc) · 7.29 KB
/
index.html
File metadata and controls
216 lines (204 loc) · 7.29 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FACE SMASHER – Create</title>
<link rel="stylesheet" href="style.css" />
</head>
<body class="creator-page">
<div class="game-container">
<h1 id="pageTitle">FACE SMASHER</h1>
<div class="controls">
<span id="creatorScore">Smashed: 0</span>
<div class="action-buttons">
<button id="creatorReset">Reset Score</button>
<button id="creatorResetSpeed">Normal Speed</button>
<button id="generateBtn">🔗 Generate Smash Link</button>
<button id="aboutBtn" class="about-btn">About</button>
</div>
<div id="linkBox" class="creator-link-box hidden">
<div class="creator-link-row">
<input
id="gameLink"
class="creator-link-input"
type="text"
readonly
/>
<button id="copyBtn" class="upload-btn">Copy</button>
</div>
<div class="creator-share-row">
<a
class="creator-share-btn cs-wa"
id="shareWa"
href="#"
target="_blank"
rel="noopener"
>WhatsApp</a
>
<a
class="creator-share-btn cs-tw"
id="shareTw"
href="#"
target="_blank"
rel="noopener"
>X / Twitter</a
>
<a
class="creator-share-btn cs-fb"
id="shareFb"
href="#"
target="_blank"
rel="noopener"
>Facebook</a
>
</div>
<a
class="creator-play-link"
id="playLink"
href="#"
target="_blank"
rel="noopener"
>▶ Play Now →</a
>
</div>
</div>
<div class="main-content">
<div class="setup-overlay">
<div class="setup-card">
<h2>Create Your Smash</h2>
<p class="setup-help">
Upload a face, optionally add a background, then share your link!
</p>
<div class="upload-section">
<span class="step-label">1. Name (optional)</span>
<input
type="text"
id="smashName"
class="name-input"
placeholder="e.g. John"
maxlength="40"
/>
</div>
<div class="upload-section">
<span class="step-label">2. Face Photo</span>
<input type="file" id="faceFileInput" accept="image/*" hidden />
<button class="upload-btn" id="uploadFaceBtn">Upload Face</button>
<p class="hint-text" id="faceHint">
Upload a face or generate link with default emoji
</p>
</div>
<div class="upload-section">
<span class="step-label">3. Background</span>
<div class="arena-buttons">
<button class="arena-btn selected" data-arena="arena-candy">
Candy
</button>
<button class="arena-btn" data-arena="arena-neon">Neon</button>
<button class="arena-btn" data-arena="arena-sust">
SUST Gate
</button>
<button class="arena-btn" data-arena="arena-tong-dokan">
Tong
</button>
</div>
<input type="file" id="bgFileInput" accept="image/*" hidden />
<button class="upload-btn" id="uploadBgBtn">Upload Photo</button>
<p class="hint-text" id="bgHint">No custom background</p>
</div>
<div class="tool-section">
<span class="tool-label">4. Preview Tool:</span>
<div class="tool-buttons">
<button class="tool-btn selected" data-tool="punch">
👊 Punch
</button>
<button class="tool-btn" data-tool="slap">👋 Slap</button>
<button class="tool-btn" data-tool="hammer">🔨 Hammer</button>
<button class="tool-btn" data-tool="whip">
<img
src="tools/whip-icon.svg"
alt="whip"
style="height: 1em; vertical-align: middle"
/>
Spank
</button>
<button class="tool-btn" data-tool="rose">🌹 Rose</button>
</div>
</div>
</div>
</div>
<div class="gameplay-area">
<div class="canvas-container">
<div class="canvas-empty-state" id="canvasEmptyState">
<p class="canvas-empty-icon">👆</p>
<p>Upload a face photo<br />to preview the game</p>
</div>
<div class="canvas-wrapper" id="canvasWrapper">
<canvas id="gameCanvas"></canvas>
</div>
</div>
</div>
<div class="history-panel open" id="historyPanel">
<div class="history-panel-header">
<h3 class="history-title">Previous Games</h3>
<button
class="history-close-btn"
id="historyCloseBtn"
aria-label="Close"
>
✕
</button>
</div>
<div id="historyList" class="history-list"></div>
</div>
<button
class="history-toggle-btn"
id="historyToggleBtn"
aria-label="Previous games"
>
🕐
</button>
</div>
<p id="instructions">Upload a face to get started</p>
<footer class="site-footer">
<p>
© Face Smasher | <a href="mailto:abusayeidsawon@gmail.com">Contact</a>
</p>
</footer>
<div id="shareWarningModal" class="share-warning-modal hidden">
<div class="share-warning-backdrop"></div>
<div class="share-warning-card">
<h2>⚠️ Important</h2>
<p>Photos will be stored in our database if you generate link.</p>
<div class="share-warning-buttons">
<button id="shareWarningCancel" class="warning-btn cancel">
Cancel
</button>
<button id="shareWarningConfirm" class="warning-btn confirm">
Continue
</button>
</div>
</div>
</div>
</div>
<!-- About Modal -->
<div id="aboutModal" class="share-modal hidden">
<div class="share-modal-backdrop" id="aboutBackdrop"></div>
<div class="setup-card share-modal-card">
<h2 class="share-modal-title">About</h2>
<p class="setup-help share-modal-subtitle">
This game is created for learning and fun purposes only. We are not
responsible for any misuse of the content.
</p>
<p class="setup-help share-modal-subtitle">
For queries/suggestions, contact:
<a href="mailto:abusayeidsawon@gmail.com">abusayeidsawon@gmail.com</a>
</p>
<button id="aboutClose" class="upload-btn share-close-btn">
Close
</button>
</div>
</div>
<script type="module" src="js/creator.js"></script>
</body>
</html>