mirror of
https://github.com/Radiquum/radiquum.github.io.git
synced 2025-05-08 05:49:34 +05:00
feat: add about me section
This commit is contained in:
parent
b09a84afbe
commit
1f4628a259
3 changed files with 79 additions and 6 deletions
|
@ -38,16 +38,16 @@ window.onscroll = () => {
|
|||
let scrollPosition = getScrollPosition()
|
||||
console.log(last_Y_pos, window.scrollY, scrollPosition, header_opacity)
|
||||
|
||||
if (scrollPosition < 20) {
|
||||
if (scrollPosition < 1) {
|
||||
header.style.display = "none"
|
||||
} else {
|
||||
header.style.display = "block"
|
||||
}
|
||||
|
||||
|
||||
if ((window.scrollY > last_Y_pos) && (scrollPosition > 40)) {
|
||||
if ((window.scrollY > last_Y_pos) && (scrollPosition > 1)) {
|
||||
header_opacity += 0.1
|
||||
} else if ((window.scrollY < last_Y_pos) && (scrollPosition < 40)) (
|
||||
} else if ((window.scrollY < last_Y_pos) && (scrollPosition < 1)) (
|
||||
header_opacity -= 0.1
|
||||
)
|
||||
last_Y_pos = window.scrollY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue