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

151 lines
3.2 KiB
Text
Raw Normal View History

2023-03-08 19:53:38 +00:00
---
2024-07-19 20:52:15 +00:00
import SmallTitle from '../components/titles/smallTitle.astro'
2023-03-09 10:44:18 +00:00
import Layout from './Layout.astro'
const { frontmatter } = Astro.props
2023-03-08 19:53:38 +00:00
2023-03-09 10:44:18 +00:00
const title = `${frontmatter.title} - Firq FGO Site`
const description = frontmatter.description
2023-03-08 19:53:38 +00:00
const options_date: Intl.DateTimeFormatOptions = {
2023-03-09 10:44:18 +00:00
year: 'numeric',
month: 'long',
day: '2-digit',
2023-03-08 19:53:38 +00:00
}
2023-03-09 10:44:18 +00:00
const date = new Date(frontmatter.pubDate).toLocaleDateString(
'en-GB',
options_date
)
2024-07-19 20:52:15 +00:00
const subtext = `Written by ${frontmatter.author} • Published on ${date}`
2023-03-08 19:53:38 +00:00
---
<Layout title={title} currentpage="blog" descriptionOverride={description}>
2024-07-19 20:52:15 +00:00
<SmallTitle maintext={frontmatter.title} subtext={subtext} fadeout={true} returnbutton={true} baseurl='blog'/>
2023-03-09 10:44:18 +00:00
<div>
<article>
<slot />
</article>
</div>
2023-03-08 19:53:38 +00:00
</Layout>
<style>
2023-03-10 18:22:05 +00:00
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;
}
2023-03-09 10:44:18 +00:00
h1 {
2023-07-08 13:02:07 +00:00
font-size: 34px;
line-height: 40px;
letter-spacing: -1px;
2023-03-09 10:44:18 +00:00
color: white;
margin: 0.5rem 3rem 0.5rem 3rem;
padding: 0.25rem 0.75rem;
max-width: max-content;
background-color: var(--c-darkgray);
2023-07-08 13:02:07 +00:00
padding: 0.25rem 1rem;
border-radius: 0.5rem;
padding-bottom: 0.5rem;
2023-03-09 10:44:18 +00:00
}
p {
color: white;
margin: 0.5rem 3rem 0.5rem 3rem;
padding: 0.25rem 0.75rem;
2023-03-09 15:03:04 +00:00
max-width: max-content;
2023-03-09 10:44:18 +00:00
background-color: var(--c-gray);
2023-07-08 13:02:07 +00:00
border-radius: 0.5rem;
padding-bottom: 0.5rem;
2023-03-09 10:44:18 +00:00
}
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);
2023-07-08 13:02:07 +00:00
padding: 0.25rem 1rem;
border-radius: 0.5rem;
padding-bottom: 0.5rem;
2023-03-09 10:44:18 +00:00
}
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);
2023-07-08 13:02:07 +00:00
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);
2023-07-08 13:02:07 +00:00
padding: 0.25rem 1rem;
border-radius: 0.5rem;
padding-bottom: 0.5rem;
}
2023-03-09 10:44:18 +00:00
article :global(a) {
2023-05-09 18:52:34 +00:00
color: #dcb7ff;
2023-03-09 10:44:18 +00:00
text-decoration: none;
2023-05-09 18:52:34 +00:00
font-style: italic;
2023-03-09 10:44:18 +00:00
}
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;
}
2023-07-08 13:02:07 +00:00
@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;
}
}
2023-03-09 10:44:18 +00:00
@media (min-width: 1500px) {
2023-03-08 19:53:38 +00:00
article {
2023-07-08 13:02:07 +00:00
margin-left: 20rem;
margin-right: 20rem;
2023-03-08 19:53:38 +00:00
}
2023-03-09 10:44:18 +00:00
h1 {
2023-07-08 13:02:07 +00:00
margin-left: 20rem;
margin-right: 20rem;
2023-03-08 19:53:38 +00:00
}
2023-03-09 10:44:18 +00:00
p {
2023-07-08 13:02:07 +00:00
margin-left: 20rem;
margin-right: 20rem;
2023-03-08 20:08:27 +00:00
}
2023-03-09 10:44:18 +00:00
}
2023-03-08 23:09:07 +00:00
</style>