Skip to content

Commit

Permalink
scroll progress
Browse files Browse the repository at this point in the history
  • Loading branch information
myst729 committed Aug 14, 2023
1 parent 1b290f8 commit 6bf1e96
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions _includes/top.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<div class="progress"></div>
<div class="masthead">
<div class="container">
<h3 class="masthead-title serif">
Expand Down
31 changes: 31 additions & 0 deletions _sass/groove.scss
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,37 @@ tbody tr:nth-child(odd) th {
padding-left: 1em;
}
}
.progress {
height: 3px;
background: blue;
position: fixed;
top: 0;
left: 0;
z-index: 25;
width: 100%;
transform-origin: 0 50%;
animation: scaleProgress auto linear forwards, colorChange auto linear forwards;
animation-timeline: scroll(root);
}
@keyframes scaleProgress {
0% {
transform: scaleX(0);
}
100% {
transform: scaleX(1);
}
}
@keyframes colorChange {
0% {
background-color: red;
}
50% {
background-color: yellow;
}
100% {
background-color: lime;
}
}

.home-social,
.masthead-social {
Expand Down

0 comments on commit 6bf1e96

Please sign in to comment.