summaryrefslogtreecommitdiff
path: root/www/src/components/BlogPostPreview.astro
diff options
context:
space:
mode:
Diffstat (limited to 'www/src/components/BlogPostPreview.astro')
-rw-r--r--www/src/components/BlogPostPreview.astro87
1 files changed, 44 insertions, 43 deletions
diff --git a/www/src/components/BlogPostPreview.astro b/www/src/components/BlogPostPreview.astro
index bb1459dbb..aa1e8731b 100644
--- a/www/src/components/BlogPostPreview.astro
+++ b/www/src/components/BlogPostPreview.astro
@@ -2,55 +2,56 @@
import Author from './Author.astro';
export interface Props {
- title: string;
- publishDate: string;
- href: string;
+ title: string;
+ publishDate: string;
+ href: string;
}
const { title, publishDate, href } = Astro.props;
---
+
<article class="post-preview">
- <header>
- <p class="publish-date">{publishDate}</p>
- <a href={href}><h1 class="title">{title}</h1></a>
- </header>
- <slot />{' '}<a href={href}>Read more →</a>
+ <header>
+ <p class="publish-date">{publishDate}</p>
+ <a {href}><h1 class="title">{title}</h1></a>
+ </header>
+ <slot />{' '}<a {href}>Read more →</a>
</article>
<style>
-.content :global(main > * + *) {
- margin-top: 1rem;
-}
-
-.post-preview {
- padding-bottom: 2rem;
- margin-bottom: 2rem;
- border-bottom: 4px solid var(--theme-divider);
-}
-
-header {
- display: flex;
- flex-direction: column;
- text-align: left;
- align-items: flex-start;
- justify-content: center;
-}
-
-.title,
-.author,
-.publish-date {
- margin: 0;
-}
-
-.publish-date,
-.author {
- font-size: 1.25rem;
- color: var(--theme-text-lighter);
-}
-
-.title {
- font-size: 2.25rem;
- font-weight: 700;
- color: var(--theme-text);
-}
+ .content :global(main > * + *) {
+ margin-top: 1rem;
+ }
+
+ .post-preview {
+ padding-bottom: 2rem;
+ margin-bottom: 2rem;
+ border-bottom: 4px solid var(--theme-divider);
+ }
+
+ header {
+ display: flex;
+ flex-direction: column;
+ text-align: left;
+ align-items: flex-start;
+ justify-content: center;
+ }
+
+ .title,
+ .author,
+ .publish-date {
+ margin: 0;
+ }
+
+ .publish-date,
+ .author {
+ font-size: 1.25rem;
+ color: var(--theme-text-lighter);
+ }
+
+ .title {
+ font-size: 2.25rem;
+ font-weight: 700;
+ color: var(--theme-text);
+ }
</style>