diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/layouts/BlogPost.astro | 10 | ||||
| -rw-r--r-- | src/layouts/PageMarkdown.astro | 8 | ||||
| -rw-r--r-- | src/pages/blog/[...slug].astro | 11 |
3 files changed, 18 insertions, 11 deletions
diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro index 5849f90..a08dd15 100644 --- a/src/layouts/BlogPost.astro +++ b/src/layouts/BlogPost.astro @@ -10,9 +10,7 @@ const { title, description, date } = Astro.props; </header> <div class="container"> <main> - <article> - <slot /> - </article> + <slot /> </main> </div> </Layout> @@ -27,6 +25,12 @@ const { title, description, date } = Astro.props; padding: 0 0 1em; } + main { + background-color: #3B513B; + padding: 1.2em; + border-radius: 20px; + } + .header-text { font-size: 2em; margin: 0; diff --git a/src/layouts/PageMarkdown.astro b/src/layouts/PageMarkdown.astro index f6e76ab..89bd0f8 100644 --- a/src/layouts/PageMarkdown.astro +++ b/src/layouts/PageMarkdown.astro @@ -41,6 +41,14 @@ const { frontmatter } = Astro.props; margin: 1em 10em 1em 10em; } + article { + background-color: #3B513B; + padding: 1.3em; + border-radius: 20px; + gap: 0.5em; + margin: 0.5em; + } + @media (max-width: 992px) { .container { margin: 10px 20px 10px 20px; diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index 8713ab5..790a920 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -19,13 +19,8 @@ const { Content } = await entry.render(); <Page title={entry.data.title} description={entry.data.description} date={formatDate(entry.data.date)}> <main> <a href="/blog" class="back-link">← All articles</a> - <Content /> + <article> + <Content /> + </article> </main> </Page> -<style> - main { - background-color: #3B513B; - padding: 1.2em; - border-radius: 20px; - } -</style> |
