diff options
author | 2021-11-19 11:23:09 -0800 | |
---|---|---|
committer | 2021-11-19 11:23:09 -0800 | |
commit | 1acedb5ce82edddc9c6d9a39717499d30cd82f49 (patch) | |
tree | 7983e20f41eb07b391584134f2056b0c34c03748 /www/src/components/BlogPost.astro | |
parent | 3f76849a0bd49c2446643cf2f6748c75625f12a6 (diff) | |
download | astro-1acedb5ce82edddc9c6d9a39717499d30cd82f49.tar.gz astro-1acedb5ce82edddc9c6d9a39717499d30cd82f49.tar.zst astro-1acedb5ce82edddc9c6d9a39717499d30cd82f49.zip |
Improve www blog page layout (#1898)
* wip
* Update Shell.astro to not introduce additional newlines
* fix recursive markdown in Note
Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>
Diffstat (limited to 'www/src/components/BlogPost.astro')
-rw-r--r-- | www/src/components/BlogPost.astro | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/www/src/components/BlogPost.astro b/www/src/components/BlogPost.astro index 0e358c0ca..4c73608a3 100644 --- a/www/src/components/BlogPost.astro +++ b/www/src/components/BlogPost.astro @@ -8,8 +8,8 @@ export interface Props { title: string; author?: string; publishDate: string; - heroImage: string; - heroImageAlt: string; + heroImage?: string; + heroImageAlt?: string; } const { title, author, publishDate, heroImage, heroImageAlt } = Astro.props; @@ -18,7 +18,7 @@ const { title, author, publishDate, heroImage, heroImageAlt } = Astro.props; <div class="layout"> <article> <header> - {heroImage && <img width="720" height="420" class="hero-image" loading="lazy" src={heroImage} alt={heroImageAlt}/>} + <img width="720" height="420" class="hero-image" loading="lazy" src={heroImage || '/social.jpg'} alt={heroImageAlt || ""} /> <p class="publish-date">{publishDate}</p> <h1 class="title">{title}</h1> {author && <Author authorId={author} />} |