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

81 lines
1.3 KiB
Text
Raw Normal View History

---
export interface Props {
2023-03-09 11:44:18 +01:00
title: string
abovetext?: string
}
2023-03-09 11:44:18 +01:00
const { abovetext, title } = Astro.props
let h2text
2023-03-06 13:30:35 +01:00
if (abovetext === undefined) {
2023-03-09 11:44:18 +01:00
h2text =
'The full list of my completed TAs can be found on my Youtube channel.'
2023-03-06 13:30:35 +01:00
} else {
2023-03-11 19:59:51 +01:00
h2text = abovetext
2023-03-06 13:30:35 +01:00
}
---
2023-03-09 11:44:18 +01:00
2023-03-16 23:29:16 +01:00
<div class="base">
2023-03-09 11:44:18 +01:00
<h1>{title}</h1>
<h2>{h2text}</h2>
<div class="container ta-container">
<slot />
</div>
</div>
<style>
2023-03-09 11:44:18 +01:00
div > div {
display: flex;
2024-10-23 17:28:06 +02:00
position: relative;
2023-03-09 11:44:18 +01:00
flex-flow: row wrap;
2024-10-23 17:28:06 +02:00
row-gap: 1em;
column-gap: 1em;
justify-content: center;
align-self: center;
2023-03-09 11:44:18 +01:00
padding: 1em;
}
h1 {
2023-07-08 14:47:15 +02:00
font-size: 40px;
letter-spacing: -1px;
2024-10-24 18:52:33 +02:00
color: var(--c-primary-text);
2024-10-26 00:22:08 +02:00
margin: 0 auto 0px;
padding: 0.25rem 1.5rem 0.5rem;
max-width: max-content;
2024-10-26 00:22:08 +02:00
&:after {
content:' ';
display: block;
width: 65%;
height: 3px;
margin: auto;
background-color: var(--c-accent-1);
}
2024-10-25 15:26:25 +02:00
}
2023-03-09 11:44:18 +01:00
h2 {
2024-10-24 18:52:33 +02:00
color: var(--c-primary-text);
2023-03-09 11:44:18 +01:00
font-size: 16px;
2024-10-25 15:26:25 +02:00
font-weight: 400;
2023-03-09 11:44:18 +01:00
margin: 5;
line-height: 20px;
text-align: center;
}
2023-03-16 23:29:16 +01:00
.base {
2023-03-16 23:41:21 +01:00
margin-left: 1rem;
margin-right: 1rem;
}
@media (min-width: 1000px) {
.base {
margin-left: 3rem;
margin-right: 3rem;
}
2023-03-16 23:29:16 +01:00
}
@media (min-width: 1500px) {
.base {
margin-left: 10%;
margin-right: 10%;
}
}
2023-03-09 11:44:18 +01:00
</style>