From e8a003f14e1397d1dac63d50ef3547da9f5a3212 Mon Sep 17 00:00:00 2001 From: Thatsaphorn Atchariyaphap Date: Thu, 26 Jun 2025 10:00:01 +0900 Subject: [PATCH] Add new pages and ocmponents using shadcn ui components --- lawfirm-demos/demo-2/app/globals.css | 124 +++- lawfirm-demos/demo-2/app/layout.tsx | 41 +- lawfirm-demos/demo-2/app/page.tsx | 108 +-- lawfirm-demos/demo-2/components.json | 21 + lawfirm-demos/demo-2/components/About.tsx | 11 + lawfirm-demos/demo-2/components/Hero.tsx | 10 + .../demo-2/components/KontaktForm.tsx | 21 + .../demo-2/components/Leistungen.tsx | 21 + lawfirm-demos/demo-2/components/Navbar.tsx | 81 ++ lawfirm-demos/demo-2/components/ui/button.tsx | 59 ++ lawfirm-demos/demo-2/components/ui/input.tsx | 21 + .../demo-2/components/ui/navigation-menu.tsx | 168 +++++ lawfirm-demos/demo-2/components/ui/sheet.tsx | 139 ++++ .../demo-2/components/ui/textarea.tsx | 18 + lawfirm-demos/demo-2/lib/utils.ts | 6 + lawfirm-demos/demo-2/package-lock.json | 694 +++++++++++++++++- lawfirm-demos/demo-2/package.json | 19 +- 17 files changed, 1422 insertions(+), 140 deletions(-) create mode 100644 lawfirm-demos/demo-2/components.json create mode 100644 lawfirm-demos/demo-2/components/About.tsx create mode 100644 lawfirm-demos/demo-2/components/Hero.tsx create mode 100644 lawfirm-demos/demo-2/components/KontaktForm.tsx create mode 100644 lawfirm-demos/demo-2/components/Leistungen.tsx create mode 100644 lawfirm-demos/demo-2/components/Navbar.tsx create mode 100644 lawfirm-demos/demo-2/components/ui/button.tsx create mode 100644 lawfirm-demos/demo-2/components/ui/input.tsx create mode 100644 lawfirm-demos/demo-2/components/ui/navigation-menu.tsx create mode 100644 lawfirm-demos/demo-2/components/ui/sheet.tsx create mode 100644 lawfirm-demos/demo-2/components/ui/textarea.tsx create mode 100644 lawfirm-demos/demo-2/lib/utils.ts diff --git a/lawfirm-demos/demo-2/app/globals.css b/lawfirm-demos/demo-2/app/globals.css index a2dc41e..dc98be7 100644 --- a/lawfirm-demos/demo-2/app/globals.css +++ b/lawfirm-demos/demo-2/app/globals.css @@ -1,26 +1,122 @@ @import "tailwindcss"; +@import "tw-animate-css"; -:root { - --background: #ffffff; - --foreground: #171717; -} +@custom-variant dark (&:is(.dark *)); @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --font-sans: var(--font-geist-sans); --font-mono: var(--font-geist-mono); + --color-sidebar-ring: var(--sidebar-ring); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar: var(--sidebar); + --color-chart-5: var(--chart-5); + --color-chart-4: var(--chart-4); + --color-chart-3: var(--chart-3); + --color-chart-2: var(--chart-2); + --color-chart-1: var(--chart-1); + --color-ring: var(--ring); + --color-input: var(--input); + --color-border: var(--border); + --color-destructive: var(--destructive); + --color-accent-foreground: var(--accent-foreground); + --color-accent: var(--accent); + --color-muted-foreground: var(--muted-foreground); + --color-muted: var(--muted); + --color-secondary-foreground: var(--secondary-foreground); + --color-secondary: var(--secondary); + --color-primary-foreground: var(--primary-foreground); + --color-primary: var(--primary); + --color-popover-foreground: var(--popover-foreground); + --color-popover: var(--popover); + --color-card-foreground: var(--card-foreground); + --color-card: var(--card); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); } -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; +:root { + --radius: 0.625rem; + --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); + --popover-foreground: oklch(0.145 0 0); + --primary: oklch(0.205 0 0); + --primary-foreground: oklch(0.985 0 0); + --secondary: oklch(0.97 0 0); + --secondary-foreground: oklch(0.205 0 0); + --muted: oklch(0.97 0 0); + --muted-foreground: oklch(0.556 0 0); + --accent: oklch(0.97 0 0); + --accent-foreground: oklch(0.205 0 0); + --destructive: oklch(0.577 0.245 27.325); + --border: oklch(0.922 0 0); + --input: oklch(0.922 0 0); + --ring: oklch(0.708 0 0); + --chart-1: oklch(0.646 0.222 41.116); + --chart-2: oklch(0.6 0.118 184.704); + --chart-3: oklch(0.398 0.07 227.392); + --chart-4: oklch(0.828 0.189 84.429); + --chart-5: oklch(0.769 0.188 70.08); + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} + +.dark { + --background: oklch(0.145 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.205 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.205 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.922 0 0); + --primary-foreground: oklch(0.205 0 0); + --secondary: oklch(0.269 0 0); + --secondary-foreground: oklch(0.985 0 0); + --muted: oklch(0.269 0 0); + --muted-foreground: oklch(0.708 0 0); + --accent: oklch(0.269 0 0); + --accent-foreground: oklch(0.985 0 0); + --destructive: oklch(0.704 0.191 22.216); + --border: oklch(1 0 0 / 10%); + --input: oklch(1 0 0 / 15%); + --ring: oklch(0.556 0 0); + --chart-1: oklch(0.488 0.243 264.376); + --chart-2: oklch(0.696 0.17 162.48); + --chart-3: oklch(0.769 0.188 70.08); + --chart-4: oklch(0.627 0.265 303.9); + --chart-5: oklch(0.645 0.246 16.439); + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-ring: oklch(0.556 0 0); +} + +@layer base { + * { + @apply border-border outline-ring/50; + } + body { + @apply bg-background text-foreground; } } - -body { - background: var(--background); - color: var(--foreground); - font-family: Arial, Helvetica, sans-serif; -} diff --git a/lawfirm-demos/demo-2/app/layout.tsx b/lawfirm-demos/demo-2/app/layout.tsx index f7fa87e..232d660 100644 --- a/lawfirm-demos/demo-2/app/layout.tsx +++ b/lawfirm-demos/demo-2/app/layout.tsx @@ -1,34 +1,37 @@ -import type { Metadata } from "next"; -import { Geist, Geist_Mono } from "next/font/google"; +import type {Metadata} from "next"; +import {Geist, Geist_Mono} from "next/font/google"; import "./globals.css"; +import Navbar from "@/components/Navbar"; +import React from "react"; const geistSans = Geist({ - variable: "--font-geist-sans", - subsets: ["latin"], + variable: "--font-geist-sans", + subsets: ["latin"], }); const geistMono = Geist_Mono({ - variable: "--font-geist-mono", - subsets: ["latin"], + variable: "--font-geist-mono", + subsets: ["latin"], }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "Create Next App", + description: "Generated by create next app", }; export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; + children, + }: Readonly<{ + children: React.ReactNode; }>) { - return ( - - + return ( + + + {children} - - - ); + + + ); } diff --git a/lawfirm-demos/demo-2/app/page.tsx b/lawfirm-demos/demo-2/app/page.tsx index 88f0cc9..cd861ca 100644 --- a/lawfirm-demos/demo-2/app/page.tsx +++ b/lawfirm-demos/demo-2/app/page.tsx @@ -1,103 +1,15 @@ -import Image from "next/image"; +import Hero from "@/components/Hero"; +import Leistungen from "@/components/Leistungen"; +import About from "@/components/About"; +import KontaktForm from "@/components/KontaktForm"; -export default function Home() { +export default function HomePage() { return ( -
-
- Next.js logo -
    -
  1. - Get started by editing{" "} - - app/page.tsx - - . -
  2. -
  3. - Save and see your changes instantly. -
  4. -
- -
- - Vercel logomark - Deploy now - - - Read our docs - -
+
+ + + +
- -
); } diff --git a/lawfirm-demos/demo-2/components.json b/lawfirm-demos/demo-2/components.json new file mode 100644 index 0000000..335484f --- /dev/null +++ b/lawfirm-demos/demo-2/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "", + "css": "app/globals.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} \ No newline at end of file diff --git a/lawfirm-demos/demo-2/components/About.tsx b/lawfirm-demos/demo-2/components/About.tsx new file mode 100644 index 0000000..f0e3cc4 --- /dev/null +++ b/lawfirm-demos/demo-2/components/About.tsx @@ -0,0 +1,11 @@ +export default function About() { + return ( +
+

Über mich

+

+ Ich bin Max Mustermann, selbstständiger Rechtsanwalt mit Spezialisierung auf Zivilrecht und Vertragsrecht. + Seit über 10 Jahren berate und vertrete ich Mandanten engagiert, individuell und mit juristischer Präzision. +

+
+ ); +} diff --git a/lawfirm-demos/demo-2/components/Hero.tsx b/lawfirm-demos/demo-2/components/Hero.tsx new file mode 100644 index 0000000..8e04b2c --- /dev/null +++ b/lawfirm-demos/demo-2/components/Hero.tsx @@ -0,0 +1,10 @@ +export default function Hero() { + return ( +
+

Rechtsanwalt Max Mustermann

+

+ Ihr Partner für Zivilrecht, Vertragsrecht und mehr +

+
+ ); +} diff --git a/lawfirm-demos/demo-2/components/KontaktForm.tsx b/lawfirm-demos/demo-2/components/KontaktForm.tsx new file mode 100644 index 0000000..ff9349d --- /dev/null +++ b/lawfirm-demos/demo-2/components/KontaktForm.tsx @@ -0,0 +1,21 @@ +"use client"; + +import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; +import { Button } from "@/components/ui/button"; + +export default function KontaktForm() { + return ( +
+

Kontakt

+
+ + +