Skip to content

Commit

Permalink
fix: Navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed Nov 20, 2023
1 parent ea4969c commit c455725
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 7 deletions.
4 changes: 1 addition & 3 deletions components/home/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -25,9 +24,8 @@ export default function Hero() {
<Particles className="absolute -z-20 h-[40vh] w-full" />
<div className="container flex max-w-[64rem] flex-col items-center gap-4 text-center">
<Link
href={siteConfig.links.github}
href="#contact"
className="group/herobtn hover:group-hover/herobtn flex items-center gap-2 rounded-2xl bg-muted px-4 py-1.5 text-sm font-medium transition-all"
target="_blank"
>
Detaylı bilgi için iletişime geçin{" "}
<div className="max-w-5 w-5 overflow-hidden">
Expand Down
3 changes: 2 additions & 1 deletion components/main-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ export function MainNav({ items }: MainNavProps) {
<Link
key={index}
href={item.href}
target={item.target}
className={cn(
"flex items-center text-sm font-medium text-muted-foreground",
"flex items-center text-sm font-medium text-muted-foreground transition-all hover:text-muted-foreground/80",
item.disabled && "cursor-not-allowed opacity-80"
)}
>
Expand Down
59 changes: 59 additions & 0 deletions components/ui/alert.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLDivElement> & VariantProps<typeof alertVariants>
>(({ className, variant, ...props }, ref) => (
<div
ref={ref}
role="alert"
className={cn(alertVariants({ variant }), className)}
{...props}
/>
))
Alert.displayName = "Alert"

const AlertTitle = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLHeadingElement>
>(({ className, ...props }, ref) => (
<h5
ref={ref}
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
{...props}
/>
))
AlertTitle.displayName = "AlertTitle"

const AlertDescription = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLParagraphElement>
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn("text-sm [&_p]:leading-relaxed", className)}
{...props}
/>
))
AlertDescription.displayName = "AlertDescription"

export { Alert, AlertTitle, AlertDescription }
28 changes: 25 additions & 3 deletions config/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
}
1 change: 1 addition & 0 deletions types/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export interface NavItem {
href?: string
disabled?: boolean
external?: boolean
target?: string
}

0 comments on commit c455725

Please sign in to comment.