-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrewards_draft.html
282 lines (270 loc) · 23.2 KB
/
rewards_draft.html
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Rewards</title>
<link rel="stylesheet" href="/assets/dist/tailwind.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
</link>
<link rel="stylesheet" href="/assets/css/rewards.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.2.1/flowbite.min.css" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<!-- Firebase -->
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-auth.js"></script>
<script src="assets/js/firebase_init.js"></script>
</head>
<body class="bg-gray-100">
<div class="min-h-screen bg-white p-8">
<!-- Sidebar -->
<div class="flex">
<div class="w-64 p-6 mr-6 bg-green-50 rounded-lg">
<div class="flex flex-col items-center mb-6">
<img src="https://placehold.co/100x100" id="currentUser-profile-picture"
alt="Profile picture of a man" class="rounded-full border-4 border-green-300 mb-3" width="100"
height="100">
<h2 class="text-lg font-semibold" id="currentUser-name"></h2>
<p class="text-sm text-gray-600" id="currentUser-email"></p>
</div>
<div class="flex flex-col space-y-3">
<button
class="flex items-center text-sm font-medium text-gray-700 space-x-2 text-green-700 px-3 py-2 rounded"
onclick="window.location='/index.html'">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-house" viewBox="0 0 16 16">
<path
d="M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L2 8.207V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V8.207l.646.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293zM13 7.207V13.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V7.207l5-5z" />
</svg>
<span>Home</span>
</button>
<button
class="flex items-center text-sm font-medium text-gray-700 space-x-2 text-green-700 px-3 py-2 rounded"
onclick="window.location='/missions.html'">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-house" viewBox="0 0 16 16">
<path
d="M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L2 8.207V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V8.207l.646.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293zM13 7.207V13.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V7.207l5-5z" />
</svg>
<span>My Missions</span>
</button>
<button
class="flex items-center text-sm font-medium text-gray-700 space-x-2 bg-green-200 text-green-700 px-3 py-2 rounded"
onclick="window.location='/rewards.html'">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-trophy" viewBox="0 0 16 16">
<path
d="M2.5.5A.5.5 0 0 1 3 0h10a.5.5 0 0 1 .5.5q0 .807-.034 1.536a3 3 0 1 1-1.133 5.89c-.79 1.865-1.878 2.777-2.833 3.011v2.173l1.425.356c.194.048.377.135.537.255L13.3 15.1a.5.5 0 0 1-.3.9H3a.5.5 0 0 1-.3-.9l1.838-1.379c.16-.12.343-.207.537-.255L6.5 13.11v-2.173c-.955-.234-2.043-1.146-2.833-3.012a3 3 0 1 1-1.132-5.89A33 33 0 0 1 2.5.5m.099 2.54a2 2 0 0 0 .72 3.935c-.333-1.05-.588-2.346-.72-3.935m10.083 3.935a2 2 0 0 0 .72-3.935c-.133 1.59-.388 2.885-.72 3.935M3.504 1q.01.775.056 1.469c.13 2.028.457 3.546.87 4.667C5.294 9.48 6.484 10 7 10a.5.5 0 0 1 .5.5v2.61a1 1 0 0 1-.757.97l-1.426.356a.5.5 0 0 0-.179.085L4.5 15h7l-.638-.479a.5.5 0 0 0-.18-.085l-1.425-.356a1 1 0 0 1-.757-.97V10.5A.5.5 0 0 1 9 10c.516 0 1.706-.52 2.57-2.864.413-1.12.74-2.64.87-4.667q.045-.694.056-1.469z" />
</svg>
<span>My Rewards</span>
</button>
</div>
</div>
<!-- Main Content -->
<div class="flex-1" style="margin-right: 30px;">
<div class="mb-6">
<div class="flex justify-between items-center">
<h1 class="text-3xl font-bold mb-2">My Rewards</h1>
<p class="text-md leading-6 text-gray-600">Available Novacoins: <span class="font-bold"
id="available-novacoins">0</span></p>
</div>
</div>
<p class="mt-3 text-md leading-6 text-gray-600">Browse by categories:</p>
<div class="inline-flex rounded-md shadow-sm" role="group">
<button type="button" id="switch-accessories" onclick="smoothScrollAboveElement('accessories', 50)"
class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-s-lg hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white">
Accessories
</button>
<button type="button" id="switch-avatar" onclick="smoothScrollAboveElement('avatar', 50)"
class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-900 bg-white border-t border-b border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white">
Avatar
</button>
<button type="button" id="switch-boosts" onclick="smoothScrollAboveElement('misc', 50)"
class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-900 bg-white border border-b border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white">
Miscellaneous
</button>
<!-- <button type="button" id="switch-boosts" onclick="smoothScrollAboveElement('boosts', 50)"
class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-900 bg-white border border-b border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white">
Boosts
</button> -->
<button type="button" id="switch-misc" onclick="smoothScrollAboveElement('myrewards', 50)"
class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-e-lg hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white">
My Rewards
</button>
</div>
<div>
<div id="accessories" style="padding-top: 40px;">
<h3 class="text-2xl font-bold">Accessories</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6">
<div class="max-w-sm bg-white border border-gray-200 rounded-lg shadow-md">
<img class="rounded-t-lg" src="/assets/img/rewards/classic_fedora.png" alt="">
<div class="p-4">
<h5 class="mb-2 text-xl font-bold tracking-tight text-gray-900">Classic Fedora</h5>
<p class="text-gray-600">Tokens: 10</p>
<button onclick="redeem(this.dataset.name, this.dataset.redeem)"
style="text-decoration: none; margin-top: 10px;" href="#"
class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
data-name="Classic Fedora" data-redeem="10">Redeem
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
</svg>
</button>
</div>
</div>
<div class="max-w-sm bg-white border border-gray-200 rounded-lg shadow-md">
<img class="rounded-t-lg" src="/assets/img/rewards/aviator_glasses.png" alt="">
<div class="p-4">
<h5 class="mb-2 text-xl font-bold tracking-tight text-gray-900">Aviator Glasses</h5>
<p class="text-gray-600">Tokens: 11</p>
<button onclick="redeem(this.dataset.name, this.dataset.redeem)"
style="text-decoration: none; margin-top: 10px;" href="#"
class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
data-name="Aviator Glasses" data-redeem="11">
Redeem
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
</svg>
</button>
</div>
</div>
<div class="max-w-sm bg-white border border-gray-200 rounded-lg shadow-md">
<img class="rounded-t-lg" src="/assets/img/rewards/professional_outfit.png" alt="">
<div class="p-4">
<h5 class="mb-2 text-xl font-bold tracking-tight text-gray-900">Professional Outfit
</h5>
<p class="text-gray-600">Tokens: 12</p>
<button onclick="redeem(this.dataset.name, this.dataset.redeem)"
style="text-decoration: none; margin-top: 10px;" href="#"
class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
data-name="Professional Outfit" data-redeem="12">
Redeem
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
</svg>
</button>
</div>
</div>
</div>
</div>
<div id="avatar" style="padding-top: 40px;">
<h3 class="text-2xl font-bold">Avatar</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6">
<div class="max-w-sm bg-white border border-gray-200 rounded-lg shadow-md">
<img class="rounded-t-lg" src="/assets/img/rewards/boy's_hair.png" alt="">
<div class="p-4">
<h5 class="mb-2 text-xl font-bold tracking-tight text-gray-900">Boy's Hair</h5>
<p class="text-gray-600">Tokens: 12</p>
<button onclick="redeem(this.dataset.name, this.dataset.redeem)"
style="text-decoration: none; margin-top: 10px;" href="#"
class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
data-name="Boy's Hair" data-redeem="12">
Redeem
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
</svg>
</button>
</div>
</div>
<div class="max-w-sm bg-white border border-gray-200 rounded-lg shadow-md">
<img class="rounded-t-lg" src="/assets/img/rewards/girl's_hair.png" alt="">
<div class="p-4">
<h5 class="mb-2 text-xl font-bold tracking-tight text-gray-900">Girl's Hair</h5>
<p class="text-gray-600">Tokens: 14</p>
<button onclick="redeem(this.dataset.name, this.dataset.redeem)"
style="text-decoration: none; margin-top: 10px;" href="#"
class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
data-name="Girl's Hair" data-redeem="14">
Redeem
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
</svg>
</button>
</div>
</div>
</div>
</div>
<!-- <div id="boosts" style="padding-top: 40px;">
<h3 class="text-2xl font-bold">Boosts</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6">
<div class="max-w-sm bg-white border border-gray-200 rounded-lg shadow-md">
<img class="rounded-t-lg" src="/assets/img/create_avatar/h1.png" alt="">
<div class="p-4">
<h5 class="mb-2 text-xl font-bold tracking-tight text-gray-900">Boy's Hair</h5>
<p class="text-gray-600">Tokens: 15</p>
<a style="text-decoration: none; margin-top: 10px;" href="#" class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" data-redeem="15">
Redeem
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
</svg>
</a>
</div>
</div>
</div>
</div> -->
<div id="misc" style="padding-top: 40px;">
<h3 class="text-2xl font-bold">Miscellaneous</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6">
<div class="max-w-sm bg-white border border-gray-200 rounded-lg shadow-md">
<img class="rounded-t-lg" src="/assets/img/create_avatar/h1.png" alt="">
<div class="p-4">
<h5 class="mb-2 text-xl font-bold tracking-tight text-gray-900">Boy's Hair</h5>
<p class="text-gray-600">Tokens: 16</p>
<button onclick="redeem(this.dataset.name, this.dataset.redeem)"
style="text-decoration: none; margin-top: 10px;" href="#"
class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
data-name="Boy's Hair" data-redeem="16">
Redeem
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
</svg>
</button>
</div>
</div>
</div>
</div>
<div id="myrewards" style="padding-top: 40px;">
<h3 class="text-2xl font-bold">My Rewards</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6"
id="myrewards-items">
<!-- <div class="max-w-sm bg-white border border-gray-200 rounded-lg shadow-md">
<img class="rounded-t-lg" src="/assets/img/create_avatar/h1.png" alt="">
<div class="p-4">
<h5 class="mb-2 text-xl font-bold tracking-tight text-gray-900">Boy's Hair</h5>
<p class="text-gray-600">Tokens: 16</p>
<button onclick="redeem(this.dataset.name, this.dataset.redeem)" style="text-decoration: none; margin-top: 10px;" href="#" class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" data-name="Boy's Hair" data-redeem="16">
Redeem
<svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9" />
</svg>
</button>
</div>
</div> -->
</div>
</div>
</div>
</div>
</div>
</body>
<script src="/assets/js/rewards.js"></script>
</html>