style: center images if less than post width

This commit is contained in:
Ayo 2023-06-04 13:26:10 +02:00
parent 9a7c372ca8
commit b1e93845ec
2 changed files with 8 additions and 11 deletions

View file

@ -53,7 +53,6 @@ const datePublished =
font-size: small;
}
p,
img,
table,
ul {
margin: 1em 0;

View file

@ -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: "<p>The article extractor did not get any result.</p>",
};
}
try {
article = await extract(url);
} catch {
article = {
title: "Something is not right",
content: "<p>The article extractor did not get any result.</p>",
};
}
---
<Layout title={url !== "" ? article?.title : "Your modern-day reading assistant"}>
<AddressBar url={url} />
{url && <Post article={article} />}