Compare commits
5 Commits
feat/gloss
...
dbd1e14e4e
| Author | SHA1 | Date | |
|---|---|---|---|
| dbd1e14e4e | |||
| 7033354011 | |||
| 7345730e3c | |||
| cea94c56db | |||
| c1e24736e3 |
@@ -7,12 +7,15 @@ interface Props {
|
||||
}
|
||||
|
||||
const { relationBlocks = [] } = Astro.props;
|
||||
const relationsHeadingId = "relations-conceptuelles";
|
||||
---
|
||||
|
||||
{relationBlocks.length > 0 && (
|
||||
<section class="glossary-relations" aria-label="Relations conceptuelles">
|
||||
<h2>Relations conceptuelles</h2>
|
||||
|
||||
<section
|
||||
class="glossary-relations"
|
||||
aria-labelledby={relationsHeadingId}
|
||||
>
|
||||
<h2 id={relationsHeadingId}>Relations conceptuelles</h2>
|
||||
<div class="glossary-relations-grid">
|
||||
{relationBlocks.map((block) => (
|
||||
<section class={`glossary-relations-card ${block.className}`}>
|
||||
|
||||
@@ -1500,6 +1500,7 @@ const WHOAMI_FORCE_LOCALHOST = (import.meta.env.PUBLIC_WHOAMI_FORCE_LOCALHOST ??
|
||||
.filter(Boolean);
|
||||
|
||||
const h2Plain = Array.from(reading.querySelectorAll("h2[id]"))
|
||||
.filter((h2) => !h2.closest("details.details-section"))
|
||||
.map((h2) => ({
|
||||
id: h2.id,
|
||||
anchor: h2,
|
||||
@@ -1508,7 +1509,7 @@ const WHOAMI_FORCE_LOCALHOST = (import.meta.env.PUBLIC_WHOAMI_FORCE_LOCALHOST ??
|
||||
h2,
|
||||
}));
|
||||
|
||||
const H2 = (h2Anchors.length ? h2Anchors : h2Plain)
|
||||
const H2 = [...h2Anchors, ...h2Plain]
|
||||
.slice()
|
||||
.sort((a, b) => absTop(a.marker) - absTop(b.marker));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user