230 lines
5.1 KiB
Plaintext
230 lines
5.1 KiB
Plaintext
---
|
|
interface Props {
|
|
term: string;
|
|
definitionShort: string;
|
|
displayFamily: string;
|
|
displayDomain?: string;
|
|
displayLevel?: string;
|
|
mobilizedAuthors?: string[];
|
|
comparisonTraditions?: string[];
|
|
}
|
|
|
|
const {
|
|
term,
|
|
definitionShort,
|
|
displayFamily,
|
|
displayDomain = "",
|
|
displayLevel = "",
|
|
mobilizedAuthors = [],
|
|
comparisonTraditions = [],
|
|
} = Astro.props;
|
|
|
|
const hasScholarlyMeta =
|
|
mobilizedAuthors.length > 0 ||
|
|
comparisonTraditions.length > 0;
|
|
---
|
|
|
|
<header class="glossary-entry-head" data-ge-hero>
|
|
<div class="glossary-entry-head__title">
|
|
<h1>{term}</h1>
|
|
</div>
|
|
|
|
<div class="glossary-entry-summary">
|
|
<p class="glossary-entry-dek">
|
|
<em>{definitionShort}</em>
|
|
</p>
|
|
|
|
<div class="glossary-entry-signals" aria-label="Repères de lecture">
|
|
<span class="glossary-pill glossary-pill--family">
|
|
<strong>Famille :</strong> {displayFamily}
|
|
</span>
|
|
|
|
{displayDomain && (
|
|
<span class="glossary-pill">
|
|
<strong>Domaine :</strong> {displayDomain}
|
|
</span>
|
|
)}
|
|
|
|
{displayLevel && (
|
|
<span class="glossary-pill">
|
|
<strong>Niveau :</strong> {displayLevel}
|
|
</span>
|
|
)}
|
|
</div>
|
|
|
|
{hasScholarlyMeta && (
|
|
<div class="glossary-entry-meta">
|
|
{mobilizedAuthors.length > 0 && (
|
|
<p>
|
|
<strong>Auteurs mobilisés :</strong> {mobilizedAuthors.join(" / ")}
|
|
</p>
|
|
)}
|
|
|
|
{comparisonTraditions.length > 0 && (
|
|
<p>
|
|
<strong>Traditions de comparaison :</strong> {comparisonTraditions.join(" / ")}
|
|
</p>
|
|
)}
|
|
</div>
|
|
)}
|
|
</div>
|
|
</header>
|
|
|
|
<style>
|
|
.glossary-entry-head{
|
|
position: sticky;
|
|
top: calc(var(--sticky-header-h, 0px) + var(--page-gap, 12px));
|
|
z-index: 11;
|
|
margin: 0 0 24px;
|
|
border: 1px solid rgba(127,127,127,0.18);
|
|
border-radius: 28px;
|
|
background:
|
|
linear-gradient(180deg, rgba(0,0,0,0.60), rgba(0,0,0,0.92)),
|
|
radial-gradient(900px 240px at 20% 0%, rgba(0,217,255,0.08), transparent 60%);
|
|
backdrop-filter: blur(10px);
|
|
-webkit-backdrop-filter: blur(10px);
|
|
overflow: hidden;
|
|
transition:
|
|
border-radius 180ms ease,
|
|
box-shadow 180ms ease,
|
|
border-color 180ms ease;
|
|
}
|
|
|
|
.glossary-entry-head__title{
|
|
padding:
|
|
var(--entry-hero-pad-top, 18px)
|
|
var(--entry-hero-pad-x, 18px)
|
|
calc(var(--entry-hero-pad-top, 18px) - 2px);
|
|
transition: padding 180ms ease;
|
|
}
|
|
|
|
.glossary-entry-head h1{
|
|
margin: 0;
|
|
font-size: var(--entry-hero-h1-size, clamp(2.2rem, 4vw, 3.15rem));
|
|
line-height: 1.02;
|
|
letter-spacing: -.04em;
|
|
font-weight: 850;
|
|
transition: font-size 180ms ease;
|
|
}
|
|
|
|
.glossary-entry-summary{
|
|
display: grid;
|
|
gap: var(--entry-hero-gap, 14px);
|
|
padding:
|
|
calc(var(--entry-hero-pad-bottom, 18px) - 2px)
|
|
var(--entry-hero-pad-x, 18px)
|
|
var(--entry-hero-pad-bottom, 18px);
|
|
border-top: 1px solid rgba(127,127,127,0.14);
|
|
background: rgba(255,255,255,0.02);
|
|
transition: gap 180ms ease, padding 180ms ease;
|
|
}
|
|
|
|
.glossary-entry-dek{
|
|
margin: 0;
|
|
max-width: var(--entry-hero-dek-maxw, 76ch);
|
|
font-size: var(--entry-hero-dek-size, 1.04rem);
|
|
line-height: var(--entry-hero-dek-lh, 1.55);
|
|
opacity: .94;
|
|
transition:
|
|
max-width 180ms ease,
|
|
font-size 180ms ease,
|
|
line-height 180ms ease;
|
|
}
|
|
|
|
.glossary-entry-signals{
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin: 0;
|
|
transition: gap 180ms ease;
|
|
}
|
|
|
|
.glossary-pill{
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 5px 10px;
|
|
border: 1px solid rgba(127,127,127,0.24);
|
|
border-radius: 999px;
|
|
background: rgba(127,127,127,0.05);
|
|
font-size: 13px;
|
|
line-height: 1.35;
|
|
transition:
|
|
padding 180ms ease,
|
|
font-size 180ms ease,
|
|
background 120ms ease,
|
|
border-color 120ms ease;
|
|
}
|
|
|
|
.glossary-pill--family{
|
|
border-color: rgba(127,127,127,0.36);
|
|
font-weight: 700;
|
|
}
|
|
|
|
.glossary-entry-meta{
|
|
margin: 0;
|
|
padding: 10px 12px;
|
|
border: 1px solid rgba(127,127,127,0.18);
|
|
border-radius: 12px;
|
|
background: rgba(127,127,127,0.04);
|
|
max-height: var(--entry-hero-meta-max-h, 12rem);
|
|
opacity: var(--entry-hero-meta-opacity, 1);
|
|
overflow: hidden;
|
|
transition:
|
|
max-height 180ms ease,
|
|
opacity 140ms ease,
|
|
padding 180ms ease,
|
|
border-color 180ms ease;
|
|
}
|
|
|
|
.glossary-entry-meta p{
|
|
margin: 0;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.glossary-entry-meta p + p{
|
|
margin-top: 6px;
|
|
}
|
|
|
|
@media (max-width: 720px){
|
|
.glossary-entry-signals{
|
|
gap: 6px;
|
|
}
|
|
|
|
.glossary-pill{
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 860px){
|
|
.glossary-entry-head{
|
|
position: static;
|
|
border-radius: 22px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.glossary-entry-head__title{
|
|
padding: 14px 14px 12px;
|
|
}
|
|
|
|
.glossary-entry-summary{
|
|
gap: 12px;
|
|
padding: 14px;
|
|
}
|
|
|
|
.glossary-entry-dek{
|
|
max-width: none;
|
|
}
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark){
|
|
.glossary-entry-meta{
|
|
background: rgba(255,255,255,0.03);
|
|
}
|
|
|
|
.glossary-pill{
|
|
background: rgba(255,255,255,0.04);
|
|
}
|
|
}
|
|
</style> |