From 8c543b6bb7ba29cfed559c3693b4149d1204ef78 Mon Sep 17 00:00:00 2001 From: TomasBankauskas Date: Thu, 20 Mar 2025 15:16:16 +0200 Subject: removed daisyui --- src/assets/noise.png | Bin 5812 -> 0 bytes src/components/Alert.astro | 2 +- src/components/Card.astro | 26 -------- src/components/Diff.astro | 94 +++++++++++++++++++++++++++ src/components/Markdown.astro | 11 +--- src/env.d.ts | 1 - src/layouts/Layout.astro | 14 ++-- src/pages/blobs/_components/NewShape.tsx | 10 ++- src/pages/blobs/_components/StoredShapes.tsx | 10 +-- src/pages/blobs/index.astro | 4 +- src/pages/edge/australia/index.astro | 6 +- src/pages/edge/not-australia/index.astro | 2 +- src/pages/image-cdn.astro | 33 +++++----- src/pages/index.astro | 8 +-- src/pages/revalidation.astro | 6 +- src/styles/globals.css | 66 +++++++++++++------ src/utils/highlighter.ts | 6 ++ 17 files changed, 196 insertions(+), 103 deletions(-) delete mode 100644 src/assets/noise.png delete mode 100644 src/components/Card.astro create mode 100644 src/components/Diff.astro delete mode 100644 src/env.d.ts create mode 100644 src/utils/highlighter.ts (limited to 'src') diff --git a/src/assets/noise.png b/src/assets/noise.png deleted file mode 100644 index 96950c7..0000000 Binary files a/src/assets/noise.png and /dev/null differ 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({ diff --git a/src/env.d.ts b/src/env.d.ts deleted file mode 100644 index f964fe0..0000000 --- a/src/env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 56d0c95..467bd3b 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,10 +1,7 @@ --- import '../../src/styles/globals.css'; -import '@fontsource/inter/400.css'; -import '@fontsource/inter/800.css'; -import interFont400 from '@fontsource/inter/files/inter-latin-400-normal.woff2?url'; -import interFont800 from '@fontsource/inter/files/inter-latin-800-normal.woff2?url'; - +import '@fontsource-variable/inter/wght.css'; +import interWoff2 from '@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url'; import Header from '../components/Header.astro'; import Footer from '../components/Footer.astro'; @@ -23,11 +20,10 @@ const { title } = Astro.props; - - + - -
+ +
diff --git a/src/pages/blobs/_components/NewShape.tsx b/src/pages/blobs/_components/NewShape.tsx index a141177..00bedf9 100644 --- a/src/pages/blobs/_components/NewShape.tsx +++ b/src/pages/blobs/_components/NewShape.tsx @@ -41,17 +41,15 @@ export default function NewShape(props: Props) { return ( <>

New Random Shape

-
-
- {blobData && {blobData.parameters?.name}} -
+
+
{blobData && {blobData.parameters?.name}}
{blobData && }
- -
diff --git a/src/pages/blobs/_components/StoredShapes.tsx b/src/pages/blobs/_components/StoredShapes.tsx index e870ef5..4c4ec10 100644 --- a/src/pages/blobs/_components/StoredShapes.tsx +++ b/src/pages/blobs/_components/StoredShapes.tsx @@ -45,15 +45,15 @@ export default function StoredShapes(props: Props) { <>

Objects in Blob Store

-
+
{keys?.length ? (
{keys.map((keyName) => (
) : ( - Please upload some shapes! + Please upload some shapes! )}
{previewData && ( -
+
)} diff --git a/src/pages/blobs/index.astro b/src/pages/blobs/index.astro index 11aa98a..00288b0 100644 --- a/src/pages/blobs/index.astro +++ b/src/pages/blobs/index.astro @@ -25,9 +25,9 @@ User uploads are disabled in this site. To run your own and try it out: addedChecksFunction={() => { return uploadDisabled ? uploadDisabledText : null; }} - class="mb-6" + class="mb-8" /> -

Blobs x Blobs

+

Blobs x Blobs

diff --git a/src/pages/edge/australia/index.astro b/src/pages/edge/australia/index.astro index 59965dd..5b1e29f 100644 --- a/src/pages/edge/australia/index.astro +++ b/src/pages/edge/australia/index.astro @@ -1,9 +1,9 @@ --- -import Layout from "../../../layouts/Layout.astro"; -import EdgeFunctionExplainer from "../../../components/EdgeFunctionExplainer.astro"; +import Layout from '../../../layouts/Layout.astro'; +import EdgeFunctionExplainer from '../../../components/EdgeFunctionExplainer.astro'; --- -

You are in Australia!

+

You are in Australia!

diff --git a/src/pages/edge/not-australia/index.astro b/src/pages/edge/not-australia/index.astro index eff39ed..0457c7e 100644 --- a/src/pages/edge/not-australia/index.astro +++ b/src/pages/edge/not-australia/index.astro @@ -4,6 +4,6 @@ import EdgeFunctionExplainer from '../../../components/EdgeFunctionExplainer.ast --- -

You're not in Australia!

+

You're not in Australia!

diff --git a/src/pages/image-cdn.astro b/src/pages/image-cdn.astro index dbb8822..4875c1a 100644 --- a/src/pages/image-cdn.astro +++ b/src/pages/image-cdn.astro @@ -1,9 +1,11 @@ --- import { Image } from 'astro:assets'; +import corgi from '../assets/corgi.jpg'; import ContextAlert from '../components/ContextAlert.astro'; -import Layout from '../layouts/Layout.astro'; +import Diff from '../components/Diff.astro'; import Markdown from '../components/Markdown.astro'; -import corgi from '../assets/corgi.jpg'; +import Layout from '../layouts/Layout.astro'; + import { getNetlifyContext } from '../utils'; const sampleImage = '/images/corgi.jpg'; @@ -59,11 +61,12 @@ detection, so format is set to WebP.
-
+
{ return ctx === 'dev' ? devModeWarning : null; }} + class="mb-8" />

Image CDN

@@ -79,31 +82,31 @@ detection, so format is set to WebP.
-
-
+ +
- - Corgi + + Corgi
-
-
+ +
- - Corgi + + + Corgi
-
-
-
+ +