diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index 373b46e..924795e 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/package.json b/package.json index 1c67eeb..3255c2e 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@types/react-dom": "^18.3.0", "@webcomponents/template-shadowroot": "^0.2.1", "astro": "4.7.0", + "clsx": "^2.1.1", "fs-extra": "^11.1.1", "jsdom": "^24.0.0", "lit": "^3.1.2", @@ -39,6 +40,7 @@ "remark-math": "^6.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", + "tailwind-merge": "^2.3.0", "tailwindcss": "^3.4.1", "three": "^0.164.1", "to-vfile": "^8.0.0", diff --git a/src/components/LinkPreview.astro b/src/components/LinkPreview.astro index e27f5c1..330cfb0 100644 --- a/src/components/LinkPreview.astro +++ b/src/components/LinkPreview.astro @@ -18,103 +18,53 @@ const image = document ?.getAttribute("content"); --- - -
-

{title}

-

{description}

- {src} +
+
+

+ {title} +

+

+ {description} +

+ {src}
- {image && {title}} + { + image && ( +
+ {title} +
+ ) + }
diff --git a/src/components/Nano/ArrowCard.astro b/src/components/Nano/ArrowCard.astro new file mode 100644 index 0000000..94205b8 --- /dev/null +++ b/src/components/Nano/ArrowCard.astro @@ -0,0 +1,45 @@ +--- +import type { CollectionEntry } from "astro:content"; + +type Props = { + entry: CollectionEntry<"blog">; +}; + +const { entry } = Astro.props; +--- + + +
+
+ {entry.data.title} +
+
+ {entry.data.description} +
+ +
+ + + + +
diff --git a/src/components/Nano/BackToPrev.astro b/src/components/Nano/BackToPrev.astro new file mode 100644 index 0000000..5cce7d2 --- /dev/null +++ b/src/components/Nano/BackToPrev.astro @@ -0,0 +1,20 @@ +--- +type Props = { + href: string; +} + +const { href } = Astro.props; +--- + + + + + + +
+ +
+
diff --git a/src/components/Nano/BackToTop.astro b/src/components/Nano/BackToTop.astro new file mode 100644 index 0000000..4989228 --- /dev/null +++ b/src/components/Nano/BackToTop.astro @@ -0,0 +1,23 @@ + diff --git a/src/components/Nano/Container.astro b/src/components/Nano/Container.astro new file mode 100644 index 0000000..5d99cd8 --- /dev/null +++ b/src/components/Nano/Container.astro @@ -0,0 +1,7 @@ +--- + +--- + +
+ +
diff --git a/src/components/Nano/Footer.astro b/src/components/Nano/Footer.astro new file mode 100644 index 0000000..ef7c4a1 --- /dev/null +++ b/src/components/Nano/Footer.astro @@ -0,0 +1,91 @@ +--- +import Container from "./Container.astro"; +import BackToTop from "./BackToTop.astro"; +--- + + diff --git a/src/components/Nano/FormattedDate.astro b/src/components/Nano/FormattedDate.astro new file mode 100644 index 0000000..d923f5d --- /dev/null +++ b/src/components/Nano/FormattedDate.astro @@ -0,0 +1,17 @@ +--- +interface Props { + date: Date; +} + +const { date } = Astro.props; +--- + + diff --git a/src/components/Nano/Head.astro b/src/components/Nano/Head.astro new file mode 100644 index 0000000..ed963cc --- /dev/null +++ b/src/components/Nano/Head.astro @@ -0,0 +1,273 @@ +--- +import "@styles/global.css"; +import { ViewTransitions } from "astro:transitions"; + +interface Props { + title: string; + description: string; + image?: string; +} + +const canonicalURL = new URL(Astro.url.pathname, Astro.site); + +const { title, description, image = "/nano.png" } = Astro.props; +--- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{title} + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/Nano/Header.astro b/src/components/Nano/Header.astro new file mode 100644 index 0000000..1b520b4 --- /dev/null +++ b/src/components/Nano/Header.astro @@ -0,0 +1,25 @@ +--- +import Container from "./Container.astro"; +import Link from "./Link.astro"; +--- + +
+ +
+ +
장용석 블로그
+ + +
+
+
diff --git a/src/components/Nano/Link.astro b/src/components/Nano/Link.astro new file mode 100644 index 0000000..26f128a --- /dev/null +++ b/src/components/Nano/Link.astro @@ -0,0 +1,23 @@ +--- +import { cn } from "@lib/utils"; + +type Props = { + href: string; + external?: boolean; + underline?: boolean; +}; + +const { href, external, underline = true, ...rest } = Astro.props; +--- + + + + diff --git a/src/components/Video.astro b/src/components/Video.astro index de386ca..20790c3 100644 --- a/src/components/Video.astro +++ b/src/components/Video.astro @@ -10,6 +10,7 @@ const { src, caption, ratio } = Astro.props;
+ + diff --git a/src/pages/index.astro b/src/pages/index.astro index fe1a1ee..0c26593 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,9 +1,11 @@ --- +import Container from "@components/Nano/Container.astro"; import BaseHead from "../components/BaseHead.astro"; import Footer from "../components/Footer.astro"; import Header from "../components/Header.astro"; import { HomeCoverElement } from "../components/lit/asciiScreen/home-cover-element"; import { SITE_DESCRIPTION, SITE_TITLE } from "../consts"; +import PageLayout from "@layouts/PageLayout.astro"; --- @@ -17,15 +19,15 @@ import { SITE_DESCRIPTION, SITE_TITLE } from "../consts"; align-items: center; width: 100%; height: 100%; - padding: 16px 0; } -
-
- -
-