From f7ebc9b217cb3f698bf5c0f19ab6833a9747bc2b Mon Sep 17 00:00:00 2001 From: Ash Entwisle Date: Tue, 19 Sep 2023 04:05:32 +0000 Subject: [PATCH] updated styles Signed-off-by: Ash Entwisle --- src/components/Error.astro | 2 +- src/layouts/Blogpost.astro | 3 +- src/layouts/Boilerplate.astro | 2 ++ src/layouts/Markdown.astro | 21 +++++++++++ src/layouts/Todo.astro | 3 -- src/pages/[...any].astro | 3 -- src/styles.scss | 68 +++++++++++++++++++++++++++++++++++ 7 files changed, 94 insertions(+), 8 deletions(-) diff --git a/src/components/Error.astro b/src/components/Error.astro index 9dccaad..22cce52 100644 --- a/src/components/Error.astro +++ b/src/components/Error.astro @@ -6,7 +6,7 @@ export interface Props { const { code } = Astro.props; --- -
+

Error: { code }

diff --git a/src/layouts/Blogpost.astro b/src/layouts/Blogpost.astro index 874cd10..d710241 100644 --- a/src/layouts/Blogpost.astro +++ b/src/layouts/Blogpost.astro @@ -7,4 +7,5 @@ const { frontmatter } = Astro.props; if (frontmatter.draft) { return Astro.redirect('/404'); } ---- \ No newline at end of file +--- + diff --git a/src/layouts/Boilerplate.astro b/src/layouts/Boilerplate.astro index 3c8425f..9b60f55 100644 --- a/src/layouts/Boilerplate.astro +++ b/src/layouts/Boilerplate.astro @@ -11,6 +11,8 @@ export interface Props { const { title, description, keywords } = Astro.props; const keywordsString = keywords.join(' '); + +import "../styles.scss" --- diff --git a/src/layouts/Markdown.astro b/src/layouts/Markdown.astro index e69de29..4e447e3 100644 --- a/src/layouts/Markdown.astro +++ b/src/layouts/Markdown.astro @@ -0,0 +1,21 @@ +--- +import Boilerplate from "./Boilerplate.astro"; + +const { frontmatter } = Astro.props + +// remove all duplicate words in the description and add them as keywords +const tags: string[] = frontmatter.description.split(" ").filter((word: any, index: any, self: string | any[]) => { + return self.indexOf(word) === index; +}); + +import "../styles.scss" + +--- + + + +
+ +
+
+
diff --git a/src/layouts/Todo.astro b/src/layouts/Todo.astro index 984ca3f..aa309df 100644 --- a/src/layouts/Todo.astro +++ b/src/layouts/Todo.astro @@ -3,9 +3,6 @@ import Boilerplate from "./Boilerplate.astro"; import Error from "../components/Error.astro"; -// use styles.scss -import "../styles.scss"; - const keywords: string[] = []; --- diff --git a/src/pages/[...any].astro b/src/pages/[...any].astro index 773db4c..80f84f5 100644 --- a/src/pages/[...any].astro +++ b/src/pages/[...any].astro @@ -3,9 +3,6 @@ import Error from "../components/Error.astro"; import Boilerplate from "../layouts/Boilerplate.astro"; -// use styles.scss -import "../styles.scss"; - const keywords: string[] = [] --- diff --git a/src/styles.scss b/src/styles.scss index 5d8b1d3..9639d0b 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -45,6 +45,74 @@ main { @apply bg-mono_6; } + +} + +markdown { + height: fit-content; + + h1 { + margin: 10px; + + @apply text-4xl; + @apply font-bold; + } + + h2 { + margin: 10px; + + @apply text-3xl; + @apply font-bold; + } + + h3 { + margin: 10px; + + @apply text-2xl; + @apply font-bold; + } + + h4 { + margin: 10px; + + @apply text-xl; + @apply font-bold; + } + + p { + margin: 10px; + margin-top: 25px; + margin-bottom: 25px; + + @apply text-lg; + } + + ul { + margin: 10px; + margin-top: 10px; + margin-bottom: 10px; + + @apply text-lg; + } + + ol { + margin: 10px; + margin-top: 10px; + margin-bottom: 10px; + + @apply text-lg; + } + + li { + margin: 10px; + margin-top: 10px; + margin-bottom: 10px; + margin-left: 25px; + + list-style-type: disc; + + @apply text-lg; + } } footer {