From cfb1e5cee7c9370ff491921c968c23bdf46d39ef Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Sat, 25 Apr 2026 01:12:09 +0300 Subject: [PATCH] Refactor dialog as a component --- src/components/Posts/Dialog.astro | 118 +++++++++++++++++++++++++++ src/layouts/MarkdownPostLayout.astro | 42 +--------- src/styles/dialog.css | 39 +++++++++ 3 files changed, 159 insertions(+), 40 deletions(-) create mode 100644 src/components/Posts/Dialog.astro diff --git a/src/components/Posts/Dialog.astro b/src/components/Posts/Dialog.astro new file mode 100644 index 0000000..a8a60c3 --- /dev/null +++ b/src/components/Posts/Dialog.astro @@ -0,0 +1,118 @@ + + + + + + + + + + diff --git a/src/layouts/MarkdownPostLayout.astro b/src/layouts/MarkdownPostLayout.astro index f7cab2b..4d3ee65 100644 --- a/src/layouts/MarkdownPostLayout.astro +++ b/src/layouts/MarkdownPostLayout.astro @@ -3,6 +3,7 @@ import BaseLayout from "./BaseLayout.astro"; import Remark42Embed from "@/components/Remark42Embed.astro"; import PostNav from "@/components/Posts/PostNav.astro"; import PostMenu from "@/components/Posts/PostMenu.astro"; +import Dialog from "@/components/Posts/Dialog.astro"; import { fade } from "astro:transitions"; import { getTranslations } from "@/i18n"; import "@/styles/global.css"; @@ -81,10 +82,7 @@ const t = getTranslations(lang); - - - - + @@ -121,42 +119,6 @@ const t = getTranslations(lang); })} /> - -