File tree 4 files changed +110
-2
lines changed
4 files changed +110
-2
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,11 @@ <h3>Log In</h3>
230
230
< div class ="modal-footer ">
231
231
< p > Don't have an account? < a href ="# "> Start your free trial</ a > </ p >
232
232
</ div >
233
- < img class ="close " src ="img/close.svg " alt ="close " />
233
+ < img
234
+ class ="close "
235
+ src ="https://github.com/bradtraversy/hulu-webpage-clone/blob/main/img/close.svg?raw=true "
236
+ alt ="close "
237
+ />
234
238
</ div >
235
239
</ div >
236
240
< script src ="script.js "> </ script >
Original file line number Diff line number Diff line change
1
+ const modal = document . querySelector ( ".modal" ) ;
2
+ const loginButton = document . querySelector ( ".login-btn" ) ;
3
+ const closeButton = document . querySelector ( ".close" ) ;
4
+
5
+ const openModal = ( ) => ( modal . style . display = "block" ) ;
6
+ const closeModal = ( ) => ( modal . style . display = "none" ) ;
7
+ const outsideClick = ( e ) => {
8
+ if ( e . target == modal ) {
9
+ closeModal ( ) ;
10
+ }
11
+ } ;
12
+
13
+ loginButton . addEventListener ( "click" , openModal ) ;
14
+ closeButton . addEventListener ( "click" , closeModal ) ;
15
+ window . addEventListener ( "click" , outsideClick ) ;
Original file line number Diff line number Diff line change 74
74
border-color : # ccc ;
75
75
}
76
76
77
+ .btn-dark {
78
+ color : # fff ;
79
+ background-color : # 000 ;
80
+ }
81
+
77
82
.legal-text {
78
83
font-size : 10px ;
79
84
color : # ccc ;
@@ -355,6 +360,90 @@ h4 {
355
360
margin-right : 25px ;
356
361
}
357
362
363
+ /* Modal */
364
+
365
+ .modal {
366
+ display : none;
367
+ position : fixed;
368
+ top : 0 ;
369
+ left : 0 ;
370
+ z-index : 1 ;
371
+ height : 100% ;
372
+ width : 100% ;
373
+ background : rgba (0 , 0 , 0 , 0.5 );
374
+ }
375
+
376
+ .modal-box {
377
+ margin : 10% auto;
378
+ width : 400px ;
379
+ background-color : # fff ;
380
+ color : # 333 ;
381
+ position : relative;
382
+ animation : modalopen 1s ;
383
+ }
384
+
385
+ @keyframes modalopen {
386
+ from {
387
+ opacity : 0 ;
388
+ }
389
+ to {
390
+ opacity : 1 ;
391
+ }
392
+ }
393
+
394
+ .modal-body {
395
+ padding : 50px ;
396
+ }
397
+
398
+ .modal-body h3 {
399
+ font-weight : bold;
400
+ }
401
+
402
+ .modal-body .btn {
403
+ width : 100% ;
404
+ margin-top : 30px ;
405
+ }
406
+
407
+ .modal .close {
408
+ cursor : pointer;
409
+ height : 23px ;
410
+ width : 23px ;
411
+ position : absolute;
412
+ top : 20px ;
413
+ right : 20px ;
414
+ }
415
+
416
+ .modal .modal-footer {
417
+ background-color : # f7f7f9 ;
418
+ color : # 333 ;
419
+ padding : 20px 0 ;
420
+ border-top : 1px solid # eee ;
421
+ text-align : center;
422
+ }
423
+
424
+ .modal a {
425
+ color : steelblue;
426
+ }
427
+
428
+ /* Form */
429
+
430
+ .form-control {
431
+ margin : 20px 0 ;
432
+ }
433
+
434
+ .form-control label {
435
+ display : block;
436
+ text-transform : uppercase;
437
+ }
438
+
439
+ .form-control input {
440
+ width : 100% ;
441
+ border : 2px solid # ccc ;
442
+ border-radius : 5px ;
443
+ height : 50px ;
444
+ padding : 5px ;
445
+ }
446
+
358
447
/* Media Queries */
359
448
360
449
@media (max-width : 1300px ) {
Original file line number Diff line number Diff line change 105
105
| 97 | [ Terminal Style Landing Page] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/97-terminal%20style%20landing%20page ) | [ Live Demo] ( https://codepen.io/solygambas/full/BaWvXLG ) |
106
106
| 98 | [ Magazine Layout] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/98-magazine%20layout ) | [ Live Demo] ( https://codepen.io/solygambas/full/OJpGMyj ) |
107
107
| 99 | [ Parallax Website] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/99-parallax%20website ) | [ Live Demo] ( https://codepen.io/solygambas/full/poeBdPr ) |
108
- | 100 | [ Hulu Webpage Clone] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/100-hulu%20webpage%20clone ) | [ Live Demo] ( # ) |
108
+ | 100 | [ Hulu Webpage Clone] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/100-hulu%20webpage%20clone ) | [ Live Demo] ( https://codepen.io/solygambas/full/rNmmqBy ) |
109
109
110
110
This repository is mostly based on 2 courses by Brad Traversy (2020):
111
111
You can’t perform that action at this time.
0 commit comments