Skip to content

Commit

Permalink
feat: add a circular loader instead of jump
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoClery committed Jun 5, 2024
1 parent 403ab3e commit d787932
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 55 deletions.
52 changes: 25 additions & 27 deletions index.css

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

2 changes: 1 addition & 1 deletion index.css.map

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

32 changes: 20 additions & 12 deletions sass/abstracts/_loader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,33 @@
}

.loader__itemContainer {
position: relative;
width: 6rem;
height: 6rem;
display: flex;
width: 5rem;
justify-content: space-between;
align-items: center;
justify-content: center;
}

.loader__item {
height: 1rem;
width: 1rem;
border-radius: 1rem;
animation: jump 1s;
animation-iteration-count: 1;
position: absolute;
width: 1.5rem;
height: 1.5rem;
border-radius: 50%;
animation: rotate 1.5s linear infinite;
}

.loader__item--1 {
background-color: $color-primary;
animation-delay: 0s;
}

.loader__item--2 {
background-color: $color-secondary;
animation-delay: 0.25s;
animation-delay: 0.5s;
}

.loader__item--3 {
background-color: $color-tertiary;
animation-delay: 0.5s;
}
.loader__item--1 {
background-color: $color-primary;
animation-delay: 1s;
}
24 changes: 9 additions & 15 deletions sass/base/_animations.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
@keyframes rotate {
0% {
transform: rotate(0deg) translateX(2.5rem) rotate(0deg);
}
100% {
transform: rotate(360deg) translateX(2.5rem) rotate(-360deg);
}
}

@keyframes loader {
100% {
opacity: 0;
Expand All @@ -14,21 +23,6 @@
}
}

@keyframes jump {
0% {
transform: translateY(0);
}
25% {
transform: translateY(0.5rem);
}
75% {
transform: translateY(-0.5rem);
}
100% {
transform: translateY(0);
}
}

@keyframes menu-listes {
0% {
opacity: 0;
Expand Down

0 comments on commit d787932

Please sign in to comment.