From 1ac4fae94342b196673a53f677c6aebd84c7c168 Mon Sep 17 00:00:00 2001 From: hwinkel Date: Wed, 11 Mar 2026 22:09:49 +0100 Subject: [PATCH] ADD: added first working version --- app/app.css | 17 +- app/components/layout/sidebar.tsx | 87 ++++-- app/components/layout/topbar.tsx | 110 +++++++ app/root.tsx | 3 + app/routes/companies.$id.customers.tsx | 12 +- app/routes/companies.$id.edit.tsx | 8 + .../companies.$id.invoices.$invoiceId.tsx | 9 + app/routes/companies.$id.invoices.new.tsx | 9 + app/routes/companies.$id.invoices.tsx | 8 + app/routes/companies.$id.reports.tsx | 24 +- app/routes/companies.$id.tsx | 7 + app/routes/companies.new.tsx | 7 + app/routes/companies.tsx | 281 +++++++++++++++--- app/routes/dashboard-layout.tsx | 8 +- app/routes/home.tsx | 218 ++++++++------ app/routes/login.tsx | 84 ++++-- postcss.config.ts | 5 + 17 files changed, 701 insertions(+), 196 deletions(-) create mode 100644 app/components/layout/topbar.tsx create mode 100644 postcss.config.ts diff --git a/app/app.css b/app/app.css index c9844a2..40610c4 100644 --- a/app/app.css +++ b/app/app.css @@ -1,17 +1,28 @@ @import "tailwindcss"; :root { - --background: #f9fafb; - --foreground: #111827; + --background: #f8fafc; + --foreground: #0f172a; + --sidebar-width: 16rem; } body { background: var(--background); color: var(--foreground); - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } * { box-sizing: border-box; } + +@keyframes fade-in { + from { opacity: 0; transform: translateY(8px); } + to { opacity: 1; transform: translateY(0); } +} + +.animate-fade-in { + animation: fade-in 0.3s ease-out forwards; +} diff --git a/app/components/layout/sidebar.tsx b/app/components/layout/sidebar.tsx index 2bf94ed..1c3e4be 100644 --- a/app/components/layout/sidebar.tsx +++ b/app/components/layout/sidebar.tsx @@ -1,13 +1,6 @@ import { Link, Form, useLocation } from "react-router"; -import { - Calculator, - Building2, - LayoutDashboard, - LogOut, - ChevronRight, -} from "lucide-react"; +import { Calculator, Building2, LayoutDashboard, LogOut, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; -import { Button } from "@/components/ui/button"; interface NavItem { label: string; @@ -20,57 +13,91 @@ const navItems: NavItem[] = [ { label: "Mandanten", href: "/companies", icon: }, ]; +function getInitials(name?: string | null): string { + if (!name) return "?"; + return name.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2); +} + export function Sidebar({ userName }: { userName?: string | null }) { const location = useLocation(); const pathname = location.pathname; return ( -