-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Chocolate1999/feat/new-nav
feat: add new nav
- Loading branch information
Showing
15 changed files
with
153 additions
and
219 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import clsx from 'clsx'; | ||
import { useTheme } from 'next-themes'; | ||
import * as React from 'react'; | ||
import { FiMoon, FiSun } from 'react-icons/fi'; | ||
|
||
import useLoaded from '@/hooks/useLoaded'; | ||
|
||
type ThemeButtonProps = React.ComponentPropsWithoutRef<'button'>; | ||
|
||
export default function ThemeButton({ className, ...rest }: ThemeButtonProps) { | ||
const { theme, setTheme } = useTheme(); | ||
const isLoaded = useLoaded(); | ||
|
||
return ( | ||
<button | ||
className={clsx(className)} | ||
{...rest} | ||
onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')} | ||
> | ||
{theme === 'light' && isLoaded ? <FiMoon /> : <FiSun />} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,31 @@ | ||
import UnderlineLink from '@/components/links/UnderlineLink'; | ||
|
||
export default function Footer() { | ||
return ( | ||
<footer className='relative bottom-2 flex w-full justify-center text-gray-700 dark:text-gray-200'> | ||
© {new Date().getFullYear()} By{' '} | ||
<a | ||
href='https://github.com/Chocolate1999' | ||
target='_blank' | ||
className='pl-1' | ||
rel='noreferrer' | ||
> | ||
Chocolate | ||
</a> | ||
<footer className='mt-16 text-right text-[#b3b3b3] dark:text-gray-200'> | ||
<section className='flex flex-col items-end'> | ||
<div> | ||
<a | ||
href='https://creativecommons.org/licenses/by-nc-sa/4.0/' | ||
rel='noreferrer' | ||
target='_blank' | ||
> | ||
CC BY-NC-SA 4.0 | ||
</a>{' '} | ||
{new Date().getFullYear()} | ||
<a | ||
href='https://github.com/Chocolate1999' | ||
target='_blank' | ||
className='pl-1' | ||
rel='noreferrer' | ||
> | ||
© Yang Chao Yi | ||
</a> | ||
</div> | ||
<UnderlineLink href='https://beian.miit.gov.cn/'> | ||
湘ICP备20002952号 | ||
</UnderlineLink> | ||
</section> | ||
</footer> | ||
); | ||
} |
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,28 @@ | ||
import { BsGithub } from 'react-icons/bs'; | ||
import { SiBilibili } from 'react-icons/si'; | ||
|
||
import ThemeButton from '@/components/buttons/ThemeButton'; | ||
|
||
const Logo = () => { | ||
return ( | ||
<div className='flex cursor-pointer gap-[24px] text-[22px]'> | ||
<a | ||
href='https://github.com/Chocolate1999' | ||
rel='noreferrer' | ||
target='_blank' | ||
> | ||
<BsGithub /> | ||
</a> | ||
<a | ||
href='https://space.bilibili.com/351534170' | ||
rel='noreferrer' | ||
target='_blank' | ||
> | ||
<SiBilibili /> | ||
</a> | ||
<ThemeButton /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Logo; |
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@keyframes fade-up-header { | ||
0% { | ||
opacity: 0; | ||
transform: translateY(10%); | ||
} | ||
|
||
100% { | ||
opacity: 1; | ||
transform: translateY(0); | ||
} | ||
} | ||
|
||
.logo_name { | ||
} |
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.