From 0c2600a7f6254591c72f55ccaf5789277c41a4d1 Mon Sep 17 00:00:00 2001 From: Blboun3 <62328614+Blboun3@users.noreply.github.com> Date: Sun, 26 May 2024 13:29:06 +0200 Subject: [PATCH] sync --- src/components/ShowcaseTabs.jsx | 52 ++++++++-------------------- src/components/ui/card.jsx | 2 +- src/components/ui/dropdown-menu.jsx | 6 ++-- src/content/showcase.js | 29 ++++++++++++++++ src/layouts/MainLayout.astro | 2 +- src/layouts/MarkDownPostLayout.astro | 7 ++++ src/layouts/SinglePage.astro | 2 +- src/pages/index.astro | 15 ++++++-- src/style/index.css | 8 ++--- 9 files changed, 73 insertions(+), 50 deletions(-) create mode 100644 src/content/showcase.js create mode 100644 src/layouts/MarkDownPostLayout.astro diff --git a/src/components/ShowcaseTabs.jsx b/src/components/ShowcaseTabs.jsx index cae558b..b0d63d9 100644 --- a/src/components/ShowcaseTabs.jsx +++ b/src/components/ShowcaseTabs.jsx @@ -1,4 +1,3 @@ -import { Button } from "../components/ui/button"; import { Card, CardContent, @@ -13,38 +12,7 @@ import { TabsTrigger, } from "../components/ui/tabs"; -const data = [ - { - value: "thisPage", - handle: "Projekt 1", - title: "This Page", - description: "random text", - images: [ - { src: "temp.jpg", alt: "text" }, - { src: "temp.jpg", alt: "text2" }, - ], - }, - { - value: "thatPage", - title: "That Page", - handle: "Projekt 2", - description: "random text", - images: [ - { src: "temp.jpg", alt: "text" }, - { src: "temp.jpg", alt: "text2" }, - ], - }, - { - value: "otherPge", - title: "Other Page", - handle: "Projekt 3", - description: "random text", - images: [ - { src: "temp.jpg", alt: "text" }, - { src: "temp.jpg", alt: "text2" }, - ], - }, -]; +import { data } from "../content/showcase"; export function ShowcaseTabs() { return ( @@ -54,18 +22,26 @@ export function ShowcaseTabs() { > {data.map((item) => ( - {item.handle} + {item.handle} ))} {data.map((item) => ( - + {item.title} - {item.description} + + {item.description} + - - + +
+ {item.imageAlt} +
diff --git a/src/components/ui/card.jsx b/src/components/ui/card.jsx index 525788c..1768978 100644 --- a/src/components/ui/card.jsx +++ b/src/components/ui/card.jsx @@ -5,7 +5,7 @@ import { cn } from "../../lib/utils" const Card = React.forwardRef(({ className, ...props }, ref) => (
)) Card.displayName = "Card" diff --git a/src/components/ui/dropdown-menu.jsx b/src/components/ui/dropdown-menu.jsx index 0ebca5c..5d917cf 100644 --- a/src/components/ui/dropdown-menu.jsx +++ b/src/components/ui/dropdown-menu.jsx @@ -36,7 +36,7 @@ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) = @@ -50,7 +50,7 @@ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...pr ref={ref} sideOffset={sideOffset} className={cn( - "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", + "z-50 min-w-[8rem] overflow-hidden rounded-md border-bkg bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className )} {...props} /> @@ -94,7 +94,7 @@ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props diff --git a/src/content/showcase.js b/src/content/showcase.js new file mode 100644 index 0000000..bb322e6 --- /dev/null +++ b/src/content/showcase.js @@ -0,0 +1,29 @@ +export const data = [ + { + value: "thisPage", + handle: "Projekt 1", + title: "This Page", + href: "/potato", + description: "random text os iuoiu fsd ufiodsu foid sufo dsufois dufoisd eee sfsdffsdfsd sd sd ds dsfsv sd dss ds ds ufiosdufi osdufsdfsd iofusdoifudu siofsdfids ofudsiouoi", + image: "/temp.jpg", + imageAlt: "text" + }, + { + value: "thatPage", + title: "That Page", + handle: "Projekt 2", + href: "/potat2", + description: "random text", + image: "/temp.jpg", + imageAlt: "text" + }, + { + value: "otherPage", + title: "Other Page", + handle: "Projekt 3", + href: "/kartoffeln", + description: "random text", + image: "/temp.jpg", + imageAlt: "text" + }, + ]; diff --git a/src/layouts/MainLayout.astro b/src/layouts/MainLayout.astro index 6b7f1f8..770334f 100644 --- a/src/layouts/MainLayout.astro +++ b/src/layouts/MainLayout.astro @@ -21,7 +21,7 @@ import "../style/index.css"; document.addEventListener('astro:after-swap', () => {document.documentElement.setAttribute("data-theme", localStorage.getItem("data-theme") || document.documentElement.getAttribute("data-theme"));}); -
+
diff --git a/src/layouts/MarkDownPostLayout.astro b/src/layouts/MarkDownPostLayout.astro new file mode 100644 index 0000000..e950f9c --- /dev/null +++ b/src/layouts/MarkDownPostLayout.astro @@ -0,0 +1,7 @@ +--- +const { frontmatter } = Astro.props; +--- + +

{frontmatter.title}

+

{frontmatter.autor}

+ \ No newline at end of file diff --git a/src/layouts/SinglePage.astro b/src/layouts/SinglePage.astro index 00dae1c..119360f 100644 --- a/src/layouts/SinglePage.astro +++ b/src/layouts/SinglePage.astro @@ -1,4 +1,4 @@ -
+
{ + return [ + {params: {lang: "en"}}, + {params: {lang: "cs"}}, + {params: {lang: "de"}}, + {params: {lang: "fr"}} + ]; +}) satisfies GetStaticPaths; + +const { lang } = Astro.params + // Don't remove - redirects user to language version for the preffered language if (Astro.preferredLocale) { return Astro.redirect(`/${Astro.preferredLocale}/`); @@ -9,7 +20,7 @@ if (Astro.preferredLocale) { --- - +

Welcome

You shouldn't be here. please continue to one of the following: diff --git a/src/style/index.css b/src/style/index.css index 0780ee5..786b2ad 100644 --- a/src/style/index.css +++ b/src/style/index.css @@ -42,16 +42,16 @@ Dark Mode: https://www.realtimecolors.com/dashboard?colors=e7e7e9-0f0f0f-5819c5 --color-secondary: 273deg, 100%, 20%; --color-accent: 54deg, 100%, 50%; --color-accent-red: 0deg, 84%, 60%; - + --background: 224 71% 4%; --foreground: 213 31% 91%; --input: 216 34% 17%; - --muted: 223 47% 11%; + --muted: 0 0% 15%; --muted-foreground: 215.4 16.3% 56.9%; --popover: 224 71% 4%; --popover-foreground: 215 20.2% 65.1%; - --border: 216 34% 17%; - --card: 224 71% 4%; + --border: 9 20% 21%; + --card: 0 0% 15%; --card-foreground: 213 31% 91%; --destructive: 0 63% 31%; --destructive-foreground: 210 40% 98%;