From 0b61402be573cb8526f2a6b7e3f84f3c018c5061 Mon Sep 17 00:00:00 2001 From: bivashy Date: Mon, 26 Jan 2026 20:24:46 +0500 Subject: [PATCH] Final touches in anime page --- .../ui/hoverable-image/HoverableImage.vue | 6 +- app/components/ui/hoverable-image/index.ts | 1 + app/pages/anime/[id].vue | 69 +++++++++++++------ 3 files changed, 53 insertions(+), 23 deletions(-) diff --git a/app/components/ui/hoverable-image/HoverableImage.vue b/app/components/ui/hoverable-image/HoverableImage.vue index 7100fa5..0ae33a6 100644 --- a/app/components/ui/hoverable-image/HoverableImage.vue +++ b/app/components/ui/hoverable-image/HoverableImage.vue @@ -3,7 +3,7 @@ import { Tooltip, TooltipTrigger } from '@/components/ui/tooltip'; import { cn } from "@/lib/utils"; import type { ConfiguredImageProviders, ProviderDefaults } from '@nuxt/image'; import type { HTMLAttributes } from 'vue'; -import { imageVariants } from '.'; +import { imageVariants, type HoverableImageVariants } from '.'; interface Props { src: string; @@ -20,8 +20,8 @@ interface Props { overlayOpacity?: number; overlayClass?: string; imageClass?: string; - variant?: 'default' | 'rounded' | 'elevated' | 'minimal'; - size?: 'sm' | 'md' | 'lg' | 'xl' | 'full'; + variant?: HoverableImageVariants['variant']; + size?: HoverableImageVariants['size']; } const props = withDefaults(defineProps(), { diff --git a/app/components/ui/hoverable-image/index.ts b/app/components/ui/hoverable-image/index.ts index ac0931c..c4fedfa 100644 --- a/app/components/ui/hoverable-image/index.ts +++ b/app/components/ui/hoverable-image/index.ts @@ -14,6 +14,7 @@ export const imageVariants = cva( minimal: "border-0", }, size: { + xsm: "max-w-40", sm: "max-w-xs", md: "max-w-md", lg: "max-w-lg", diff --git a/app/pages/anime/[id].vue b/app/pages/anime/[id].vue index 0c6e792..0970c3c 100644 --- a/app/pages/anime/[id].vue +++ b/app/pages/anime/[id].vue @@ -25,47 +25,53 @@ He is seen seeking out a PK (Player Killer) known as Tri-Edge, whose victims sup status: "Finished", release: "Mar 25, 2008", season: "Spring 2008", + translations: ["Anilibria", "Soviet Romantica", "AniDUB", "AniStar"], + genres: ["Action", "Fantasy", "Sci-Fi"], average: 67, mean: 67, popularity: 5481, favorites: 36, producers: ["Bandai Visual", "CyberConnect2", "Hanabee Entartainment", "Funimation"], source: "Video Game", - genres: ["Action", "Fantasy", "Sci-Fi"], romaji: ".hack//G.U. Trilogy", native: ".hack//G.U. Trilogy", relations: [ { url: "/example/relation1.png", type: "Prequel", + name: ".hack//Roots" }, { url: "/example/relation2.jpg", type: "Sequel", + name: ".hack//G.U. Returner" }, { url: "/example/relation3.jpg", type: "Alternative", + name: ".hack//G.U." }, { url: "/example/relation4.jpg", type: "Alternative", + name: ".hack//G.U.+" }, { url: "/example/relation5.jpg", type: "Side Story", + name: ".hack//G.U. Returner Trilogy" }, { url: "/example/relation6.jpg", type: "Summary", + name: "Daitai 3-pun de Wakaru .hack History " }, ] }