From 33d553fb99b2797bed15696e531fa4451cb984d3 Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Tue, 4 Nov 2025 19:06:51 +0000 Subject: [PATCH] restyle interim commit --- package-lock.json | 10 -- package.json | 1 - scripts/generate-post-index.js | 6 +- src/components/Header.tsx | 135 ------------------- src/components/ui/badge.tsx | 46 ------- src/components/ui/button.tsx | 59 -------- src/components/ui/card.tsx | 92 ------------- src/components/ui/navigation-menu.tsx | 173 ------------------------ src/components/ui/pagination.tsx | 127 ------------------ src/components/ui/toggle.tsx | 45 ------- src/containers/PostListing.tsx | 89 +++++++------ src/context/ThemeProvider.tsx | 74 ----------- src/images/control-panel.png | Bin 3461534 -> 0 bytes src/images/gruvbox-computer.png | Bin 0 -> 17503 bytes src/images/gruvbox-computer.svg | 78 +++++++++++ src/images/radigue_gruvbox.png | Bin 142066 -> 0 bytes src/index.css | 95 ++++++++++++- src/lib/utils.ts | 6 - src/main.tsx | 54 ++++---- src/pages/about.tsx | 178 ++++++++++++------------- src/pages/home.tsx | 49 +++---- src/pages/posts.tsx | 131 ++---------------- src/styles/_variables.css | 185 +++++++++++--------------- src/styles/shadcn-overrides.css | 51 ------- src/styles/shadcn-theme.css | 40 ------ src/templates/BlogTemplate.tsx | 95 ++++++------- src/templates/MainTemplate.tsx | 102 ++++++++++---- src/templates/TagTemplate.tsx | 19 +-- src/utils/convertDate.ts | 19 ++- test.txt | 0 30 files changed, 594 insertions(+), 1365 deletions(-) delete mode 100644 src/components/Header.tsx delete mode 100644 src/components/ui/badge.tsx delete mode 100644 src/components/ui/button.tsx delete mode 100644 src/components/ui/card.tsx delete mode 100644 src/components/ui/navigation-menu.tsx delete mode 100644 src/components/ui/pagination.tsx delete mode 100644 src/components/ui/toggle.tsx delete mode 100644 src/context/ThemeProvider.tsx delete mode 100644 src/images/control-panel.png create mode 100644 src/images/gruvbox-computer.png create mode 100644 src/images/gruvbox-computer.svg delete mode 100644 src/images/radigue_gruvbox.png delete mode 100644 src/lib/utils.ts delete mode 100644 src/styles/shadcn-overrides.css delete mode 100644 src/styles/shadcn-theme.css delete mode 100644 test.txt diff --git a/package-lock.json b/package-lock.json index 89aac81..aeaa230 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,6 @@ "clsx": "^2.1.1", "gray-matter": "^4.0.3", "i": "^0.3.7", - "lucide-react": "^0.509.0", "marked": "^15.0.12", "react": "^19.1.0", "react-dom": "^19.1.0", @@ -5150,15 +5149,6 @@ "yallist": "^3.0.2" } }, - "node_modules/lucide-react": { - "version": "0.509.0", - "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.509.0.tgz", - "integrity": "sha512-xCJHn6Uh5qF6PGml25vveCTrHJZcqS1G1MVzWZK54ZQsOiCVJk4fwY3oyo5EXS2S+aqvTpWYIfJN+PesJ0quxg==", - "license": "ISC", - "peerDependencies": { - "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, "node_modules/magic-string": { "version": "0.30.17", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", diff --git a/package.json b/package.json index 7dc7dd8..8a1692f 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "clsx": "^2.1.1", "gray-matter": "^4.0.3", "i": "^0.3.7", - "lucide-react": "^0.509.0", "marked": "^15.0.12", "react": "^19.1.0", "react-dom": "^19.1.0", diff --git a/scripts/generate-post-index.js b/scripts/generate-post-index.js index b5b4efe..f12f13a 100644 --- a/scripts/generate-post-index.js +++ b/scripts/generate-post-index.js @@ -13,7 +13,8 @@ const renderer = { } const highlighter = await createHighlighter({ - themes: ["dark-plus"], + themes: ["gruvbox-dark-hard"], + langs: [ "javascript", "typescript", @@ -48,7 +49,8 @@ const posts = files.map((file) => { (match, lang, code) => { return highlighter.codeToHtml(code.trim(), { lang: lang || "text", - theme: "dark-plus", + theme: "gruvbox-dark-hard", + transformers: [transformerColorizedBrackets()], }) } diff --git a/src/components/Header.tsx b/src/components/Header.tsx deleted file mode 100644 index ed20477..0000000 --- a/src/components/Header.tsx +++ /dev/null @@ -1,135 +0,0 @@ -// @ts-nocheck -import { Button } from "@/components/ui/button" -import { useTheme } from "@/context/ThemeProvider" -import { MoonStar, MenuIcon } from "lucide-react" -import { Link } from "react-router" -import headerImage from "../images/radigue_gruvbox.png" -import controlPanel from "../images/control-panel.png" -import { - NavigationMenu, - NavigationMenuContent, - NavigationMenuItem, - NavigationMenuLink, - NavigationMenuList, - NavigationMenuTrigger, - navigationMenuTriggerStyle, - NavigationMenuViewport, -} from "@/components/ui/navigation-menu" - -import { Toggle } from "@/components/ui/toggle" -const Menu = () => { - return ( - - - {/* Desktop menu - hidden on mobile, visible on md+ */} -
- - - Posts - - - - - About - - -
- - {/* Mobile dropdown - visible only on small screens */} - - - - - - - - - Posts - - - - - About - - - - -
- -
- ) -} - -const Header = () => { - const { theme, setTheme } = useTheme() - return ( -
-
- -
- -
-
- -
-
- {/* - - setTheme(theme === "dark" ? "light" : "dark") - } - > - - - - */} - - - - {/* -
- - -
- - */} -
-
-
- ) -} - -export { Header } diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx deleted file mode 100644 index 0205413..0000000 --- a/src/components/ui/badge.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" - -import { cn } from "@/lib/utils" - -const badgeVariants = cva( - "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", - { - variants: { - variant: { - default: - "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", - secondary: - "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", - destructive: - "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", - outline: - "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", - }, - }, - defaultVariants: { - variant: "default", - }, - } -) - -function Badge({ - className, - variant, - asChild = false, - ...props -}: React.ComponentProps<"span"> & - VariantProps & { asChild?: boolean }) { - const Comp = asChild ? Slot : "span" - - return ( - - ) -} - -export { Badge, badgeVariants } diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx deleted file mode 100644 index a2df8dc..0000000 --- a/src/components/ui/button.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" - -import { cn } from "@/lib/utils" - -const buttonVariants = cva( - "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", - { - variants: { - variant: { - default: - "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90", - destructive: - "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", - outline: - "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50", - secondary: - "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", - ghost: - "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", - link: "text-primary underline-offset-4 hover:underline", - }, - size: { - default: "h-9 px-4 py-2 has-[>svg]:px-3", - sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5", - lg: "h-10 rounded-md px-6 has-[>svg]:px-4", - icon: "size-9", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, - } -) - -function Button({ - className, - variant, - size, - asChild = false, - ...props -}: React.ComponentProps<"button"> & - VariantProps & { - asChild?: boolean - }) { - const Comp = asChild ? Slot : "button" - - return ( - - ) -} - -export { Button, buttonVariants } diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx deleted file mode 100644 index d05bbc6..0000000 --- a/src/components/ui/card.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import * as React from "react" - -import { cn } from "@/lib/utils" - -function Card({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardHeader({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardTitle({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardDescription({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardAction({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardContent({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function CardFooter({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -export { - Card, - CardHeader, - CardFooter, - CardTitle, - CardAction, - CardDescription, - CardContent, -} diff --git a/src/components/ui/navigation-menu.tsx b/src/components/ui/navigation-menu.tsx deleted file mode 100644 index 7825877..0000000 --- a/src/components/ui/navigation-menu.tsx +++ /dev/null @@ -1,173 +0,0 @@ -import * as React from "react" -import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu" -import { cva } from "class-variance-authority" -import { ChevronDownIcon } from "lucide-react" - -import { cn } from "@/lib/utils" - -function NavigationMenu({ - className, - children, - viewport = true, - ...props -}: React.ComponentProps & { - viewport?: boolean -}) { - return ( - - {children} - {viewport && } - - ) -} - -function NavigationMenuList({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function NavigationMenuItem({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -const navigationMenuTriggerStyle = cva( - "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1" -) - -function NavigationMenuTrigger({ - className, - children, - ...props -}: React.ComponentProps) { - return ( - - {children}{" "} - {/* - - - ) -} - -function NavigationMenuContent({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function NavigationMenuViewport({ - className, - ...props -}: React.ComponentProps) { - return ( -
- -
- ) -} - -function NavigationMenuLink({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function NavigationMenuIndicator({ - className, - ...props -}: React.ComponentProps) { - return ( - -
- - ) -} - -export { - NavigationMenu, - NavigationMenuList, - NavigationMenuItem, - NavigationMenuContent, - NavigationMenuTrigger, - NavigationMenuLink, - NavigationMenuIndicator, - NavigationMenuViewport, - navigationMenuTriggerStyle, -} diff --git a/src/components/ui/pagination.tsx b/src/components/ui/pagination.tsx deleted file mode 100644 index 0d18541..0000000 --- a/src/components/ui/pagination.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import * as React from "react" -import { - ChevronLeftIcon, - ChevronRightIcon, - MoreHorizontalIcon, -} from "lucide-react" - -import { cn } from "@/lib/utils" -import { Button, buttonVariants } from "@/components/ui/button" - -function Pagination({ className, ...props }: React.ComponentProps<"nav">) { - return ( -