From 00c077038819142d24e912ecec0964c984cf8a4c Mon Sep 17 00:00:00 2001 From: Xevion Date: Wed, 16 Jul 2025 12:47:33 -0500 Subject: [PATCH] feat!: switch to Nuxt, complete overhaul --- .gitignore | 47 +- src/App.vue => app/app.vue | 2 +- {src => app}/assets/american_typewriter.woff | Bin {src => app}/assets/logo.svg | 0 src/index.css => app/assets/tailwind.css | 4 +- {src => app}/components/common/Breadcrumb.vue | 10 +- .../components/common/ImageSkeleton.vue | 0 {src => app}/components/common/Skeleton.vue | 0 .../components/features/CharacterBadges.vue | 0 .../components/features/DynamicSpeaker.vue | 0 .../components/features/QuoteList.vue | 0 .../components/features/SearchResult.vue | 0 {src => app}/components/layout/Footer.vue | 0 {src => app}/components/layout/SearchBar.vue | 0 {src => app}/components/layout/SeasonList.vue | 0 .../components/layout/SeasonListItem.vue | 0 .../components/ui/accordion/Accordion.vue | 0 .../ui/accordion/AccordionContent.vue | 0 .../components/ui/accordion/AccordionItem.vue | 0 .../ui/accordion/AccordionTrigger.vue | 0 {src => app}/components/ui/accordion/index.ts | 0 .../components/ui/breadcrumb/Breadcrumb.vue | 0 .../ui/breadcrumb/BreadcrumbEllipsis.vue | 0 .../ui/breadcrumb/BreadcrumbItem.vue | 0 .../ui/breadcrumb/BreadcrumbLink.vue | 0 .../ui/breadcrumb/BreadcrumbList.vue | 0 .../ui/breadcrumb/BreadcrumbPage.vue | 0 .../ui/breadcrumb/BreadcrumbSeparator.vue | 0 .../components/ui/breadcrumb/index.ts | 0 app/lib/utils.ts | 6 + src/views/About.vue => app/pages/about.vue | 12 +- .../pages/characters/[id].vue | 12 +- .../pages/characters/index.vue | 13 +- .../Episode.vue => app/pages/episode/[id].vue | 28 +- src/views/Home.vue => app/pages/index.vue | 77 +- .../pages/search/index.vue | 0 .../Season.vue => app/pages/season/[id].vue | 12 +- {src => app}/scss/_variables.scss | 0 {src => app}/scss/main.scss | 0 {src => app}/store.ts | 63 +- components.json | 2 +- nuxt.config.ts | 36 + package.json | 75 +- pnpm-lock.yaml | 8564 ++++++++++++++--- public/robots.txt | 2 + src/main.ts | 26 - src/router.ts | 66 - tsconfig.json | 12 +- vite.config.ts | 18 - 49 files changed, 7414 insertions(+), 1673 deletions(-) rename src/App.vue => app/app.vue (98%) rename {src => app}/assets/american_typewriter.woff (100%) rename {src => app}/assets/logo.svg (100%) rename src/index.css => app/assets/tailwind.css (100%) rename {src => app}/components/common/Breadcrumb.vue (73%) rename {src => app}/components/common/ImageSkeleton.vue (100%) rename {src => app}/components/common/Skeleton.vue (100%) rename {src => app}/components/features/CharacterBadges.vue (100%) rename {src => app}/components/features/DynamicSpeaker.vue (100%) rename {src => app}/components/features/QuoteList.vue (100%) rename {src => app}/components/features/SearchResult.vue (100%) rename {src => app}/components/layout/Footer.vue (100%) rename {src => app}/components/layout/SearchBar.vue (100%) rename {src => app}/components/layout/SeasonList.vue (100%) rename {src => app}/components/layout/SeasonListItem.vue (100%) rename {src => app}/components/ui/accordion/Accordion.vue (100%) rename {src => app}/components/ui/accordion/AccordionContent.vue (100%) rename {src => app}/components/ui/accordion/AccordionItem.vue (100%) rename {src => app}/components/ui/accordion/AccordionTrigger.vue (100%) rename {src => app}/components/ui/accordion/index.ts (100%) rename {src => app}/components/ui/breadcrumb/Breadcrumb.vue (100%) rename {src => app}/components/ui/breadcrumb/BreadcrumbEllipsis.vue (100%) rename {src => app}/components/ui/breadcrumb/BreadcrumbItem.vue (100%) rename {src => app}/components/ui/breadcrumb/BreadcrumbLink.vue (100%) rename {src => app}/components/ui/breadcrumb/BreadcrumbList.vue (100%) rename {src => app}/components/ui/breadcrumb/BreadcrumbPage.vue (100%) rename {src => app}/components/ui/breadcrumb/BreadcrumbSeparator.vue (100%) rename {src => app}/components/ui/breadcrumb/index.ts (100%) create mode 100644 app/lib/utils.ts rename src/views/About.vue => app/pages/about.vue (93%) rename src/views/Character.vue => app/pages/characters/[id].vue (94%) rename src/views/Characters.vue => app/pages/characters/index.vue (95%) rename src/views/Episode.vue => app/pages/episode/[id].vue (87%) rename src/views/Home.vue => app/pages/index.vue (59%) rename src/views/SearchResults.vue => app/pages/search/index.vue (100%) rename src/views/Season.vue => app/pages/season/[id].vue (95%) rename {src => app}/scss/_variables.scss (100%) rename {src => app}/scss/main.scss (100%) rename {src => app}/store.ts (86%) create mode 100644 nuxt.config.ts create mode 100644 public/robots.txt delete mode 100644 src/main.ts delete mode 100644 src/router.ts delete mode 100644 vite.config.ts diff --git a/.gitignore b/.gitignore index e33f68e..ebcea2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,26 @@ +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro +.cache +dist + +# Node dependencies +node_modules + # Logs logs *.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* -node_modules +# Misc .DS_Store -dist -dist-ssr -coverage -*.local +.fleet +.idea -/cypress/videos/ -/cypress/screenshots/ +# Local env files +.env +.env.* +!.env.example -# Editor directories and files -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? -*.tsbuildinfo - -# Repository specific -*.scss.css -*.scss.css.map -build -*.cache - -# .env files -.env \ No newline at end of file +build/ \ No newline at end of file diff --git a/src/App.vue b/app/app.vue similarity index 98% rename from src/App.vue rename to app/app.vue index ad3a432..91676d3 100644 --- a/src/App.vue +++ b/app/app.vue @@ -11,7 +11,7 @@ const toggleSidebar = () => { }; const headings = [ - { name: 'Home', href: '/' }, + { href: '/' }, { name: 'Episodes', href: '/episodes' }, { name: 'Characters', href: '/characters' }, { name: 'Seasons', href: '/seasons' }, diff --git a/src/assets/american_typewriter.woff b/app/assets/american_typewriter.woff similarity index 100% rename from src/assets/american_typewriter.woff rename to app/assets/american_typewriter.woff diff --git a/src/assets/logo.svg b/app/assets/logo.svg similarity index 100% rename from src/assets/logo.svg rename to app/assets/logo.svg diff --git a/src/index.css b/app/assets/tailwind.css similarity index 100% rename from src/index.css rename to app/assets/tailwind.css index e06b667..0d41405 100644 --- a/src/index.css +++ b/app/assets/tailwind.css @@ -46,8 +46,6 @@ } :root { - --background: oklch(1 0 0); - --foreground: oklch(0.145 0 0); --card: oklch(1 0 0); --card-foreground: oklch(0.145 0 0); --popover: oklch(1 0 0); @@ -79,6 +77,8 @@ --sidebar-accent-foreground: oklch(0.205 0 0); --sidebar-border: oklch(0.922 0 0); --sidebar-ring: oklch(0.708 0 0); + --background: oklch(1 0 0); + --foreground: oklch(0.145 0 0); } .dark { diff --git a/src/components/common/Breadcrumb.vue b/app/components/common/Breadcrumb.vue similarity index 73% rename from src/components/common/Breadcrumb.vue rename to app/components/common/Breadcrumb.vue index 1afce5b..1cd0116 100644 --- a/src/components/common/Breadcrumb.vue +++ b/app/components/common/Breadcrumb.vue @@ -9,14 +9,12 @@ import { import type { HTMLAttributes } from 'vue'; import { cn } from '@/lib/utils'; import { computed } from 'vue'; -import.meta.glob('/public/json/*.json'); -console.log(); const lastIndex = computed(() => props.items.length - 1); const props = defineProps< { - items: { text: string; to: { name: string; params?: Record } }[]; + items: { text: string; to?: string }[]; } & { class?: HTMLAttributes['class'] } >(); @@ -27,10 +25,10 @@ const props = defineProps<