firq-dev-website/src/layouts/blogPost.astro
2024-07-19 22:52:15 +02:00

151 lines
3.2 KiB
Text

---
import SmallTitle from '../components/titles/smallTitle.astro'
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
)
const subtext = `Written by ${frontmatter.author} • Published on ${date}`
---
<Layout title={title} currentpage="blog" descriptionOverride={description}>
<SmallTitle maintext={frontmatter.title} subtext={subtext} fadeout={true} returnbutton={true} baseurl='blog'/>
<div>
<article>
<slot />
</article>
</div>
</Layout>
<style>
a {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
text-align: center;
color: white;
background-color: var(--c-gray);
padding: 0.5rem 0px;
margin-bottom: 2rem;
text-decoration: none;
}
h1 {
font-size: 34px;
line-height: 40px;
letter-spacing: -1px;
color: white;
margin: 0.5rem 3rem 0.5rem 3rem;
padding: 0.25rem 0.75rem;
max-width: max-content;
background-color: var(--c-darkgray);
padding: 0.25rem 1rem;
border-radius: 0.5rem;
padding-bottom: 0.5rem;
}
p {
color: white;
margin: 0.5rem 3rem 0.5rem 3rem;
padding: 0.25rem 0.75rem;
max-width: max-content;
background-color: var(--c-gray);
border-radius: 0.5rem;
padding-bottom: 0.5rem;
}
article :global(h2) {
margin-right: 3rem;
word-wrap: normal;
color: white;
padding: 0.25rem 0.75rem;
max-width: max-content;
background-color: var(--c-darkgray);
padding: 0.25rem 1rem;
border-radius: 0.5rem;
padding-bottom: 0.5rem;
}
article :global(h3) {
margin-bottom: 0.5rem;
margin-right: 3rem;
word-wrap: normal;
color: white;
padding: 0.25rem 0.75rem;
max-width: max-content;
background-color: var(--c-darkgray);
padding: 0.25rem 1rem;
border-radius: 0.5rem;
padding-bottom: 0.5rem;
}
article :global(h4) {
margin-bottom: 0.5rem;
margin-right: 3rem;
word-wrap: normal;
color: white;
padding: 0.25rem 0.75rem;
max-width: max-content;
background-color: var(--c-darkgray);
padding: 0.25rem 1rem;
border-radius: 0.5rem;
padding-bottom: 0.5rem;
}
article :global(a) {
color: #dcb7ff;
text-decoration: none;
font-style: italic;
}
article {
color: white;
margin: 0.5rem 3rem 0.5rem 3rem;
font-size: 1.1em;
padding-bottom: 5rem;
}
article :global(.astro-code) {
width: auto;
padding: 1rem 1rem 1rem 2rem;
}
article :global(code) {
font-weight: bold;
color: orange;
}
@media (min-width: 1000px) {
article {
margin-left: 10rem;
margin-right: 10rem;
}
h1 {
margin-left: 10rem;
margin-right: 10rem;
}
p {
margin-left: 10rem;
margin-right: 10rem;
}
}
@media (min-width: 1500px) {
article {
margin-left: 20rem;
margin-right: 20rem;
}
h1 {
margin-left: 20rem;
margin-right: 20rem;
}
p {
margin-left: 20rem;
margin-right: 20rem;
}
}
</style>