From 54831dcbb0e2d962900b5de5945b2a4f3357435d Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Sat, 10 Jun 2023 13:05:40 +0200 Subject: [PATCH] style: cozier list (#32) * style: cozy list * style: remove heading margin --- src/components/Library.astro | 76 +++++++++++++++++++++++++----------- src/layouts/Layout.astro | 3 +- 2 files changed, 56 insertions(+), 23 deletions(-) diff --git a/src/components/Library.astro b/src/components/Library.astro index 9f32933..c3f18e6 100644 --- a/src/components/Library.astro +++ b/src/components/Library.astro @@ -84,24 +84,34 @@ const {postDivSelector, skipSave = false} = Astro.props; const image = html.querySelector('meta[property="cozy:image"]')?.getAttribute('content'); const url = html.querySelector('meta[property="cozy:url"]')?.getAttribute('content'); const source = html.querySelector('meta[property="cozy:source"]')?.getAttribute('content'); + const published = html.querySelector('meta[property="cozy:published"]')?.getAttribute('content'); const postCard = `
+
${ image ? ` -
${title} | ${description} -
` - : '' + : '' } +
- ${ - source ? ` -

${source}

- ` - : '' - } +
+ ${ + source ? ` +

${source}

+ ` + : '' + } + ${ + published ? ` +

${new Date(published).toLocaleDateString()}

+ ` + : '' + } + +

${title}

${ description ? ` @@ -118,22 +128,18 @@ const {postDivSelector, skipSave = false} = Astro.props;