Skip to content

Commit

Permalink
Loading page
Browse files Browse the repository at this point in the history
  • Loading branch information
tompointcom committed Jun 13, 2024
1 parent eb76449 commit cf03a32
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 2 deletions.
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
</head>

<body>

<!-- Loader-->

<div class="loader"></div>


<!-- Header -->

<header class="header">
Expand Down
25 changes: 24 additions & 1 deletion sass/base/_animations.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
// Loader

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

@keyframes visibility {
90%{
opacity: 1;
}
100%{
opacity: 0;
}
}








.btn-hover:hover {
// transition: all 300ms ease-in-out;

background: $light-gradiant;
p {
transform: scale(1.02);
Expand Down
31 changes: 31 additions & 0 deletions sass/layout/_loader.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.loader {
position: fixed;
left: 0;
top: 0;
z-index: 3;
width: 100vw;
height: 100vh;
@include flex-center;
background: $tertiary-color;
animation: visibility 2s ease forwards;
}

.loader-active {
display: flex;
}

.loader::after {
content: "";
position: absolute;
left: 50%;
top: 50%;
z-index: 1;
width: 120px;
height: 120px;
margin: -76px 0 0 -76px;
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid #008766;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
1 change: 1 addition & 0 deletions sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@import 'layout/header';
@import 'layout/main';
@import 'layout/footer';
@import 'layout/loader';

@import 'pages/restaurants';

Expand Down
50 changes: 50 additions & 0 deletions style/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion style/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf03a32

Please sign in to comment.