firq-dev-website/src/layouts/blogPost.astro

84 lines
1.9 KiB
Text
Raw Normal View History

2023-03-08 19:53:38 +00:00
---
import Layout from "./Layout.astro";
const { frontmatter } = Astro.props;
const title = `${frontmatter.title} - Firq FGO Site`;
const description = frontmatter.description;
const options_date: Intl.DateTimeFormatOptions = {
year: "numeric",
month: "long",
day: "2-digit",
}
const date = new Date(frontmatter.pubDate).toLocaleDateString('en-GB', options_date);
---
<Layout title={title} currentpage="blog" descriptionOverride={description}>
<div>
<h1>
{frontmatter.title}
</h1>
<p>by {frontmatter.author} • Published on {date}</p>
<article>
<slot />
</article>
</div>
</Layout>
<style>
h1 {
color: white;
2023-03-08 20:08:27 +00:00
margin: 0.5rem 3rem 0.5rem 3rem;
2023-03-08 19:53:38 +00:00
padding: 0.25rem 0.75rem;
2023-03-08 23:09:07 +00:00
max-width: max-content;
2023-03-08 19:53:38 +00:00
background-color: var(--c-darkgray);
}
p {
color: white;
2023-03-08 20:08:27 +00:00
margin: 0.5rem 3rem 0.5rem 3rem;
2023-03-08 19:53:38 +00:00
padding: 0.25rem 0.75rem;
width: max-content;
background-color: var(--c-gray);
}
article :global(h2) {
2023-03-08 20:26:47 +00:00
margin-right: 3rem;
word-wrap: normal;
2023-03-08 19:53:38 +00:00
color: white;
padding: 0.25rem 0.75rem;
2023-03-08 20:26:47 +00:00
max-width: max-content;
2023-03-08 19:53:38 +00:00
background-color: var(--c-darkgray);
}
article :global(a) {
color: var(--c-darkpurple);
text-decoration: none;
}
article {
color: white;
2023-03-08 20:08:27 +00:00
margin: 0.5rem 3rem 0.5rem 3rem;
2023-03-08 19:53:38 +00:00
font-size: 1.1em;
padding-bottom: 5rem;
}
article :global(.astro-code) {
padding-left: 2em;
width: auto;
}
article :global(code) {
font-weight: bold;
color: orange;
}
2023-03-08 20:08:27 +00:00
@media (min-width: 1500px) {
article {
margin-left: 15rem;
margin-right: 15rem;
}
h1 {
margin-left: 15rem;
margin-right: 15rem;
}
p {
margin-left: 15rem;
margin-right: 15rem;
}
}
2023-03-08 23:09:07 +00:00
</style>