mirror of
https://github.com/mat-1/matdoesdev.git
synced 2025-08-02 14:46:04 +00:00
add back button to blog post
This commit is contained in:
parent
5880d86849
commit
5612de97e0
1 changed files with 15 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" context="module">
|
||||
import type { APIBlogPost } from './[slug].json';
|
||||
import type { APIBlogPost } from './[slug].json'
|
||||
import type { Load } from '@sveltejs/kit'
|
||||
|
||||
export const load: Load = async ({ page, fetch }) => {
|
||||
|
@ -24,14 +24,22 @@
|
|||
export let html: string
|
||||
</script>
|
||||
|
||||
<article>
|
||||
<h1>{title}</h1>
|
||||
{@html html}
|
||||
</article>
|
||||
<div class="article-container">
|
||||
<a href="/blog" class="back-anchor">← Back</a>
|
||||
<article>
|
||||
<h1>{title}</h1>
|
||||
{@html html}
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
article {
|
||||
.article-container {
|
||||
max-width: 50em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
.back-anchor {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Reference in a new issue