-
Notifications
You must be signed in to change notification settings - Fork 0
/
tester.html
591 lines (523 loc) · 19.7 KB
/
tester.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
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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="./css/style.css">
<link rel="stylesheet" type="text/css" href="./css/zed-style-space.css">
<link rel="stylesheet" type="text/css" href="./css/floating-dial.css">
<title>Frontend Mentor | Space tourism website</title>
<style>/* Convenient stuff I might want: */
body,
html {
/* font-family: "Poppins", sans-serif; */
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility!important;
font-size: 12pt;
font-weight: 400;
/*color: purple;*/
}
.test-vbox {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: var(--dark);
margin: 0;
padding: 0;
}
.test-clay {
position: relative;
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: center;
min-width: 400px;
min-height: 250px;
max-width: 400px;
max-height: 250px;
background: linear-gradient(
35deg,
whitesmoke 0%,
white 84.7%,
blue 85%,
navy 91%,
white 91.3%
);
box-shadow: 0 10px 60px 0 var(--charcoal), inset 0px -10px 17px 2px var(--charcoal);
border-radius: 25px;
z-index: 15;
}
.test-clay::before {
position: absolute;
backdrop-filter: blur(5px);
bottom: -20px;
right: -20px;
width: 70px;
height: 70px;
content: "";
border-radius: 200px;
background: #ffffff66;
box-shadow: 0 10px 25px 0 gray, inset 0px -8px 15px 0px gray;
border: 0.1px solid transparent;
z-index: 14;
}
.test-clay p {
position: relative;
right: 5px;
font-size: 34pt;
font-weight: 900;
margin: 0;
padding: 20px 35px 10px 25px;
line-height: 36pt;
text-align: center;
color: purple;
align-self: center;
order: 2;
}
.test-clay span {
position: absolute;
bottom: 4px;
left: 45px;
width: 55%;
height: 20px;
background: navy;
content: "";
z-index: 14;
}
.test-clay i {
color: white;
text-shadow: 1px 1px 0px purple, 2px 2px 0px purple,
3px 3px 0px purple, -1px -1px 0px purple;
font-size: 18pt;
font-weight: 600;
}
.test-clay::after {
backdrop-filter: blur(5px);
position: absolute;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: flex-end;
padding-left: 20px;
padding-bottom: 28px;
top: -35px;
left: -23px;
width: 50%;
height: 50%;
background: #ffffff55;
content: "Claymorphism + Glassmorphism";
text-align: center;
color: purple;
line-height: 16pt;
font-weight: 700;
border-radius: 15px;
box-shadow: 0 5px 30px 0 gray, inset 0px -10px 20px 0px gray;
border: 0.1px solid transparent;
z-index: 15;
}
.test-clay > div {
all: unset;
position: relative;
width: 150px;
height: 100px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 35px 0px 40px 30px;
border-radius: 15px;
background: url("https://picsum.photos/id/640/1280/800");
background-size: cover;
background-position: center;
border: 0.1px solid purple;
z-index: -1;
}
.test-clay > div::before {
all: unset;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: "";
background: navy;
mix-blend-mode: color;
border-radius: 15px;
}
.test-clay > div::after {
all: unset;
}
</style>
</head>
<body>
<header id="pageTop" class="x-masonry-grid">
<span class="logo"><img src="./images/logo.svg" alt="Logo"></span>
<hr id="ruleLine">
<nav class="menu">
<ul>
<li class="menu-btn current"><a href="#">HOME</a></li>
<li class="menu-btn"><a href="#">DESTINATION</a></li>
<li class="menu-btn help-btn"><a href="#">CREW</a></li>
<li class="menu-btn help-btn"><a href="#">TECHNOLOGY</a></li>
</ul>
</nav>
</header>
<main class="main-section z-grid">
<h4 class="z-card-row z-center">So, You Want to Travel To</h4>
<h1 class="z-card-row z-center">SPACE</h1>
<article class="z-card-wide">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsam alias magni impedit a possimus, nam tenetur ipsum eos eligendi. Fuga voluptatem voluptatum molestiae facilis dolores?</article>
<img src="./images/289580-Futurama.jpg" class="z-card-tallish z-card-wide" alt="Futurama Rocks!" />
<article class="z-card">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Commodi blanditiis nostrum ipsam obcaecati ad tempore iste mollitia! Earum consectetur consequuntur dolor et consequatur corporis inventore neque quo veniam. Error quos dolores unde rem dolor ducimus aliquid vero praesentium laboriosam eveniet, optio neque perferendis nihil, fugiat eum hic molestiae harum placeat!</article>
<article class="z-card">Lorem ipsum dolor sit amet consectetur, adipisicing elit. Eum natus, molestias quia consequatur quos esse illum culpa vitae dolores ipsum deleniti unde consectetur recusandae assumenda reprehenderit et! Eaque, excepturi magni.</article>
<div class="z-card-wide z-center"><a href="#" class="z-claypanel z-cta-btn xz-circle">EXPLORE</a></div>
<div class="z-card"> </div>
<div class="z-card-wide test-vbox">
<div class="test-clay">
<p><span></span>design<br>trends<br><i>2022</i></p>
<div>
</div>
</div>
</div>
</main>
<aside class="sidebar z-morphic-panel">
<h3>Sidebar (H3)</h3>
<nav id="subnav" class="z-center">
<div class="dial">
<a href="#" class="dial-toggle z-text-black"><ion-icon name="add-outline"></ion-icon></a>
<li style="--i:0;">
<a href="#"><ion-icon name="home-outline"></ion-icon></a>
</li>
<li style="--i:1;">
<a href="#ident"><ion-icon name="person-outline"></ion-icon></a>
</li>
<li style="--i:2;">
<a href="#config"><ion-icon name="settings-outline"></ion-icon></a>
</li>
<li style="--i:3;">
<a href="#contact"><ion-icon name="mail-outline"></ion-icon></a>
</li>
<li style="--i:4;">
<a href="#login"><ion-icon name="key-outline"></ion-icon></a>
</li>
<li style="--i:5;">
<a href="#video"><ion-icon name="videocam-outline"></ion-icon></a>
</li>
<li style="--i:6;">
<a href="#gaming"><ion-icon name="game-controller-outline"></ion-icon></a>
</li>
<li style="--i:7;">
<a href="#camera"><ion-icon name="camera-outline"></ion-icon></a>
</li>
</div>
</nav>
<section>
<h4 id="ident">User Identity</h4>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Id, veniam.</p>
</section>
<section>
<h4 id="config">Settings</h4>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Suscipit, dolor.</p>
</section>
<section>
<h4 id="contact">Contact</h4>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolores, expedita.</p>
</section>
<section>
<h4 id="login">Login</h4>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eos, laudantium.</p>
</section>
<section>
<h4 id="video">Video</h4>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Consequatur, enim.</p>
</section>
<section>
<h4 id="gaming">Gaming</h4>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Nisi, minus?</p>
</section>
<section>
<h4 id="camera">Camera</h4>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem, adipisci?</p>
</section>
<p>text</p>
</aside>
<section class="demo part1 z-glass">
<p>glassy "blog" area</p>
<div class="white-panel">
<p>white panel</p>
</div>
</section>
<section class="demo part2 z-tinted-glass">
<p>tinted "blog" area</p>
<div class="white-panel">
<p>white panel</p>
</div>
</section>
<section class="demo part3 z-frosted-glass">
<h3>"Frosted" Test Area</h3>
<h2>Pre-Alpha Neumorphism Tests...</h2>
<p>Look carefully, it doesn't work quite right...</p>
<p>Dark mode is much worse...</p>
<div class="white-panel">
<div class="container">
<div class="components">
<div class="switch">
<div class="switch__1">
<input id="switch-1" type="checkbox">
<label for="switch-1"></label>
</div>
<div class="switch__2">
<input id="switch-2" type="checkbox" checked>
<label for="switch-2"></label>
</div>
</div>
<div class="checkbox">
<div class="checkbox__1">
<input id="checkbox-1" type="checkbox">
<label for="checkbox-1">
<i class="material-icons">done</i></label>
</div>
<div class="checkbox__2">
<input id="checkbox-2" type="checkbox" checked>
<label for="checkbox-2">
<i class="material-icons">done</i></label>
</div>
</div>
<div class="radio">
<div class="radio__1">
<input id="radio-1" type="radio" name="radio" value="1">
<label for="radio-1"></label>
</div>
<div class="radio__2">
<input id="radio-2" type="radio" name="radio" value="2" checked>
<label for="radio-2"></label>
</div>
</div>
<div class="btn btn__primary"><p>Button</p></div>
<div class="btn btn__secondary"><p>Button</p></div>
<div class="clock">
<div class="hand hours"></div>
<div class="hand minutes"></div>
<div class="hand seconds"></div>
<div class="point"></div>
<div class="marker">
<span class="marker__1"></span>
<span class="marker__2"></span>
<span class="marker__3"></span>
<span class="marker__4"></span>
</div>
</div>
<div class="chip">
<div class="chip__icon">
<ion-icon name="color-palette"></ion-icon></div>
<p>Neumorphic Design</p>
<div class="chip__close">
<ion-icon name="close"></ion-icon>
</div>
</div>
<div class="circle">
<span class="circle__btn">
<ion-icon class="pause" name="pause"></ion-icon>
<ion-icon class="play" name="play"></ion-icon>
</span>
<span class="circle__back-1"></span>
<span class="circle__back-2"></span>
</div>
<div class="form">
<input type="text" class="form__input" placeholder="Type anything...">
</div>
<div class="search">
<input type="text" class="search__input" placeholder="Search...">
<div class="search__icon">
<ion-icon name="search"></ion-icon>
</div>
</div>
<div class="segmented-control">
<input type="radio" name="radio2" value="3" id="tab-1" checked/>
<label for="tab-1" class= "segmented-control__1">
<p>Tab 1</p></label>
<input type="radio" name="radio2" value="4" id="tab-2" />
<label for="tab-2" class= "segmented-control__2">
<p>Tab 2</p></label>
<input type="radio" name="radio2" value="5" id="tab-3" />
<label for="tab-3" class= "segmented-control__3">
<p>Tab 3</p></label>
<div class="segmented-control__color"></div>
</div>
<div class="icon">
<div class="icon__home">
<ion-icon name="home"></ion-icon></div>
<div class="icon__account">
<ion-icon name="person"></ion-icon></div>
<div class="icon__settings">
<ion-icon name="settings"></ion-icon></div>
</div>
<div class="slider">
<div class="slider__box">
<span class="slider__btn" id="find"></span>
<span class="slider__color"></span>
<span class="slider__tooltip">50%</span>
</div>
</div>
</div>
<a href="https://dribbble.com/myacode" class="dribbble" target="_blank"><ion-icon name="logo-dribbble"></ion-icon></a>
</div>
</div>
</section>
<footer class="z-tinted-glass">
<section class="footer-container">
<div class="sec aboutus z-claypanel">
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.</p>
<ul class="sci">
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-instagram"></i></a></li>
<li><a href="#"><i class="fa fa-youtube-play"></i></a></li>
</ul>
</div>
<div class="sec quicklinks">
<h2>Quick Links</h2>
<ul class="z-ul">
<li><a href="#">About</a></li>
<li><a href="#">FAQ</a></li>
<li><a href="#">Privacy Policy</a></li>
<li><a href="#">Help</a></li>
<li><a href="#">Terms & Conditions</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="sec quicklinks">
<h2>Shop</h2>
<ul class="z-ul">
<li><a href="#">Men</a></li>
<li><a href="#">Women</a></li>
<li><a href="#">Children</a></li>
<li><a href="#">Shoes</a></li>
<li><a href="#">Clothing</a></li>
<li><a href="#">Watch</a></li>
</ul>
</div>
<div class="sec contact">
<h2>Contact</h2>
<ul class="info">
<li>
<span><i class="fa fa-map-marker"></i></span>
<p>647 Linda Street<br>
Phoenixville, PA 19460,<br>USA</p>
</li>
<li>
<span><i class="fa fa-phone"></i></span>
<p><a href="tel:+12345678900">+1 234 567 8900</a><br><a href="tel:+12345678900">+1 234 567 8900</a></p>
</li>
<li>
<span><i class="fa fa-envelope"></i></span>
<p><a href="mailto:knowmore@email.com">knowmore@email.com</a></p>
</li>
</ul>
</div>
<section class="copyrightText z-morphic-panel">
<p>Copyright © 2022 Aaron VonDerheide. All Rights Reserved.</p>
<p>Source code: MIT License</p>
</section>
</section>
</footer>
<!-- =================================================== -->
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<script>
let toggle = document.querySelector('.dial-toggle');
let menu = document.querySelector('.dial');
toggle.onclick = function(){
menu.classList.toggle('active')
}
/* clock */
const hours = document.querySelector('.hours');
const minutes = document.querySelector('.minutes');
const seconds = document.querySelector('.seconds');
/* play button */
const play = document.querySelector('.play');
const pause = document.querySelector('.pause');
const playBtn = document.querySelector('.circle__btn');
const wave1 = document.querySelector('.circle__back-1');
const wave2 = document.querySelector('.circle__back-2');
/* rate slider */
const container = document.querySelector('.slider__box');
const btn = document.querySelector('.slider__btn');
const color = document.querySelector('.slider__color');
const tooltip = document.querySelector('.slider__tooltip');
clock = () => {
let today = new Date();
let h = (today.getHours() % 12) + today.getMinutes() / 59; // 22 % 12 = 10pm
let m = today.getMinutes(); // 0 - 59
let s = today.getSeconds(); // 0 - 59
h *= 30; // 12 * 30 = 360deg
m *= 6;
s *= 6; // 60 * 6 = 360deg
rotation(hours, h);
rotation(minutes, m);
rotation(seconds, s);
// call every second
setTimeout(clock, 500);
}
rotation = (target, val) => {
target.style.transform = `rotate(${val}deg)`;
}
window.onload = clock();
dragElement = (target, btn) => {
target.addEventListener('mousedown', (e) => {
onMouseMove(e);
window.addEventListener('mousemove', onMouseMove);
window.addEventListener('mouseup', onMouseUp);
});
onMouseMove = (e) => {
e.preventDefault();
let targetRect = target.getBoundingClientRect();
let x = e.pageX - targetRect.left + 10;
if (x > targetRect.width) { x = targetRect.width};
if (x < 0){ x = 0};
btn.x = x - 10;
btn.style.left = btn.x + 'px';
// get the position of the button inside the container (%)
let percentPosition = (btn.x + 10) / targetRect.width * 100;
// color width = position of button (%)
color.style.width = percentPosition + "%";
// move the tooltip when button moves, and show the tooltip
tooltip.style.left = btn.x - 5 + 'px';
tooltip.style.opacity = 1;
// show the percentage in the tooltip
tooltip.textContent = Math.round(percentPosition) + '%';
};
onMouseUp = (e) => {
window.removeEventListener('mousemove', onMouseMove);
tooltip.style.opacity = 0;
btn.addEventListener('mouseover', function() {
tooltip.style.opacity = 1;
});
btn.addEventListener('mouseout', function() {
tooltip.style.opacity = 0;
});
};
};
dragElement(container, btn);
/* play button */
playBtn.addEventListener('click', function(e) {
e.preventDefault();
pause.classList.toggle('visibility');
play.classList.toggle('visibility');
playBtn.classList.toggle('shadow');
wave1.classList.toggle('paused');
wave2.classList.toggle('paused');
});
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF" crossorigin="anonymous"></script>
</body>
</html>