From c455725141c818ec7b9e0b06e1d6d7d2b5dc7cd2 Mon Sep 17 00:00:00 2001 From: dogukanoksuz Date: Mon, 20 Nov 2023 13:00:40 +0300 Subject: [PATCH] fix: Navigation --- components/home/hero.tsx | 4 +-- components/main-nav.tsx | 3 +- components/ui/alert.tsx | 59 ++++++++++++++++++++++++++++++++++++++++ config/site.ts | 28 +++++++++++++++++-- types/nav.ts | 1 + 5 files changed, 88 insertions(+), 7 deletions(-) create mode 100644 components/ui/alert.tsx diff --git a/components/home/hero.tsx b/components/home/hero.tsx index caa19f0..68a62d3 100644 --- a/components/home/hero.tsx +++ b/components/home/hero.tsx @@ -5,7 +5,6 @@ import Link from "next/link" import { motion } from "framer-motion" import { ArrowRight } from "lucide-react" -import { siteConfig } from "@/config/site" import { fontHeading } from "@/lib/fonts" import { cn } from "@/lib/utils" @@ -25,9 +24,8 @@ export default function Hero() {
Detaylı bilgi için iletişime geçin{" "}
diff --git a/components/main-nav.tsx b/components/main-nav.tsx index 998216e..1dc6018 100644 --- a/components/main-nav.tsx +++ b/components/main-nav.tsx @@ -26,8 +26,9 @@ export function MainNav({ items }: MainNavProps) { diff --git a/components/ui/alert.tsx b/components/ui/alert.tsx new file mode 100644 index 0000000..41fa7e0 --- /dev/null +++ b/components/ui/alert.tsx @@ -0,0 +1,59 @@ +import * as React from "react" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const alertVariants = cva( + "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", + { + variants: { + variant: { + default: "bg-background text-foreground", + destructive: + "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +const Alert = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes & VariantProps +>(({ className, variant, ...props }, ref) => ( +
+)) +Alert.displayName = "Alert" + +const AlertTitle = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +AlertTitle.displayName = "AlertTitle" + +const AlertDescription = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +AlertDescription.displayName = "AlertDescription" + +export { Alert, AlertTitle, AlertDescription } diff --git a/config/site.ts b/config/site.ts index 7463c1c..6dd4c91 100644 --- a/config/site.ts +++ b/config/site.ts @@ -5,11 +5,33 @@ export const siteConfig = { description: "HAVELSAN Liman Merkezi Yönetim Sistemi", mainNav: [ { - title: "Ana Sayfa", - href: "/", + title: "Dokümantasyon", + href: "https://docs.liman.dev", + target: "_blank", + }, + { + title: "Kurulum", + href: "https://docs.liman.dev/baslangic/kurulum/ubuntu-20.04", + target: "_blank", + }, + { + title: "Açıklab", + href: "https://aciklab.org", + target: "_blank", + }, + { + title: "GitHub", + href: "https://github.com/limanmys", + target: "_blank", + }, + { + title: "İletişim", + href: "#contact", }, ], links: { - github: "https://github.com/havelsan", + github: "https://github.com/limanmys", + documentation: "https://docs.liman.dev", + install: "https://docs.liman.dev/baslangic/kurulum/ubuntu-20.04", }, } diff --git a/types/nav.ts b/types/nav.ts index 0961ce8..71f15e8 100644 --- a/types/nav.ts +++ b/types/nav.ts @@ -3,4 +3,5 @@ export interface NavItem { href?: string disabled?: boolean external?: boolean + target?: string }