firq-dev-website/src/layouts/taSection.astro
2024-10-26 00:22:08 +02:00

80 lines
1.3 KiB
Text

---
export interface Props {
title: string
abovetext?: string
}
const { abovetext, title } = Astro.props
let h2text
if (abovetext === undefined) {
h2text =
'The full list of my completed TAs can be found on my Youtube channel.'
} else {
h2text = abovetext
}
---
<div class="base">
<h1>{title}</h1>
<h2>{h2text}</h2>
<div class="container ta-container">
<slot />
</div>
</div>
<style>
div > div {
display: flex;
position: relative;
flex-flow: row wrap;
row-gap: 1em;
column-gap: 1em;
justify-content: center;
align-self: center;
padding: 1em;
}
h1 {
font-size: 40px;
letter-spacing: -1px;
color: var(--c-primary-text);
margin: 0 auto 0px;
padding: 0.25rem 1.5rem 0.5rem;
max-width: max-content;
&:after {
content:' ';
display: block;
width: 65%;
height: 3px;
margin: auto;
background-color: var(--c-accent-1);
}
}
h2 {
color: var(--c-primary-text);
font-size: 16px;
font-weight: 400;
margin: 5;
line-height: 20px;
text-align: center;
}
.base {
margin-left: 1rem;
margin-right: 1rem;
}
@media (min-width: 1000px) {
.base {
margin-left: 3rem;
margin-right: 3rem;
}
}
@media (min-width: 1500px) {
.base {
margin-left: 10%;
margin-right: 10%;
}
}
</style>