-
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.
rehypeAutoHeading from depth to nesting, add
scroll-up
, fix top tit…
…le select, add headlines to main page
- Loading branch information
1 parent
d9a1226
commit 3b98cb5
Showing
16 changed files
with
229 additions
and
60 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,49 @@ | ||
'use client'; | ||
|
||
import { Button, cn } from '@nextui-org/react'; | ||
import { useEffect, useState } from 'react'; | ||
import { GoArrowUp } from 'react-icons/go'; | ||
|
||
export const ScrollUp = () => { | ||
const [isScrolled, setIsScrolled] = useState(false); | ||
|
||
useEffect(() => { | ||
const handleScroll = () => { | ||
if (window.scrollY > 30) { | ||
setIsScrolled(true); | ||
} else { | ||
setIsScrolled(false); | ||
} | ||
}; | ||
|
||
window.addEventListener('scroll', handleScroll); | ||
return () => { | ||
window.removeEventListener('scroll', handleScroll); | ||
}; | ||
}, []); | ||
|
||
const scrollToTop = () => { | ||
if (!isScrolled) return; | ||
|
||
window.scrollTo({ | ||
top: 0, | ||
behavior: 'smooth', | ||
}); | ||
}; | ||
|
||
return ( | ||
<Button | ||
className={cn( | ||
'bg-default-100 hover:bg-primary-500 fixed bottom-4 right-4 text-default-500 hover:text-default-900', | ||
{ | ||
'opacity-0': !isScrolled, | ||
}, | ||
)} | ||
onClick={scrollToTop} | ||
radius='lg' | ||
isIconOnly | ||
> | ||
<GoArrowUp size={22} /> | ||
</Button> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { GithubEditLink } from './github-edit-link/github-edit-link'; | ||
import { Portal } from './portal/portal'; | ||
import { PortalEnum } from './portal/portal-enum'; | ||
|
||
export { Portal, PortalEnum }; | ||
export { GithubEditLink, Portal, PortalEnum }; |
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
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,18 @@ | ||
.content { | ||
@apply mb-8 flex flex-col mt-auto; | ||
} | ||
|
||
// .content { | ||
// @apply bg-default-50/80 border-default-900/5 hover:border-default-900/10 rounded-lg border px-4 py-3 transition-colors mb-8 flex flex-col relative; | ||
|
||
// &::before { | ||
// content: ""; | ||
// display: block; | ||
// left: 0; | ||
// width: 100%; | ||
// background: linear-gradient(90deg, rgba(56, 189, 248, 0) 20%, rgba(144, 163, 187, 0.2) 50%, rgba(236, 72, 153, 0) 80%); | ||
// height: 1px; | ||
// position: absolute; | ||
// top: -1px; | ||
// } | ||
// } |
Oops, something went wrong.