From 8c543b6bb7ba29cfed559c3693b4149d1204ef78 Mon Sep 17 00:00:00 2001 From: TomasBankauskas Date: Thu, 20 Mar 2025 15:16:16 +0200 Subject: removed daisyui --- src/components/Alert.astro | 2 +- src/components/Card.astro | 26 ------------ src/components/Diff.astro | 94 +++++++++++++++++++++++++++++++++++++++++++ src/components/Markdown.astro | 11 +---- 4 files changed, 97 insertions(+), 36 deletions(-) delete mode 100644 src/components/Card.astro create mode 100644 src/components/Diff.astro (limited to 'src/components') diff --git a/src/components/Alert.astro b/src/components/Alert.astro index 1a468fb..f8870e6 100644 --- a/src/components/Alert.astro +++ b/src/components/Alert.astro @@ -6,7 +6,7 @@ interface Props { const { class: className } = Astro.props; --- -
+
-
- {title &&

{title}

} - {text &&

{text}

} - { - linkText && href && ( - - ) - } -
-
diff --git a/src/components/Diff.astro b/src/components/Diff.astro new file mode 100644 index 0000000..4c11962 --- /dev/null +++ b/src/components/Diff.astro @@ -0,0 +1,94 @@ +--- +interface Props { + class?: string; +} + +const { class: className } = Astro.props; +--- + +
+
+ +
+
+ +
+
+
+ + diff --git a/src/components/Markdown.astro b/src/components/Markdown.astro index e8996c5..ce83e60 100644 --- a/src/components/Markdown.astro +++ b/src/components/Markdown.astro @@ -1,7 +1,7 @@ --- import { Marked } from 'marked'; import markedShiki from 'marked-shiki'; -import { getHighlighter } from 'shiki'; +import { highlighterPromise } from '../utils/highlighter'; interface Props { content: string; @@ -10,14 +10,7 @@ interface Props { const { content, class: className } = Astro.props; -// `getHighlighter` is async, it initializes the internal and -// loads the languages and themes specified. -// Then later you can use `highlighter.codeToHtml` synchronously -// with the loaded themes and languages. -const highlighter = await getHighlighter({ - langs: ['jsx', 'js'], - themes: ['min-dark'] -}); +const highlighter = await highlighterPromise; const html = await new Marked() .use( markedShiki({ -- cgit v1.2.3