-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
173 lines (165 loc) · 7.7 KB
/
Copy pathadmin.html
File metadata and controls
173 lines (165 loc) · 7.7 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#2f7dff" />
<title>Letter Quest Admin</title>
</head>
<body>
<div id="admin-app">
<main class="admin-container">
<div class="top-row">
<h1 data-i18n="pageTitle"></h1>
<div>
<label for="language-select">
<span data-i18n="languageLabel"></span>:
<select id="language-select">
<option value="en">EN</option>
<option value="nl">NL</option>
</select>
</label>
</div>
</div>
<!-- Auth -->
<section class="card">
<h2 data-i18n="account"></h2>
<p id="auth-user" class="small"></p>
<p id="auth-status" class="small"></p>
<div class="auth-grid">
<label for="auth-email"></label><input id="auth-email" type="email" data-i18n-placeholder="emailPlaceholder" />
<label for="auth-password"></label><input id="auth-password" type="password" data-i18n-placeholder="passwordPlaceholder" />
</div>
<div class="actions-row">
<button id="sign-in" data-i18n="signIn"></button>
<button id="sign-up" data-i18n="signUp"></button>
<button id="sign-in-github" data-i18n="signInGitHub"></button>
<button id="sign-out" data-i18n="signOut"></button>
</div>
</section>
<!-- Game picker -->
<section class="card">
<h2 data-i18n="gamesHeader"></h2>
<div class="game-select-row">
<label for="game-select"></label><select id="game-select">
<option value="" data-i18n="selectGameOption"></option>
</select>
<button id="new-game-btn" disabled data-i18n="newGame"></button>
<button id="delete-game-btn" class="ghost danger" disabled data-i18n="deleteGame"></button>
</div>
<div id="new-game-form" class="new-game-form hidden">
<label>
<span data-i18n="gameSlug"></span>
<input id="new-game-slug" type="text" placeholder="my-game" />
<span class="field-hint" data-i18n="gameSlugHint"></span>
</label>
<label>
<span data-i18n="gameDisplayName"></span>
<input id="new-game-display-name" type="text" placeholder="My Game" />
</label>
<div class="actions-row">
<button id="create-game-btn" data-i18n="createGame"></button>
<button id="cancel-new-game-btn" class="ghost" data-i18n="cancel"></button>
</div>
</div>
<p id="game-status" class="small"></p>
</section>
<!-- Editor (hidden until a game is selected) -->
<section id="editor-section" class="hidden">
<!-- Game display name + logo -->
<section class="card">
<h2 data-i18n="gameDisplayNameLabel"></h2>
<div class="actions-row">
<label for="edit-display-name"></label><input id="edit-display-name" type="text" style="flex:1" />
<button id="save-display-name" data-i18n="saveName"></button>
</div>
<label class="payment-toggle">
<input type="checkbox" id="requires-payment" />
<span data-i18n="requiresPayment"></span>
</label>
<div id="price-wrap" class="hidden payment-price-row">
<label for="price-euros"></label><input id="price-euros" type="number" min="0" step="0.01" placeholder="0.00" />
<span data-i18n="euros"></span>
</div>
<label class="payment-toggle">
<input type="checkbox" id="supports-offline" />
<span data-i18n="supportsOffline"></span>
</label>
<label>
<span data-i18n="finalQuestionLabel"></span>
<input id="final-question" type="text" data-i18n-placeholder="finalQuestionPlaceholder" />
</label>
<label>
<span data-i18n="finalAnswerLabel"></span>
<input id="final-answer" type="text" data-i18n-placeholder="finalAnswerPlaceholder" />
</label>
<div id="logo-preview-wrap" class="image-preview-wrap hidden">
<img id="logo-preview-img" class="location-image-preview" alt="" />
<button type="button" id="remove-logo-btn" class="ghost danger" data-i18n="removeLogo"></button>
</div>
<div id="logo-upload-wrap">
<label class="upload-label" id="logo-upload-label">
<span class="upload-btn-face" data-i18n="uploadLogo"></span>
<input type="file" accept="image/*" id="logo-file-input" style="display:none" />
</label>
<p id="logo-upload-status" class="upload-status small"></p>
</div>
</section>
<section class="card">
<h2 data-i18n="styleSectionTitle"></h2>
<p class="small" data-i18n="styleSectionHint"></p>
<div id="game-style-fields" class="style-grid"></div>
<div id="game-style-preview" class="style-preview">
<h3 data-i18n="stylePreviewTitle"></h3>
<p class="small" data-i18n="stylePreviewHint"></p>
<section class="style-preview-card">
<p class="style-preview-badge" data-i18n="stylePreviewBadge"></p>
<h4>Letter Quest</h4>
<p class="small" data-i18n="stylePreviewMuted"></p>
<div class="actions-row">
<button type="button" class="style-preview-button" data-i18n="stylePreviewButton"></button>
<button type="button" class="style-preview-button ghost" data-i18n="stylePreviewGhost"></button>
</div>
</section>
</div>
<div class="actions-row">
<button id="save-game-styles-btn" data-i18n="saveGameStyles"></button>
<button id="reset-game-styles-btn" class="ghost" data-i18n="resetGameStyles"></button>
</div>
</section>
<!-- Route tabs -->
<section class="card">
<div class="route-tab-bar" id="route-tab-bar"></div>
<div class="route-meta-row">
<label style="flex:1">
<span data-i18n="routeDisplayName"></span>
<input id="route-display-name-input" type="text" />
</label>
<label>
<span data-i18n="locationCount"></span>
<input id="route-location-count" type="number" min="1" style="width:72px" />
</label>
<button id="delete-route-btn" class="ghost danger" data-i18n="deleteRoute"></button>
</div>
<p class="hint small" data-i18n="hint"></p>
<div id="rows" class="rows"></div>
</section>
<!-- Map -->
<section class="card">
<h2 data-i18n="mapHeader"></h2>
<p class="small" data-i18n="mapHint"></p>
<div id="map" class="map"></div>
</section>
<!-- Actions -->
<section class="card actions-row">
<button id="save-route-btn" data-i18n="saveRoute"></button>
<button id="add-route-btn" class="ghost" data-i18n="addRoute"></button>
<button id="reset-defaults-btn" class="ghost" data-i18n="resetDefaults"></button>
<p id="status" class="status" style="flex:1;text-align:right"></p>
</section>
</section>
</main>
</div>
<script type="module" src="/src/admin.js"></script>
</body>
</html>