diff --git a/prisma/schema.prisma b/prisma/schema.prisma index ab6a8a1..968d44f 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -58,7 +58,9 @@ model Artist { slug String @unique displayName String - nickname String? + nickname String? + description String? + source String? socials Social[] images Image[] @@ -71,7 +73,8 @@ model Social { handle String platform String - isPrimary Boolean + isPrimary Boolean @default(false) + isVisible Boolean @default(true) link String? @@ -136,11 +139,14 @@ model Image { extractColors ImageExtractColor[] palettes ImagePalette[] variants ImageVariant[] - - albumCover Album[] @relation("AlbumCoverImage") - galleryCover Gallery[] @relation("GalleryCoverImage") - categories Category[] @relation("ImageCategories") - tags Tag[] @relation("ImageTags") + // pixels PixelSummary[] + // theme ThemeSeed[] + albumCover Album[] @relation("AlbumCoverImage") + galleryCover Gallery[] @relation("GalleryCoverImage") + categories Category[] @relation("ImageCategories") + // colors ImageColor[] @relation("ImageToImageColor") + tags Tag[] @relation("ImageTags") + // palettes ColorPalette[] @relation("ImagePalettes") } model ImageMetadata { @@ -214,6 +220,7 @@ model ColorPalette { items ColorPaletteItem[] images ImagePalette[] + // images Image[] @relation("ImagePalettes") } model ColorPaletteItem { @@ -243,6 +250,7 @@ model ExtractColor { hue Float? saturation Float? + // images Image[] @relation("ImageToExtractColor") images ImageExtractColor[] } @@ -262,6 +270,30 @@ model Color { images ImageColor[] } +// model ThemeSeed { +// id String @id @default(cuid()) +// createdAt DateTime @default(now()) +// updatedAt DateTime @updatedAt + +// imageId String +// seedHex String + +// image Image @relation(fields: [imageId], references: [id]) +// } + +// model PixelSummary { +// id String @id @default(cuid()) +// createdAt DateTime @default(now()) +// updatedAt DateTime @updatedAt + +// imageId String +// channels Int +// height Int +// width Int + +// image Image @relation(fields: [imageId], references: [id]) +// } + model ImagePalette { id String @id @default(cuid()) createdAt DateTime @default(now()) diff --git a/src/app/(normal)/artists/[artistSlug]/page.tsx b/src/app/(normal)/artists/[artistSlug]/page.tsx new file mode 100644 index 0000000..01687c6 --- /dev/null +++ b/src/app/(normal)/artists/[artistSlug]/page.tsx @@ -0,0 +1,40 @@ +import ArtistImageGrid from "@/components/artists/ArtistImageGrid"; +import ArtistInfoBox from "@/components/artists/ArtistInfoBox"; +import prisma from "@/lib/prisma"; + +export default async function ArtistPage({ params }: { params: { artistSlug: string } }) { + const { artistSlug } = await params; + + const artist = await prisma.artist.findUnique({ + where: { + slug: artistSlug + }, + include: { + images: { + include: { + variants: true, + album: { include: { gallery: true } } + } + }, + socials: { where: { isVisible: true }, orderBy: { isPrimary: "desc" } } + } + }) + + if (!artist) { + throw new Error("Artist not found") + } + + return ( +
+ {artist.description ? artist.description : ""} +
+Name: {image.imageName}
diff --git a/src/app/(normal)/[gallerySlug]/[albumSlug]/page.tsx b/src/app/(normal)/galleries/[gallerySlug]/[albumSlug]/page.tsx similarity index 100% rename from src/app/(normal)/[gallerySlug]/[albumSlug]/page.tsx rename to src/app/(normal)/galleries/[gallerySlug]/[albumSlug]/page.tsx diff --git a/src/app/(normal)/[gallerySlug]/page.tsx b/src/app/(normal)/galleries/[gallerySlug]/page.tsx similarity index 100% rename from src/app/(normal)/[gallerySlug]/page.tsx rename to src/app/(normal)/galleries/[gallerySlug]/page.tsx diff --git a/src/app/(normal)/layout.tsx b/src/app/(normal)/layout.tsx index 41dd554..46cec16 100644 --- a/src/app/(normal)/layout.tsx +++ b/src/app/(normal)/layout.tsx @@ -1,56 +1,24 @@ import Footer from "@/components/global/Footer"; import Header from "@/components/global/Header"; -import { ThemeProvider } from "@/components/global/ThemeProvider"; -import type { Metadata } from "next"; -import { Geist, Geist_Mono } from "next/font/google"; import { Toaster } from "sonner"; -import "../globals.css"; -const geistSans = Geist({ - variable: "--font-geist-sans", - subsets: ["latin"], -}); - -const geistMono = Geist_Mono({ - variable: "--font-geist-mono", - subsets: ["latin"], -}); - -export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; - -export default async function RootLayout({ +export default async function NormalLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { return ( - - -+ Please try refreshing the page or contact support if the problem persists. +
+ +Loading content...
++ Sorry, we couldn't find the page you were looking for. +
+ + Go back home + +