Skip to content

Commit a70cf6f

Browse files
committed
-
1 parent 1a16c98 commit a70cf6f

File tree

9 files changed

+53
-51
lines changed

9 files changed

+53
-51
lines changed

components/CardLeft.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

components/CardRight.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

components/Header.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1+
import { FC, HTMLAttributes } from "react";
12
import Link from "next/link";
23
import { Logotype } from "@/components/Logotype";
3-
import {Socials} from "@/components/Socials";
4-
import {FC, HTMLAttributes} from "react";
5-
import {cn} from "@/utils";
4+
import { Socials } from "@/components/Socials";
5+
import { cn } from "@/utils";
66

77
type Props = HTMLAttributes<HTMLDivElement>;
88

9-
export const Header:FC<Props> = ({className, ...rest}) => {
9+
export const Header: FC<Props> = ({ className, ...rest }) => {
1010
return (
11-
<header className={cn("absolute z-30 w-full items-center px-16 xl-px-0 xl:h-[90px]", className)} {...rest}>
11+
<header
12+
className={cn(
13+
"absolute z-30 w-full items-center px-16 xl-px-0 xl:h-[90px]",
14+
className,
15+
)}
16+
{...rest}
17+
>
1218
<div className="container mx-auto">
1319
<div className="flex flex-col lg:flex-row justify-between items-center gap-y-6 py-8">
1420
<Link href="/">

components/Layout.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { FC, HTMLAttributes } from "react";
22
import { Sora } from "next/font/google";
33
import Head from "next/head";
4+
import { Header } from "@/components/Header";
5+
import { Nav } from "@/components/Nav";
46
import { WEBSITE } from "@/constants";
57
import { cn } from "@/utils";
6-
import {Header} from "@/components/Header";
7-
import {Nav} from "@/components/Nav";
88
import TopLeftImg from "../components/TopLeftImg";
99

1010
const sora = Sora({
@@ -15,7 +15,7 @@ const sora = Sora({
1515

1616
type Props = HTMLAttributes<HTMLDivElement>;
1717

18-
const Layout: FC<Props> = ({ className, children, ...rest }) => {
18+
export const Layout: FC<Props> = ({ className, children, ...rest }) => {
1919
return (
2020
<main
2121
className={cn(
@@ -30,7 +30,7 @@ const Layout: FC<Props> = ({ className, children, ...rest }) => {
3030
<meta name="description" content={WEBSITE.description} />
3131
<meta name="keywords" content={WEBSITE.keywords.join(", ")} />
3232
<meta name="author" content={WEBSITE.author} />
33-
<meta name="theme-color" content="#f13024" />
33+
<meta name="theme-color" content={WEBSITE.color} />
3434
</Head>
3535

3636
<TopLeftImg />
@@ -41,5 +41,3 @@ const Layout: FC<Props> = ({ className, children, ...rest }) => {
4141
</main>
4242
);
4343
};
44-
45-
export default Layout;

components/Nav.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { FC, HTMLAttributes } from "react";
12
import {
23
HiChatBubbleBottomCenterText,
34
HiEnvelope,
@@ -8,8 +9,7 @@ import {
89
} from "react-icons/hi2";
910
import Link from "next/link";
1011
import { usePathname } from "next/navigation";
11-
import {FC, HTMLAttributes} from "react";
12-
import {cn} from "@/utils";
12+
import { cn } from "@/utils";
1313

1414
export const links = [
1515
{ name: "home", path: "/", Icon: HiHome },
@@ -30,11 +30,17 @@ export const links = [
3030

3131
type Props = HTMLAttributes<HTMLDivElement>;
3232

33-
export const Nav: FC<Props> = ({className, ...rest}) => {
33+
export const Nav: FC<Props> = ({ className, ...rest }) => {
3434
const pathname = usePathname();
3535

3636
return (
37-
<nav className={cn("flex flex-col items-center xl:justify-center gap-y-4 fixed h-max bottom-0 mt-auto xl:right-[2%] z-50 top-0 w-full xl:w-16 xl:max-w-md xl:h-screen", className)} {...rest}>
37+
<nav
38+
className={cn(
39+
"flex flex-col items-center xl:justify-center gap-y-4 fixed h-max bottom-0 mt-auto xl:right-[2%] z-50 top-0 w-full xl:w-16 xl:max-w-md xl:h-screen",
40+
className,
41+
)}
42+
{...rest}
43+
>
3844
<div className="flex w-full xl:flex-col items-center justify-between xl:justify-center gap-y-10 px-4 md:px-40 xl:px-0 h-[80px] xl:h-max py-8 bg-white/10 backdrop-blur-sm text-3xl xl:text-2xl xl:rounded-full">
3945
{links.map((link, i) => (
4046
<Link

components/Socials.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1+
import { FC, HTMLAttributes } from "react";
12
import Link from "next/link";
23
import { SOCIALS } from "@/constants";
34
import { Social } from "@/types";
45
import { cn } from "@/utils";
5-
import {FC, HTMLAttributes} from "react";
66

77
type Props = HTMLAttributes<HTMLDivElement>;
88

9-
export const Socials: FC<Props> = ({className, ...rest}) => {
9+
export const Socials: FC<Props> = ({ className, ...rest }) => {
1010
return (
11-
<div className={cn("flex items-center gap-5 text-2xl", className)} {...rest}>
11+
<div
12+
className={cn("flex items-center gap-5 text-2xl", className)}
13+
{...rest}
14+
>
1215
{Object.values(SOCIALS)
1316
.filter((social) => social.link)
1417
.map((social) => (

components/Transition.tsx

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
import { motion } from "framer-motion";
1+
import { Variants, motion } from "framer-motion";
22

3-
const Transition = () => {
4-
const transitionVariants = {
5-
initial: {
6-
x: "100%",
7-
width: "100%",
8-
},
9-
animate: {
10-
x: "0%",
11-
width: "0%",
12-
},
13-
exit: {
14-
x: ["0%", "100%"],
15-
width: ["0%", "100%"],
16-
},
17-
};
3+
const variants: Variants = {
4+
initial: {
5+
x: "100%",
6+
width: "100%",
7+
},
8+
animate: {
9+
x: "0%",
10+
width: "0%",
11+
},
12+
exit: {
13+
x: ["0%", "100%"],
14+
width: ["0%", "100%"],
15+
},
16+
};
1817

18+
export const Transition = () => {
1919
return (
2020
<>
2121
<motion.div
2222
role="status"
2323
className="fixed top-0 bottom-0 right-full w-screen h-screen z-30 bg-[#2e2257]"
24-
variants={transitionVariants}
24+
variants={variants}
2525
initial="initial"
2626
animate="animate"
2727
exit="exit"
@@ -31,7 +31,7 @@ const Transition = () => {
3131
<motion.div
3232
role="status"
3333
className="fixed top-0 bottom-0 right-full w-screen h-screen z-20 bg-[#3b2d71]"
34-
variants={transitionVariants}
34+
variants={variants}
3535
initial="initial"
3636
animate="animate"
3737
exit="exit"
@@ -41,7 +41,7 @@ const Transition = () => {
4141
<motion.div
4242
role="status"
4343
className="fixed top-0 bottom-0 right-full w-screen h-screen z-10 bg-[#4b3792]"
44-
variants={transitionVariants}
44+
variants={variants}
4545
initial="initial"
4646
animate="animate"
4747
exit="exit"
@@ -51,5 +51,3 @@ const Transition = () => {
5151
</>
5252
);
5353
};
54-
55-
export default Transition;

constants/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const WEBSITE = {
2222
"CTO, Software Architect, Technical Lead, 3X Founder. Linking companies with top tech talents.",
2323
keywords: [""],
2424
about: "",
25+
color: "#f13024",
2526
};
2627

2728
export const SOCIALS: Record<

pages/_app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { AppProps } from "next/app";
22
import { useRouter } from "next/router";
33
import { AnimatePresence, motion } from "framer-motion";
4-
import Layout from "../components/Layout";
5-
import Transition from "../components/Transition";
4+
import { Layout } from "@/components/Layout";
5+
import { Transition } from "@/components/Transition";
66
import "../styles/globals.css";
77

88
function MyApp({ Component, pageProps }: AppProps) {

0 commit comments

Comments
 (0)