From bcd19d2c35bd64e046e58ba10e03ded9ce8339c4 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Fri, 29 Mar 2024 16:25:51 +0100 Subject: [PATCH] Header and Nav shit --- package.json | 2 ++ pnpm-lock.yaml | 22 +++++++++++++ src/components/layout/header.tsx | 53 +++++++++++++++++++++++--------- src/components/navlinks.tsx | 30 ++++++++++++++++++ 4 files changed, 93 insertions(+), 14 deletions(-) create mode 100644 src/components/navlinks.tsx diff --git a/package.json b/package.json index 54df72e..5701cb2 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@mdx-js/react": "^3.0.1", "@next/mdx": "^14.1.4", "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-icons": "^1.3.0", "@radix-ui/react-separator": "^1.0.3", "@radix-ui/react-slot": "^1.0.2", "@tailwindcss/typography": "^0.5.12", @@ -28,6 +29,7 @@ "next-themes": "^0.3.0", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-icons": "^5.0.1", "tailwind-merge": "^2.2.2", "tailwindcss-animate": "^1.0.7", "zustand": "^4.5.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b87d960..fb87f6e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ dependencies: '@radix-ui/react-dialog': specifier: ^1.0.5 version: 1.0.5(@types/react-dom@18.2.23)(@types/react@18.2.73)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-icons': + specifier: ^1.3.0 + version: 1.3.0(react@18.2.0) '@radix-ui/react-separator': specifier: ^1.0.3 version: 1.0.3(@types/react-dom@18.2.23)(@types/react@18.2.73)(react-dom@18.2.0)(react@18.2.0) @@ -56,6 +59,9 @@ dependencies: react-dom: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) + react-icons: + specifier: ^5.0.1 + version: 5.0.1(react@18.2.0) tailwind-merge: specifier: ^2.2.2 version: 2.2.2 @@ -526,6 +532,14 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-icons@1.3.0(react@18.2.0): + resolution: {integrity: sha512-jQxj/0LKgp+j9BiTXz3O3sgs26RNet2iLWmsPyRz2SIcR4q/4SbazXfnYwbAr+vLYKSfc7qxzyGQA1HLlYiuNw==} + peerDependencies: + react: ^16.x || ^17.x || ^18.x + dependencies: + react: 18.2.0 + dev: false + /@radix-ui/react-id@1.0.1(@types/react@18.2.73)(react@18.2.0): resolution: {integrity: sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==} peerDependencies: @@ -3598,6 +3612,14 @@ packages: scheduler: 0.23.0 dev: false + /react-icons@5.0.1(react@18.2.0): + resolution: {integrity: sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==} + peerDependencies: + react: '*' + dependencies: + react: 18.2.0 + dev: false + /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true diff --git a/src/components/layout/header.tsx b/src/components/layout/header.tsx index 381a981..4899d1c 100644 --- a/src/components/layout/header.tsx +++ b/src/components/layout/header.tsx @@ -1,26 +1,51 @@ -import Logo from "@/components/logo"; import { Separator } from "@/components/ui/separator"; import Nav from "./nav"; import Link from "next/link"; import { cn } from "@/lib/utils"; - -import fonts from "@/components/fonts"; +import NavLinks from "../navlinks"; +import { Button } from "../ui/button"; const Header = () => (
- - - - -
+
+
diff --git a/src/components/navlinks.tsx b/src/components/navlinks.tsx new file mode 100644 index 0000000..9a04b4b --- /dev/null +++ b/src/components/navlinks.tsx @@ -0,0 +1,30 @@ +import { GitHubLogoIcon as GitHub, LinkedInLogoIcon } from "@radix-ui/react-icons"; +import { FaXTwitter } from "react-icons/fa6"; + +type NavLink = { + label: string; + icon: React.ReactNode; + href: string; +}; + +const IconClassname = "w-5 h-5"; + +const NavLinks: NavLink[] = [ + { + label: "GitHub", + href: "https://github.com/almqv", + icon: , + }, + { + label: "LinkedIn", + href: "https://www.linkedin.com/in/almqv/", + icon: , + }, + { + label: "X", + href: "https://x.com/fcvprzhfgsybj", + icon: , + }, +]; + +export default NavLinks;