From d4bc2755bca8335226d247f6346d9a4624eadb30 Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Wed, 4 Sep 2024 19:31:04 +0200 Subject: [PATCH] refactor: various improvements - use semantic elements (main, header, article) - remove unused AddressBar component - bundle article css --- public/article.css | 62 ------------------------ src/components/Jumbotron.astro | 6 +-- src/components/Post.astro | 70 ++++++++++++++++++++++++++- src/components/SimpleAddressBar.astro | 4 +- src/layouts/Layout.astro | 22 +++++---- src/pages/404.astro | 7 +-- src/pages/index.astro | 2 - 7 files changed, 90 insertions(+), 83 deletions(-) delete mode 100644 public/article.css diff --git a/public/article.css b/public/article.css deleted file mode 100644 index ca328eb..0000000 --- a/public/article.css +++ /dev/null @@ -1,62 +0,0 @@ -div#post { - - h1.title { - font-size: xx-large; - margin: 0; - } - - h1, h2, h3, h4, h5, h6 { - line-height: 1.2; - } - - .source, .publish-info { - font-size: smaller; - color: #555; - } - - .source { - font-weight: bold; - } - - .publish-info { - padding-left: 0; - margin: 0; - list-style: none; - - li { - margin: 0; - } - } - - content { - p, table, ul, img { - margin: 1em 0 !important; - font-size: 20px; - } - - table { - border-collapse: collapse; - - td, th { - border: 1px solid #ccc; - padding: 0.5em; - } - } - - pre { - white-space: pre-wrap; - &:has(code) { - padding: 1em; - background: #f6f8fa; - border-radius: 5px; - } - } - - @media (max-width: 600px) { - p, table, ul, img { - font-size: 16px; - } - } - } - -} \ No newline at end of file diff --git a/src/components/Jumbotron.astro b/src/components/Jumbotron.astro index e5bc4f2..1135192 100644 --- a/src/components/Jumbotron.astro +++ b/src/components/Jumbotron.astro @@ -1,7 +1,7 @@ --- --- -
+
@@ -11,10 +11,10 @@ -
+ \ No newline at end of file diff --git a/src/components/SimpleAddressBar.astro b/src/components/SimpleAddressBar.astro index 273d8ba..8c82da9 100644 --- a/src/components/SimpleAddressBar.astro +++ b/src/components/SimpleAddressBar.astro @@ -9,7 +9,7 @@ const placeholder = "Type the article URL here"; const { url } = Astro.props; --- -
+