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

148 lines
2.9 KiB
Text
Raw Normal View History

2023-03-08 20:53:38 +01:00
---
export interface Props {
2023-03-09 11:44:18 +01:00
title: string
2024-07-19 22:52:15 +02:00
titlehidden?: boolean
displayLine?: boolean
2023-03-08 20:53:38 +01:00
}
2024-07-19 22:52:15 +02:00
const { title, titlehidden, displayLine } = Astro.props
const display = titlehidden ? "display: none" : ""
const line = displayLine ? "flex" : "none"
2023-03-08 20:53:38 +01:00
---
<section>
2024-07-19 22:52:15 +02:00
<h1 style={display}>{title}</h1>
2023-03-14 21:16:19 +01:00
<div class="wrapper">
2024-07-19 22:52:15 +02:00
<div class="start hightlighter"></div>
2023-03-14 20:34:51 +01:00
<div class="line"></div>
2023-03-09 11:44:18 +01:00
<slot />
2024-07-19 22:52:15 +02:00
<div class="drop hightlighter"></div>
2023-03-09 11:44:18 +01:00
</div>
2023-03-08 20:53:38 +01:00
</section>
2024-07-19 22:52:15 +02:00
<style define:vars={{ line }}>
section {
padding-left: 0.25em;
padding-right: 0.25em;
padding-bottom: 5rem;
}
.hightlighter {
left: 0;
right: 0;
2023-03-14 20:34:51 +01:00
display: flex;
position: absolute;
visibility: visible;
margin-left: auto;
margin-right: auto;
height: 1.5rem;
width: 1.5rem;
2024-07-19 22:52:15 +02:00
}
.drop {
bottom: -5rem;
2023-03-14 20:34:51 +01:00
border-radius: 0% 50% 50% 50%;
transform: rotate(45deg);
2024-10-24 18:52:33 +02:00
background-color: var(--c-accent-1);
2023-03-14 20:34:51 +01:00
}
2024-07-19 22:52:15 +02:00
.start {
top: -2rem;
border-radius: 40%;
border-style: solid;
border-width: 0.25rem;
2024-10-24 18:52:33 +02:00
border-color: var(--c-secondary-background);
background-color: var(--c-accent-1);
2024-07-19 22:52:15 +02:00
}
2023-03-14 20:34:51 +01:00
.line {
display: flex;
position: absolute;
visibility: visible;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
2024-10-24 18:52:33 +02:00
background-color: var(--c-accent-1);
height: calc(100% + 5rem);
translate: 0% 2rem;
2023-03-14 20:34:51 +01:00
width: 0.25rem;
z-index: -1;
}
2023-03-09 11:44:18 +01:00
h1 {
2023-07-08 14:47:15 +02:00
line-height: 48px;
letter-spacing: -1px;
2024-10-24 18:52:33 +02:00
color: var(--c-primary-text);
2024-07-19 22:52:15 +02:00
font-size: 1.6rem;
2023-03-16 23:29:16 +01:00
margin-top: 1rem;
margin-bottom: 0;
margin-left: auto;
margin-right: auto;
2023-03-14 20:58:58 +01:00
max-width: max-content;
2024-10-24 18:52:33 +02:00
background-color: var(--c-primary-background);
2023-07-08 14:47:15 +02:00
padding: 0.25rem 1.5rem;
border-radius: 0.5rem;
padding-bottom: 0.5rem;
2024-07-19 22:52:15 +02:00
justify-self: center;
text-align: center;
2023-03-09 11:44:18 +01:00
}
2023-03-14 21:16:19 +01:00
.wrapper {
2024-07-19 22:52:15 +02:00
margin: 2rem 2rem 0.5rem 2rem;
2023-03-09 11:44:18 +01:00
display: flex;
2023-03-14 20:34:51 +01:00
flex-flow: column wrap;
2023-03-09 11:44:18 +01:00
row-gap: 1em;
column-gap: 1em;
align-self: center;
align-items: stretch;
2024-07-19 22:52:15 +02:00
align-content: center;
2023-03-09 11:44:18 +01:00
justify-content: space-around;
2025-04-07 23:17:32 +02:00
padding: 1em 0px;
2024-10-24 18:52:33 +02:00
color: var(--c-primary-text);
2023-03-09 11:44:18 +01:00
font-size: 1em;
2023-03-14 20:34:51 +01:00
position: relative;
2023-03-09 11:44:18 +01:00
}
2023-03-15 00:58:54 +01:00
@media (min-width: 900px) {
.drop {
margin-left: 1.5rem;
}
2024-07-19 22:52:15 +02:00
.start {
margin-left: 1.25rem;
}
2023-03-15 00:58:54 +01:00
.line {
margin-left: 2.1rem;
}
2023-12-25 20:06:16 +01:00
h1 {
margin-left: 3rem;
2024-07-19 22:52:15 +02:00
font-size: 1.85rem;
2023-12-25 20:06:16 +01:00
}
2025-04-07 23:17:32 +02:00
.wrapper {
padding: 1em;
}
2023-03-14 20:34:51 +01:00
}
2024-10-24 18:52:33 +02:00
@media (min-width: 1100px) {
2023-03-14 21:16:19 +01:00
.wrapper {
2024-10-24 18:52:33 +02:00
margin-left: 20%;
margin-right: 20%;
2024-07-19 22:52:15 +02:00
flex-direction: row;
}
section {
padding-bottom: unset;
}
.drop, .start, .line {
display: var(--line);
margin-left: 2rem;
}
.start {
margin-left: 1.75rem;
}
.line {
margin-left: 2.6rem;
height: calc(100% + 6rem);
translate: 0px -2rem;
2023-03-14 20:34:51 +01:00
}
h1 {
2024-07-19 22:52:15 +02:00
margin-left: 15rem;
margin-right: 15rem;
}
2023-03-09 11:44:18 +01:00
}
</style>