astro/examples/blog-multiple-authors/src/layouts/post.astro

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

79 lines
1.5 KiB
Text
Raw Normal View History

---
import MainHead from '../components/MainHead.astro';
import Nav from '../components/Nav.astro';
import authorData from '../data/authors.json';
const { content } = Astro.props;
let canonicalURL = Astro.canonicalURL;
---
2021-07-20 01:23:39 +00:00
<html lang={content.lang || 'en'}>
<head>
<title>{content.title}</title>
<MainHead title={content.title} description={content.description} image={content.image} {canonicalURL} />
2021-05-17 22:45:41 +00:00
<style lang="scss">
.title {
margin-top: 4rem;
margin-bottom: 4rem;
font-size: 3em;
letter-spacing: -0.04em;
text-align: center;
}
.description {
margin-bottom: 4rem;
font-size: 1.4em;
font-weight: 400;
text-align: justify;
text-transform: uppercase;
}
.img {
display: block;
width: 100%;
height: auto;
}
.article {
margin-top: 4rem;
margin-bottom: 6rem;
:global(p) {
font-size: 1.3em;
line-height: 2;
margin-top: 2em;
margin-bottom: 2em;
}
}
.posts {
text-transform: uppercase;
}
.footer {
margin-top: 6rem;
padding-bottom: 6rem;
text-align: center;
}
</style>
</head>
<body>
<Nav />
<main class="wrapper">
<h2 class="title">{content.title}</h2>
<p class="description">{content.description}</p>
<img class="img" src={content.image} alt="" />
2021-05-17 22:45:41 +00:00
<article class="article">
<slot />
</article>
2021-05-17 22:45:41 +00:00
<footer class="footer">
<a class="posts" href="/posts">All Posts</a>
</footer>
</main>
<footer></footer>
</body>
</html>