-
-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Innei <tukon479@gmail.com>
- Loading branch information
Showing
22 changed files
with
465 additions
and
102 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
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,66 @@ | ||
interface LinkSection { | ||
name: string | ||
links: { | ||
name: string | ||
href: string | ||
external?: boolean | ||
}[] | ||
} | ||
|
||
export const linkSections: LinkSection[] = [ | ||
{ | ||
name: '关于', | ||
links: [ | ||
{ | ||
name: '关于本站', | ||
href: '/about-site', | ||
}, | ||
{ | ||
name: '关于我', | ||
href: '/about-me', | ||
}, | ||
{ | ||
name: '关于此项目', | ||
href: 'https://github.com/innei/springtide', | ||
external: true, | ||
}, | ||
], | ||
}, | ||
{ | ||
name: '更多', | ||
links: [ | ||
{ | ||
name: '时间线', | ||
href: '/timeline', | ||
}, | ||
{ | ||
name: '友链', | ||
href: '/friends', | ||
}, | ||
{ | ||
name: '监控', | ||
href: 'https://status.shizuri.net/status/main', | ||
external: true, | ||
}, | ||
], | ||
}, | ||
{ | ||
name: '联系', | ||
links: [ | ||
{ | ||
name: '写留言', | ||
href: '/message', | ||
}, | ||
{ | ||
name: '发邮件', | ||
href: 'mailto:i@innei.ren', | ||
external: true, | ||
}, | ||
{ | ||
name: 'GitHub', | ||
href: 'https://github.com/innei', | ||
external: true, | ||
}, | ||
], | ||
}, | ||
] |
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,31 @@ | ||
'use client' | ||
|
||
import { useDeferredValue } from 'react' | ||
|
||
import { usePageScrollLocation } from '~/providers/root/page-scroll-info-provider' | ||
import { clsxm } from '~/utils/helper' | ||
|
||
export const useHeaderOpacity = () => { | ||
const threshold = 50 | ||
const y = usePageScrollLocation() | ||
const headerOpacity = useDeferredValue( | ||
y >= threshold ? 1 : Math.floor((y / threshold) * 100) / 100, | ||
) | ||
|
||
return headerOpacity | ||
} | ||
|
||
export const BluredBackground = () => { | ||
const headerOpacity = useHeaderOpacity() | ||
return ( | ||
<div | ||
className={clsxm( | ||
'absolute inset-0 transform-gpu [backdrop-filter:saturate(180%)_blur(20px)] [backface-visibility:hidden]', | ||
'bg-themed-bg_opacity [border-bottom:1px_solid_rgb(187_187_187_/_20%)]', | ||
)} | ||
style={{ | ||
opacity: headerOpacity, | ||
}} | ||
/> | ||
) | ||
} |
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
Oops, something went wrong.