-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06a636c
commit 1e65aa5
Showing
9 changed files
with
212 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
@use 'sass:color'; | ||
|
||
.nav-bar { | ||
position: fixed; | ||
top: 0; | ||
right: 0; | ||
left: 0; | ||
z-index: 1000; | ||
width: min(100%, 700px); | ||
padding: 8px; | ||
margin: 10px auto; | ||
overflow: hidden; | ||
font-family: utils.$font-serif; | ||
font-size: 16px; | ||
font-weight: 600; | ||
color: #fff; | ||
background: utils.$color-pink-bd; | ||
backdrop-filter: blur(10px); | ||
border: 1px solid #fff2; | ||
border-radius: 100px; | ||
box-shadow: 0 0 20px 0 utils.$color-pink-bd; | ||
transition: box-shadow 0.3s ease-in-out; | ||
|
||
@include sp { | ||
top: unset; | ||
bottom: 0; | ||
width: fit-content; | ||
padding: 8px; | ||
font-size: 12px; | ||
} | ||
|
||
&::after { | ||
position: absolute; | ||
top: var(--y, 0); | ||
left: var(--x, 0); | ||
z-index: -1; | ||
width: 40px; | ||
height: 40px; | ||
content: ''; | ||
background: color.adjust(utils.$color-pink, $alpha: 0.5); | ||
filter: blur(16px); | ||
opacity: 0; | ||
transition: opacity 0.3s ease-in-out; | ||
} | ||
|
||
@include hover { | ||
box-shadow: 0 0 30px 0 color.adjust(utils.$color-pink-bd, $alpha: 0.05); | ||
|
||
&::after { | ||
opacity: 0.8; | ||
animation: hover-glow 2s infinite; | ||
} | ||
} | ||
} | ||
|
||
@keyframes hover-glow { | ||
0% { | ||
scale: 1; | ||
} | ||
|
||
50% { | ||
scale: 1.1; | ||
} | ||
|
||
100% { | ||
scale: 1; | ||
} | ||
} | ||
|
||
.nav-items { | ||
@extend %center-items-grid; | ||
|
||
z-index: 100; | ||
grid-template-columns: 1fr 1fr 40px 1fr 1fr; | ||
gap: 8px; | ||
padding: 0; | ||
margin: 0 auto; | ||
list-style: none; | ||
} | ||
|
||
.nav-item { | ||
@extend %center-items-grid; | ||
|
||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 100px; | ||
|
||
&::after { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
content: ''; | ||
background: radial-gradient(circle at 40%, #fff 0%, transparent 20%), | ||
radial-gradient(circle at 60%, #ace 0%, transparent 40%); | ||
filter: blur(10px); | ||
opacity: 0; | ||
transition: opacity 0.5s ease-in-out; | ||
} | ||
|
||
@include hover { | ||
&::after { | ||
opacity: 0.8; | ||
animation: hover-glow 2s infinite; | ||
} | ||
} | ||
} | ||
|
||
.c-mark-nav { | ||
height: 32px; | ||
|
||
.stroke { | ||
stroke: #fff; | ||
stroke-width: 1px; | ||
} | ||
} | ||
|
||
.text-link { | ||
position: relative; | ||
transition: text-shadow 0.3s ease-in-out; | ||
|
||
&.-active { | ||
// layer won't work for this | ||
text-decoration: underline; | ||
text-underline-offset: 4px; | ||
} | ||
|
||
.nav-item:hover & { | ||
text-shadow: 0 0 10px utils.$color-navy; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @file math.ts | ||
* @brief Math utility functions | ||
*/ | ||
|
||
/** | ||
* Get the square root of a number with the sign of the number preserved | ||
* | ||
* @param x number | ||
* @returns the square root of the number with the sign of the number preserved | ||
*/ | ||
export const sqrtAnyNum = (x: number) => { | ||
if (x < 0) { | ||
return -Math.sqrt(Math.abs(x)); | ||
} | ||
return Math.sqrt(x); | ||
}; |