ref(global) restart project

This commit is contained in:
lumither committed 2024-04-24 16:23:44 +08:00
1 parent dad86cdaad
commit 9917d15714
15 files changed
+11 -324

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
export default function Page() {
return <></>
}
-3
View File
@@ -1,3 +0,0 @@
export default function Archives() {
return <></>;
}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

-9
View File
@@ -1,9 +0,0 @@
'use client';
export default function Footer() {
return (
<div className={ `bottom-0 mt-5 content-center h-fit bg-slate-800/95` }>
<p className={ `text-center my-2` }>©2024-{ new Date().getFullYear() } <a
href={ 'https://github.com/lumither' }>Lumither Tao</a></p>
</div>
);
}
-79
View File
@@ -1,79 +0,0 @@
'use client';
import { useEffect, useState } from 'react';
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
import { NavigationMenu, NavigationMenuItem, NavigationMenuList } from '@/components/ui/navigation-menu';
import Link from 'next/link';
const entries: { display_name: string; href: string; }[] = [
{
display_name: 'About',
href: '/about'
},
{
display_name: 'Archive',
href: '/archive'
}
];
export default function Navbar() {
const [ scrolled, setScrolled ] = useState(false);
useEffect(() => {
const handleScroll = () => {
const isScrolled = window.scrollY > 0;
setScrolled(isScrolled);
};
window.addEventListener('scroll', handleScroll);
return () => {
window.removeEventListener('scroll', handleScroll);
};
}, []);
return <>
<div
className={ `flex flex-row fixed top-0 z-10 transition-all duration-300 backdrop-blur
${ scrolled ? 'rounded-3xl w-[95%] ml-[2.5%] mr-[2.5%] mt-[1%] border-resolution-blue-200 border'
: 'w-full border-slate-200/15 border-b shadow h-20' }` }>
<div className={ `transition-all duration-300 ${ scrolled ? 'w-0' : 'w-[5%]' }` }></div>
<NavigationMenu className={ `transition-all duration-300` }>
<NavigationMenuList
className={ `flex space-x-4 transition-all duration-500 ${ scrolled ? 'space-x-3' : '' }` }>
<NavigationMenuItem>
<Link href={ '/about' }>
<Avatar className={ 'transition-all duration-300 hover:scale-125' }>
<AvatarImage src={ 'https://avatars.githubusercontent.com/u/46409277' }
alt={ 'Lumither\'s Avatar' } />
<AvatarFallback>Tao</AvatarFallback>
</Avatar>
</Link>
</NavigationMenuItem>
<NavigationMenuItem>
<Link href={ '/' }>
<p className={ 'text-xl transition-all duration-300 hover:text-resolution-blue-400' }>{ 'Lumither\'s Blog' }</p>
</Link>
</NavigationMenuItem>
<NavigationMenuItem></NavigationMenuItem>
{
entries.map((entry, id) => (
<NavigationMenuItem key={ id }>
<Link href={ entry.href }>
<p className={ 'transition-all duration-300 hover:text-resolution-blue-400' }>{ entry.display_name }</p>
</Link>
</NavigationMenuItem>
))
}
</NavigationMenuList>
</NavigationMenu>
</div>
</>;
}