Skip to content

Commit

Permalink
Add animations and polish existing ones
Browse files Browse the repository at this point in the history
(+ accessibility with reduced motion)
  • Loading branch information
kubgus committed Aug 14, 2024
1 parent 8ee26f8 commit 107c925
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/tech-marquee.astro
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,27 @@ pictures = pictures.sort(() => Math.random() - 0.5);
margin: 2rem 0;
}

figure {
scrollbar-width: none;
}

figure > div {
animation: marquee linear 30s infinite;
width: max-content;
display: flex;
align-items: center;
flex-direction: row;
gap: 0.5rem;
animation: marquee linear 30s infinite;
}

@media (prefers-reduced-motion: reduce) {
figure {
overflow: scroll;
}

figure > div {
animation: none;
}
}

@keyframes marquee {
Expand Down
10 changes: 10 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ const title = "Jakub Gustafik";
font-size: 1.2rem;
}

.content > div > * {
opacity: 0;
scale: 0.9;
animation: fade-in ease-out 0.2s forwards;
}

@keyframes fade-in {
to { scale: 1; opacity: 1; }
}

.content h1 {
font-size: 1.85rem;
}
Expand Down

0 comments on commit 107c925

Please sign in to comment.