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

86 lines
1.5 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;
line-height: 48px;
letter-spacing: -1px;
2024-10-24 18:52:33 +02:00
color: var(--c-primary-text);
2023-03-16 23:29:16 +01:00
margin-bottom: 0;
margin-left: auto;
margin-right: auto;
max-width: max-content;
2023-07-08 14:38:36 +02:00
border-radius: 0.5rem;
padding-bottom: 0.5rem;
2023-03-09 11:44:18 +01:00
}
2024-10-25 15:26:25 +02:00
h1:after {
content:' ';
display: block;
width: 62.5%;
margin: auto;
border: 2px solid var(--c-accent-1);
box-shadow:inset 0 1px 1px rgba(0, 0, 0, .05);
}
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>