diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b2036e5..c20aa75 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -524,6 +524,15 @@ model TermsOfService { version Int @default(autoincrement()) } +model About { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + markdown String + version Int @default(autoincrement()) +} + model User { id String @id name String diff --git a/src/app/(normal)/about/page.tsx b/src/app/(normal)/about/page.tsx new file mode 100644 index 0000000..88a642b --- /dev/null +++ b/src/app/(normal)/about/page.tsx @@ -0,0 +1,16 @@ +import { prisma } from "@/lib/prisma"; +import ReactMarkdown from "react-markdown"; + +export default async function AboutPage() { + const about = await prisma.about.findFirst({ + orderBy: [{ version: "desc" }], + }); + + return ( +
+
+ {about?.markdown} +
+
+ ); +} diff --git a/src/components/animalStudies/AnimalStudiesGallery.tsx b/src/components/animalStudies/AnimalStudiesGallery.tsx index 9cb11ad..311c614 100644 --- a/src/components/animalStudies/AnimalStudiesGallery.tsx +++ b/src/components/animalStudies/AnimalStudiesGallery.tsx @@ -68,6 +68,11 @@ export default function AnimalStudiesGallery({ maxRowItems={5} maxRowItemsMobile={1} gap={12} + gapBreakpoints={[ + { maxWidth: 685, gap: 6 }, + { maxWidth: 910, gap: 8 }, + { maxWidth: 1130, gap: 10 }, + ]} onLoadMore={done ? undefined : () => void loadMore()} hasMore={!done} isLoadingMore={loading} diff --git a/src/components/global/TopNav.tsx b/src/components/global/TopNav.tsx index 2e243bd..f84ac95 100644 --- a/src/components/global/TopNav.tsx +++ b/src/components/global/TopNav.tsx @@ -1,6 +1,6 @@ "use client" -import { NavigationMenu, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, navigationMenuTriggerStyle } from "@/components/ui/navigation-menu"; +import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle } from "@/components/ui/navigation-menu"; import { Menu } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; @@ -8,17 +8,20 @@ import { Button } from "../ui/button"; import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from "../ui/sheet"; const links = [ - { href: "/", label: "Home" }, - { href: "/artworks", label: "Portfolio" }, - { href: "/artworks/animalstudies", label: "Animal Studies" }, - { href: "/commissions", label: "Commissions" }, - { href: "/commissions/status", label: "Commission Status" }, - { href: "/tos", label: "Terms of Service" }, - // { href: "/portfolio/artfight", label: "Artfight" }, - // { href: "/portfolio/minis", label: "Miniatures" }, - // { href: "/commissions", label: "Commissions" }, - // { href: "/ych", label: "YCH / Custom offers" }, - // { href: "/todo", label: "todo (temp)" }, + { type: "link" as const, href: "/", label: "Home" }, + { type: "link" as const, href: "/artworks", label: "Portfolio" }, + { + type: "dropdown" as const, + label: "Categories", + items: [ + { href: "/artworks/animalstudies", label: "Animal Studies" }, + { href: "/artworks/artfight", label: "Artfight" } + ], + }, + { type: "link" as const, href: "/commissions", label: "Commissions" }, + { type: "link" as const, href: "/commissions/status", label: "Commission Status" }, + { type: "link" as const, href: "/tos", label: "Terms of Service" }, + { type: "link" as const, href: "/about", label: "About Me" }, ] export default function TopNav() { @@ -28,18 +31,41 @@ export default function TopNav() {
{/* Desktop Nav */}
- + - {links.map(({ href, label }) => ( - - - {label} - - - ))} + {links.map((item) => { + if (item.type === "dropdown") { + return ( + + + {item.label} + + +
    + {item.items.map(({ href, label }) => ( +
  • + + {label} + +
  • + ))} +
+
+
+ ); + } + + return ( + + + {item.label} + + + ); + })}
@@ -56,17 +82,42 @@ export default function TopNav() { Navigation diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index b54c96c..a9749de 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -1,6 +1,6 @@ -import * as React from "react" import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" +import type * as React from "react" import { cn } from "@/lib/utils"