add snap scroll
parent
645588a07b
commit
e64b13ae92
Binary file not shown.
After Width: | Height: | Size: 259 KiB |
|
@ -9,6 +9,7 @@ import {
|
||||||
FaGithub,
|
FaGithub,
|
||||||
FaLinkedin
|
FaLinkedin
|
||||||
} from 'react-icons/fa';
|
} from 'react-icons/fa';
|
||||||
|
import { ReactNode } from "react";
|
||||||
|
|
||||||
const circle = cva("absolute rounded-full border -z-10", {
|
const circle = cva("absolute rounded-full border -z-10", {
|
||||||
variants: {
|
variants: {
|
||||||
|
@ -26,7 +27,7 @@ const circle = cva("absolute rounded-full border -z-10", {
|
||||||
},
|
},
|
||||||
color: {
|
color: {
|
||||||
back: "border-pink-50",
|
back: "border-pink-50",
|
||||||
fore: "border-rose-300",
|
fore: "border-amber-300",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
|
@ -49,41 +50,58 @@ const Shapes = () => <div className="absolute flex items-center justify-center">
|
||||||
<Circle size={4} />
|
<Circle size={4} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
const Brief = () => <article className="relative w-screen flex flex-col justify-center items-center overflow-hidden text-center min-h-screen gap-2">
|
const Article: React.FC<{ children?: ReactNode }> = ({ children }) => <article
|
||||||
|
className="relative w-screen flex flex-col justify-center items-center overflow-hidden text-center min-h-screen gap-2">
|
||||||
|
{children}
|
||||||
|
</article>
|
||||||
|
|
||||||
|
const Brief = () => <Article>
|
||||||
{/*Avatar*/}
|
{/*Avatar*/}
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
<Shapes />
|
<Shapes />
|
||||||
<div className="rounded-full w-[200px] h-[200px] overflow-hidden flex justify-center">
|
<div className="rounded-full w-[200px] h-[200px] overflow-hidden flex justify-center">
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
<Image
|
<Image
|
||||||
src="/assets/myself.jpg"
|
src="/assets/avatarRL.jpeg"
|
||||||
width={512}
|
width={512}
|
||||||
height={512}
|
height={512}
|
||||||
alt="Hung's avatar" />
|
alt="Hung's avatar" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h1 className="text-3xl semi-bold z-10">
|
<h1 className="text-gray-700 text-3xl semi-bold z-10">
|
||||||
Hung Tran
|
Hung Tran
|
||||||
</h1>
|
</h1>
|
||||||
<h1 className="text-3xl tracking-wider z-10">
|
<h1 className="text-gray-400 text-xl tracking-widest z-10 uppercase">
|
||||||
Software Engineer
|
Software Engineer
|
||||||
</h1>
|
</h1>
|
||||||
</article>
|
</Article>
|
||||||
|
|
||||||
const About = () => <article className="flex gap-4">
|
const SectionHeader: React.FC<{ text?: string, children?: ReactNode }> = ({ text, children }) => <h1
|
||||||
This is my about section
|
className="text-xl text-gray-600 tracking-widest">
|
||||||
</article>
|
{text}
|
||||||
|
{children}
|
||||||
|
</h1>
|
||||||
|
|
||||||
const Experience = () => <article>
|
const ImageDisplay = () => <div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
const About = () => <Article>
|
||||||
|
<SectionHeader>About</SectionHeader>
|
||||||
|
</Article>
|
||||||
|
|
||||||
|
const Experience = () => <Article>
|
||||||
|
<SectionHeader>Experience</SectionHeader>
|
||||||
Some stub content while this is not propagated yet
|
Some stub content while this is not propagated yet
|
||||||
</article>
|
</Article>
|
||||||
|
|
||||||
const Blog = () => <article>
|
const Blog = () => <Article>
|
||||||
|
<SectionHeader>Blogs</SectionHeader>
|
||||||
lol
|
lol
|
||||||
</article>
|
</Article>
|
||||||
|
|
||||||
const Projects = () => <article className="flex flex-col">
|
const Projects = () => <Article >
|
||||||
|
<SectionHeader>Projects</SectionHeader>
|
||||||
<span>
|
<span>
|
||||||
I was about to type Lorem Ipsum until I realize I could not even remember the content
|
I was about to type Lorem Ipsum until I realize I could not even remember the content
|
||||||
of the first sentence.
|
of the first sentence.
|
||||||
|
@ -112,7 +130,7 @@ const Projects = () => <article className="flex flex-col">
|
||||||
I was about to type Lorem Ipsum until I realize I could not even remember the content
|
I was about to type Lorem Ipsum until I realize I could not even remember the content
|
||||||
of the first sentence.
|
of the first sentence.
|
||||||
</span>
|
</span>
|
||||||
</article>
|
</Article>
|
||||||
|
|
||||||
|
|
||||||
const NavbarItem: React.FC<{
|
const NavbarItem: React.FC<{
|
||||||
|
@ -120,37 +138,62 @@ const NavbarItem: React.FC<{
|
||||||
link: string;
|
link: string;
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
}> = ({ text, link, children }) => <Link className="group" href={link}>
|
}> = ({ text, link, children }) => <Link className="group" href={link}>
|
||||||
<button className="flex flex-col items-center justify-center flex-flex-col p-2 group-hover:cursor-pointer">
|
<button className="flex flex-col items-center justify-center flex-flex-col p-2 group-hover:cursor-pointer group">
|
||||||
{children}
|
{children}
|
||||||
{/*<span className="group-hover:visible invisible">{text}</span>*/}
|
{/*<span className="group-hover:visible invisible">{text}</span>*/}
|
||||||
</button>
|
</button>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
|
|
||||||
|
const iconCva = cva("transition-colors", {
|
||||||
|
variants: {
|
||||||
|
theme: {
|
||||||
|
light: "group-hover:fill-gray-700 fill-gray-400"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
defaultVariants: {
|
||||||
|
theme: "light"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const Navbar = () => <div className="flex justify-center items-center w-full z-50 sticky top-0 left-0 backdrop-blur-md h-8">
|
const Navbar = () => <div className="flex justify-center items-center w-full z-50 sticky top-0 left-0 backdrop-blur-md h-8">
|
||||||
<div className="w-11/12 max-w-screen-lg flex items-center gap-4">
|
<div className="w-11/12 max-w-screen-lg flex items-center gap-4">
|
||||||
<div className="flex flex-row justify-center items-center gap-1">
|
<div className="flex flex-row justify-center items-center gap-1">
|
||||||
<NavbarItem text="GitHub" link="https://github.com/pegasust"><FaGithub /></NavbarItem>
|
<NavbarItem text="GitHub" link="https://github.com/pegasust"><FaGithub className={iconCva()} /></NavbarItem>
|
||||||
<NavbarItem text="LinkedIn" link="https://linkedin.com/in/hung-tran-1963bb205/"><FaLinkedin /></NavbarItem>
|
<NavbarItem text="LinkedIn" link="https://linkedin.com/in/hung-tran-1963bb205/"><FaLinkedin className={iconCva()} /></NavbarItem>
|
||||||
</div>
|
</div>
|
||||||
<span className="text-gray-400 animate-pulse">Hung Tran</span>
|
<Link href="#brief">
|
||||||
|
<span className="transition-colors hover:text-amber-400 text-amber-400/50 animate-pulse">Hung Tran</span>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
const Home: NextPage = () => {
|
const Home: NextPage = () => {
|
||||||
return (
|
return (
|
||||||
<main className="z-0 flex flex-col justify-center items-center bg-pink-50/0 min-h-screen antialiased">
|
<main className="overflow-x-hidden z-0 flex flex-col overflow-y-scroll h-screen
|
||||||
|
items-center bg-pink-50/20 min-h-screen antialiased snap-y snap-proximity">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Hung Tran</title>
|
<title>Hung Tran</title>
|
||||||
<meta name="description" content="Personal website about Hung Tran and my homelab Felia" />
|
<meta name="description" content="Personal website about Hung Tran and my homelab Felia" />
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
</Head>
|
</Head>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
<section id="brief" className="snap-start">
|
||||||
<Brief />
|
<Brief />
|
||||||
|
</section>
|
||||||
|
<section id="about" className="snap-start">
|
||||||
<About />
|
<About />
|
||||||
|
</section>
|
||||||
|
<section id="experience" className="snap-start">
|
||||||
<Experience />
|
<Experience />
|
||||||
|
</section>
|
||||||
|
<section id="blog" className="snap-start">
|
||||||
<Blog />
|
<Blog />
|
||||||
|
</section>
|
||||||
|
<section id="projects" className="snap-start">
|
||||||
<Projects />
|
<Projects />
|
||||||
|
</section>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue