From 27153476429c4a85630dedcf940a50089ea02151 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 4 Feb 2024 00:09:03 -0500 Subject: Made card more consistent; Guestbook submits; Web analytics --- astro.config.mjs | 8 +++++-- src/pages/blog/index.astro | 29 +++++++++++++------------ src/pages/blog/tags/[tag].astro | 20 ++++++++++-------- src/pages/guestbook.astro | 47 +++++++++++++++++++++++++++++++---------- src/pages/projects.astro | 42 ++++-------------------------------- src/styles/cards.css | 15 ++++++++++--- 6 files changed, 84 insertions(+), 77 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index b538d31..c17d797 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -9,7 +9,11 @@ export default defineConfig({ site: 'https://alee14.me', integrations: [icon(), preact()], output: "server", - adapter: vercel(), + adapter: vercel({ + webAnalytics: { + enabled: true, + }, + }), image: { service: passthroughImageService() }, @@ -27,4 +31,4 @@ export default defineConfig({ transformers: [] } } -}); \ No newline at end of file +}); diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index a6b6855..5e4c619 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -8,20 +8,21 @@ const allBlogPosts = (await getCollection('blog')).sort((a, b) => b.data.pubDate ---
- {allBlogPosts.map((post) => ( -
-

{post.data.title}

- {formatDate(post.data.pubDate)} -

{post.data.description}

-
- {post.data.tags.map((tag) => ( - {tag} - ))} -
-
- )) - } - +
+ {allBlogPosts.map((post) => ( +
+

{post.data.title}

+ {formatDate(post.data.pubDate)} +

{post.data.description}

+
+ {post.data.tags.map((tag) => ( + {tag} + ))} +
+
+ )) + } +
diff --git a/src/styles/cards.css b/src/styles/cards.css index 192335d..67a618c 100644 --- a/src/styles/cards.css +++ b/src/styles/cards.css @@ -1,9 +1,18 @@ -h1 { +.card h1 { margin-top: 2px; margin-bottom: 2px; } -article { +.card h2 { + margin-top: 2px; +} + +.card p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +.card { background-color: #3B513B; padding: 1.2em; border-radius: 20px; @@ -11,7 +20,7 @@ article { margin: 0.5em; } -main { +.grid { display: grid; grid-template-columns: repeat(2, 1fr); } -- cgit v1.2.3