From b1e93845ec7242a7518866e696e1fec806d34e7e Mon Sep 17 00:00:00 2001 From: Ayo Date: Sun, 4 Jun 2023 13:26:10 +0200 Subject: [PATCH] style: center images if less than post width --- src/components/post.astro | 1 - src/pages/index.astro | 18 ++++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/components/post.astro b/src/components/post.astro index 095cfac..2e3dcf6 100644 --- a/src/components/post.astro +++ b/src/components/post.astro @@ -53,7 +53,6 @@ const datePublished = font-size: small; } p, - img, table, ul { margin: 1em 0; diff --git a/src/pages/index.astro b/src/pages/index.astro index b5ae9b6..b50b894 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -8,17 +8,15 @@ const params = Astro.url.searchParams; const url = params.get('url') || ''; let article; - try { - article = await extract(url); - } catch { - article = { - title: "Something is not right", - content: "

The article extractor did not get any result.

", - }; - } +try { + article = await extract(url); +} catch { + article = { + title: "Something is not right", + content: "

The article extractor did not get any result.

", + }; +} --- - - {url && }