feat(glossaire): harmonize portal pages with shared components
All checks were successful
SMOKE / smoke (push) Successful in 5s
CI / build-and-anchors (push) Successful in 47s
CI / build-and-anchors (pull_request) Successful in 46s

This commit is contained in:
2026-03-25 23:49:00 +01:00
parent 92e0ad01c6
commit f8e3ee4cca
13 changed files with 2508 additions and 5989 deletions

View File

@@ -0,0 +1,67 @@
---
interface Props {
id: string;
title: string;
count?: string;
intro?: string;
final?: boolean;
className?: string;
}
const {
id,
title,
count,
intro,
final = false,
className,
} = Astro.props;
---
<section class:list={["glossary-portal-section", final && "glossary-portal-section--final", className]}>
<div class="glossary-portal-section__head">
<h2 id={id}>{title}</h2>
{count && <span class="glossary-portal-section__count">{count}</span>}
</div>
{intro && <p class="glossary-portal-section__intro">{intro}</p>}
<slot />
</section>
<style>
.glossary-portal-section{
margin-top: 34px;
scroll-margin-top: calc(var(--sticky-offset-px, 96px) + 28px);
}
.glossary-portal-section h2{
scroll-margin-top: calc(var(--sticky-offset-px, 96px) + 28px);
}
.glossary-portal-section__head{
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
margin-bottom: 10px;
position: static;
}
.glossary-portal-section__count{
font-size: 13px;
opacity: .72;
white-space: nowrap;
}
.glossary-portal-section__intro{
max-width: 78ch;
margin: 0;
opacity: .92;
}
.glossary-portal-section--final{
margin-top: 42px;
}
</style>