diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro index f282a76..f6e2eb7 100644 --- a/src/layouts/BlogPost.astro +++ b/src/layouts/BlogPost.astro @@ -14,7 +14,7 @@ const { } = Astro.props; --- - + @@ -23,13 +23,10 @@ const {
{heroImage && }

{title}

- {added && } - { - updated && ( -
- Last updated on -
- ) + {updated ? + , last updated on + : + {added && } }
diff --git a/src/pages/post/[slug].astro b/src/pages/post/[slug].astro index a362767..db25f7d 100644 --- a/src/pages/post/[slug].astro +++ b/src/pages/post/[slug].astro @@ -22,6 +22,19 @@ post.frontmatter.added = new Date(post.frontmatter.added).toLocaleDateString( } ); +if (post.frontmatter.updated === "Invalid Date") { + post.frontmatter.updated = null; +} else { + post.frontmatter.updated = new Date(post.frontmatter.updated).toLocaleDateString( + "en-us", + { + year: "numeric", + month: "short", + day: "numeric", + } + ); +} + const { Content, frontmatter: { title, added, updated, tags, excerpt }, diff --git a/src/style/global.css b/src/style/global.css index 1c3451f..4d66d90 100644 --- a/src/style/global.css +++ b/src/style/global.css @@ -116,6 +116,7 @@ nav { top: 0; text-align: center; background: var(--transwhite); + -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); }