-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
387 lines (287 loc) · 12.2 KB
/
index.php
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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<?php
/**
* @license
* ddd / module-connexion
* Copyright (c) 2022 Abraham Ukachi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @project module-connexion
* @name Home Page - ddd
* @file index.php
* @author: Abraham Ukachi <[email protected]>
* @version: 0.0.1
*
* Usage:
* 1-|> open http://localhost/module-connexion/index.php
*
*
* ============================
* >>> DESCRIPTION <<<
* ~~~~~~~~ (French) ~~~~~~~~~
*
* - Une page d’accueil qui présente votre site (index.php)
*
* ~~~~~~~~ (English) ~~~~~~~~~
*
* - A homepage that presents your site (index.php)
*
* ============================
* IMPORTANT: A Web App without a login / registration feature should never be deployed!!! :)
* ============================
*/
/*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* MOTTO: I'll always do more 😜!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
?><!DOCTYPE html>
<!-- HTML -->
<html lang="en">
<!-- HEAD -->
<head>
<!-- Our 4 VIP metas -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=no">
<meta name="description" content="Home page of module-connexion / ddd">
<!-- Title -->
<title>Welcome to module-connexion / ddd | by Abraham Ukachi</title>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Mulish - Font -->
<link href="https://fonts.googleapis.com/css2?family=Mulish:wght@300;400;500;700&display=swap" rel="stylesheet">
<!-- Material Icons - https://github.com/google/material-design-icons/tree/master/font -->
<!-- https://material.io/resources/icons/?style=baseline -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Base -->
<base href="module-connexion">
<!-- Logo - Icon -->
<link rel="icon" href="assets/images/favicon.ico">
<!-- See https://goo.gl/OOhYW5 -->
<link rel="manifest" href="manifest.json">
<!-- See https://goo.gl/qRE0vM -->
<meta name="theme-color" content="#A67C52">
<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="ddd">
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="ddd">
<!-- Homescreen icons -->
<link rel="apple-touch-icon" href="assets/images/manifest/icon-48x48.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/images/manifest/icon-72x72.png">
<link rel="apple-touch-icon" sizes="96x96" href="assets/images/manifest/icon-96x96.png">
<link rel="apple-touch-icon" sizes="144x144" href="assets/images/manifest/icon-144x144.png">
<link rel="apple-touch-icon" sizes="192x192" href="assets/images/manifest/icon-192x192.png">
<!-- Theme -->
<!-- TODO: Rename `styles.css` to `style.css` -->
<link rel="stylesheet" href="assets/theme/color.css">
<link rel="stylesheet" href="assets/theme/typography.css">
<link rel="stylesheet" href="assets/theme/styles.css">
<!-- Stylesheet -->
<link rel="stylesheet" href="assets/stylesheets/home-styles.css">
<!-- Animations -->
<!-- <link rel="stylesheet" href="assets/animations/fade-in-animation.css"> -->
<!-- <link rel="stylesheet" href="assets/animations/slide-from-down-animation.css"> -->
<!-- Script -->
<!-- ^^^^^^ Like previously stated, "A little JS doesn't hurt ;)" -->
<script>
/*
* Once again, I'm well aware that this project doesn't require a script but
* I couldn't help myself. So.... Bite me twice!! ;)
*/
// Create `ddd` object variable with a `isReady` key
var ddd = {
isReady: false,
onReady: () => {}
}; // <- `false` 'cause duh!! We ain't ready yet!!
// Let's do some stuff when this page loads...
// NOTE: This is again, just a simulation!
window.addEventListener('load', (event) => {
// ...get the document as doc
let doc = event.target;
// Get the app layout element as `appLayoutEl`
let appLayoutEl = doc.getElementById('appLayout');
// if the browser supports it...
if (typeof(Storage) !== 'undefined') {
// ...get the theme from local storage as `theme`
let theme = localStorage.getItem('theme');
// DEBUG [4dbsmaster]: tell me about it :)
console.log(`[_progressHandler]: theme => ${theme}`);
// if a theme was found in storage...
if (typeof(theme) == 'string') {
// ...remove all the themes in body
doc.body.classList.remove('classic', 'light', 'dark');
// update the theme
doc.body.classList.add(theme);
}
}
// ddd is READY!!!
ddd.isReady = true;
// call the `onReady` function of `ddd`
ddd.onReady('home');
});
</script>
<!-- Double Psych!!! Some more script for ya! #LOL -->
<script src="script/app.js"></script>
</head>
<!-- End of HEAD -->
<!-- BODY | Default Theme: light -->
<body class="theme light" fullbleed>
<!-- App Layout -->
<div id="appLayout" class="flex-layout horizontal" fit>
<!-- PHP: Include the vertical & responsive `nav-bar` component here -->
<?php
$_GET['navbar_type'] = 'vertical';
$_GET['navbar_page'] = 'home';
$_GET['navbar_init'] = 'au';
$_GET['navbar_connected'] = 'false';
$_GET['navbar_res'] = 'true';
?>
<?php include 'components/nav-bar.php'; ?>
<!-- MAIN - App Layout -->
<main class="flex-layout vertical">
<!-- App Header -->
<div id="appHeader">
<!-- App Bar -->
<div id="appBar" class="app-bar">
<span flex></span>
<!-- Settings - Icon Button -->
<a id="settingsIconButton" role="icon-button" tabindex="0" href="settings.php" title="Settings">
<span class="material-icons icon">settings</span>
</a>
<!-- End of Settings - Icon Button -->
</div>
<!-- End of App Bar -->
</div>
<!-- End of App Header -->
<!-- Content - App Layout -->
<!-- NOTE: This is arguably the most important content ever!!! -->
<!-- TODO: (scrollableTarget) - Make it the only scrollable `content` -->
<div id="content">
<!-- [online] Container -->
<div class="container vertical flex-layout" online hidden>
<!-- Home Title -->
<h3 class="home-title txt capitalize">☀️ Good morning, <span>Abraham</span></h3>
<!-- Home Description -->
<p class="home-description">Nice to see you again :)</p>
<!-- Home-Menu -->
<!-- TODO: Rename to Dashboard ? -->
<menu class="home-menu">
<!-- Profile -->
<li><a href="profil.php?edit">
<!-- Doodle Wrapper -->
<div class="doodle-wrapper">
<!-- Doodle -->
<span class="doodle edit-doodle"></span>
</div>
<!-- Label -->
<span class="label">Edit your profile</span>
</a></li>
<!-- DDD Studio -->
<li><a href="ddd-studio.php">
<!-- Doodle Wrapper -->
<div class="doodle-wrapper">
<!-- Doodle -->
<span class="doodle ddd-doodle"></span>
</div>
<!-- Label -->
<span class="label">Build your DDD box</span>
</a></li>
<!-- Language -->
<li><a href="settings.php?view=lang">
<!-- Doodle Wrapper -->
<div class="doodle-wrapper">
<!-- Doodle -->
<span class="doodle language-doodle"></span>
</div>
<!-- Label -->
<span class="label">Change your language</span>
</a></li>
<!-- Theme -->
<li><a href="settings.php?view=theme">
<!-- Doodle Wrapper -->
<div class="doodle-wrapper">
<!-- Doodle -->
<span class="doodle theme-doodle"></span>
</div>
<!-- Label -->
<span class="label">Change your theme</span>
</a></li>
<!-- Dividers -->
<div class="dividers" fit>
<span class="divider horizontal top left"></span>
<span class="divider vertical top left"></span>
</div>
</menu>
<!-- End of Home-Menu -->
</div>
<!-- End of [online] Container -->
<!-- [offline] Container -->
<div class="container vertical flex-layout centered slide-from-down" offline>
<!-- Home Image -->
<span class="home-image"></span>
<!-- Home Title -->
<h3 class="home-title">Welcome to module-connexion</h3>
<!-- Home Description -->
<p class="home-description">The fastest and easiest way to create / delete an account, modify your profile, build your own unique `<em>DDD</em>` box and more... Get started by logging into your account.</p>
<!-- Register - Button -->
<a id="registerButton" role="button" tabindex="0" href="inscription.php" contained>Register</a>
<!-- Login - Button -->
<a id="loginButton" role="button" tabindex="0" href="connexion.php">Log In</a>
</div>
<!-- End of [offline] Container -->
</div>
<!-- End of Content - App Layout -->
<!-- PHP: Include the horizontal `nav-bar` component here -->
<?php
$_GET['navbar_type'] = 'horizontal';
$_GET['navbar_page'] = 'home';
$_GET['navbar_init'] = 'au';
$_GET['navbar_connected'] = 'false';
$_GET['navbar_res'] = 'true';
?>
<?php include 'components/nav-bar.php'; ?>
</main>
<!-- End of MAIN - App Layout -->
<!-- Details Container | ASIDE -->
<aside id="detailsContainer" class="vertical flex-layout centered">
<!-- Outlined App Logo -->
<span class="app-logo" outlined></span>
<!-- Divider @ Vertical Left -->
<span class="divider vertical left"></span>
</aside>
<!-- Details Container | ASIDE -->
</div>
<!-- End of App Layout -->
<!-- Backdrop -->
<div id="backdrop" hidden></div>
<!-- Dialogs Container -->
<div id="dialogsContainer" hidden></div>
<!-- End of Dialogs Container -->
<!-- Toast -->
<div id="toast" hidden></div>
<!-- End of Toast -->
</body>
<!-- End of BODY -->
</html>
<!-- End of HTML -->