diff --git a/public/fonts/atkinson-bold.woff b/public/fonts/atkinson-bold.woff deleted file mode 100644 index e7f8977..0000000 Binary files a/public/fonts/atkinson-bold.woff and /dev/null differ diff --git a/public/fonts/atkinson-regular.woff b/public/fonts/atkinson-regular.woff deleted file mode 100644 index bbe09c5..0000000 Binary files a/public/fonts/atkinson-regular.woff and /dev/null differ diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index a0f9a7c..f2e3fb6 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -30,9 +30,6 @@ const { title, description, image = FallbackImage } = Astro.props; /> - - - diff --git a/src/components/CarteProjet.astro b/src/components/CarteProjet.astro new file mode 100644 index 0000000..376e1f5 --- /dev/null +++ b/src/components/CarteProjet.astro @@ -0,0 +1,33 @@ +--- +import type { CollectionEntry } from 'astro:content'; +import { Image } from 'astro:assets'; +import { urlProjet, tagsProjet } from '../utils/projets'; + +interface Props { + projet: CollectionEntry<'projets'>; + numero: number; +} + +const { projet, numero } = Astro.props; +const { titre, resume, date, image, imageAlt } = projet.data; +const tags = tagsProjet(projet); +const dateTexte = date.toLocaleDateString('fr-FR', { month: 'short', year: 'numeric' }); +--- +
t.id).join(" ")}> +
+ ({String(numero).padStart(2, '0')}) + +
+ {image && ( + {imageAlt + )} +

{titre}

+

{resume}

+ {tags.length > 0 && } +
diff --git a/src/components/FiltresProjets.astro b/src/components/FiltresProjets.astro new file mode 100644 index 0000000..07210bb --- /dev/null +++ b/src/components/FiltresProjets.astro @@ -0,0 +1,44 @@ +--- +import type { CollectionEntry } from 'astro:content'; +import CarteProjet from './CarteProjet.astro'; +import type { Rubrique } from '../consts'; +import { tagsPresents } from '../utils/projets'; + +interface Props { + rubrique: Rubrique; + projets: CollectionEntry<'projets'>[]; + legende?: string; +} + +const { rubrique, projets, legende } = Astro.props; +const id = `projets-${rubrique}`; +const tags = tagsPresents(rubrique, projets); + +const actif = 'background: var(--encre); color: var(--papier); border-color: var(--encre);'; +const regles = [ + `#${id}:not(:has(.ancre:target:not(.ancre-tout))) .tout { ${actif} }`, + ...tags.flatMap((t) => [ + `#${id}:has(#${id}-${t.id}:target) .planche:not([data-tags~="${t.id}"]) { display: none; }`, + `#${id}:has(#${id}-${t.id}:target) a[href="#${id}-${t.id}"] { ${actif} }`, + ]), +].join('\n'); +--- +
+ {tags.length > 0 && ( + + )} +
+ {projets.map((p, i) => )} +
+ ${regles}`} /> +
diff --git a/src/components/Footer.astro b/src/components/Footer.astro index e63f14a..52bc207 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,62 +1,9 @@ --- -const today = new Date(); +import { CONTACT_EMAIL } from '../consts'; +const annee = new Date().getFullYear(); --- - -