File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Preloader
2- var preloader = document . getElementById ( 'loading' ) ;
2+ var preloader = document . getElementById ( 'loading' ) ;
3+ var preloader2 = document . getElementById ( 'loading2' ) ;
4+
5+ function loading ( ) {
6+ setTimeout ( myfunction , 2000 ) ;
7+ }
38
4- function loading ( ) {
5- setTimeout ( myfunction , 1500 ) ;
6- }
7-
8- function myfunction ( ) {
9- preloader . style . display = 'none' ;
10- }
9+
10+ function myfunction ( ) {
11+ preloader . style . display = 'none' ;
12+ preloader2 . style . display = 'none' ;
13+ }
1114
1215
1316$ ( document ) . ready ( function ( ) {
Original file line number Diff line number Diff line change @@ -15,63 +15,17 @@ body {
1515}
1616
1717/* Preloader */
18- .preloader {
19- background : # 111 ;;
20- width: 100%;
21- height: 100%;
22- line-height: 50px;
23- text- align: center;
18+ # loading {
2419 position : fixed;
25- to p: 50%;
26- left: 50%;
27- transfor m: translate(-50%, -50%);
28- font- family: helvetica, arial, sans- serif;
29- font- weight: 900;
30- letter- spacing: 0.2em;
31- z- index: 9999999;
32- }
33- .preloader span {
34- position : absolute;
35- width : 250px ;
36- top : 50% ;
37- left : 50% ;
38- transform : translate (-50% , -50% );
39- color : # fff ;
40- text-transform : uppercase;
41- }
42- .preloader span ::before ,
43- .preloader span ::after {
44- content : "" ;
45- display : block;
46- width : 15px ;
47- height : 15px ;
48- background : # e47a17 ;
49- position : absolute;
50- animation : load 1s infinite alternate ease-in-out;
51- }
52- .preloader span ::before {
53- top : 0 ;
54- }
55- .preloader span ::after {
56- bottom : 0 ;
57- }
58- @keyframes load {
59- 0% {
60- left : 0 ;
61- height : 30px ;
62- width : 15px ;
63- }
64- 50% {
65- height : 8px ;
66- width : 40px ;
67- }
68- 100% {
69- left : 235px ;
70- height : 30px ;
71- width : 15px ;
72- }
20+ width : 100% ;
21+ height : 100vh ;
22+ background : # 1f1e1e url ('./assets/js-preloader.gif' );
23+ background-repeat : no-repeat;
24+ background-position : center;
25+ z-index : 99999 ;
7326}
7427
28+
7529/* Dark Mode */
7630body .dark-mode {
7731 background-color : # 111 ;
Original file line number Diff line number Diff line change 1414 < title > 30 Days of JavaScript</ title >
1515</ head >
1616
17- < body id ="body " class ="dark-mode "onload ="loading() ">
17+ < body id ="body " class ="dark-mode " onload ="loading() ">
1818
19- <!--Preloader-->
20- < div class ="preloader " id ="loading " > < span > Loading...</ span > </ div >
21-
22- <!-- Heading -->
19+ <!--Pre Loader-->
20+ < div id ="loading ">
21+
22+ </ div >
23+
24+ <!-- Heading -->
2325 < h1 > 30 Days of JavaScript</ h1 >
2426 < input id ="searchbar " onkeyup ="search_project() " type ="text " name ="search " placeholder ='Search projects..... ' />
2527 <!-- Dark Mode Button -->
You can’t perform that action at this time.
0 commit comments