astro/examples/blog-multiple-authors/src/layouts/post.astro
Matthew Phillips ecc6a4833f
Implement the Astro.request RFC (#2913)
* Implement the Astro.request RFC

* Disable console warnings eslint

* Use our logger

* Adds a changeset

* Fix tests that depend on params, canonicalURL, URL

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-03-29 07:35:03 -04:00

78 lines
1.5 KiB
Text

---
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;
---
<html lang={content.lang || 'en'}>
<head>
<title>{content.title}</title>
<MainHead title={content.title} description={content.description} image={content.image} {canonicalURL} />
<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="" />
<article class="article">
<slot />
</article>
<footer class="footer">
<a class="posts" href="/posts">All Posts</a>
</footer>
</main>
<footer></footer>
</body>
</html>