feat(site): design fiche technique, rubriques, filtres par tags, à propos et contact
This commit is contained in:
1 parent
693f30bca3
commit
dd66a63029
26 files changed
+671
-379
No files matched your search
Binary file not shown.
Binary file not shown.
@@ -30,9 +30,6 @@ const { title, description, image = FallbackImage } = Astro.props;
|
|||||||
/>
|
/>
|
||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
|
|
||||||
<!-- Font preloads -->
|
|
||||||
<link rel="preload" href="/fonts/atkinson-regular.woff" as="font" type="font/woff" crossorigin />
|
|
||||||
<link rel="preload" href="/fonts/atkinson-bold.woff" as="font" type="font/woff" crossorigin />
|
|
||||||
|
|
||||||
<!-- Canonical URL -->
|
<!-- Canonical URL -->
|
||||||
<link rel="canonical" href={canonicalURL} />
|
<link rel="canonical" href={canonicalURL} />
|
||||||
|
|||||||
@@ -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' });
|
||||||
|
---
|
||||||
|
<article class="planche" data-tags={tags.map((t) => t.id).join(" ")}>
|
||||||
|
<div class="planche-haut etiquette">
|
||||||
|
<span>({String(numero).padStart(2, '0')})</span>
|
||||||
|
<time datetime={date.toISOString()}>{dateTexte}</time>
|
||||||
|
</div>
|
||||||
|
{image && (
|
||||||
|
<Image
|
||||||
|
src={image}
|
||||||
|
alt={imageAlt ?? ''}
|
||||||
|
class="planche-image"
|
||||||
|
widths={[400, 800]}
|
||||||
|
sizes="(min-width: 52rem) 20rem, 100vw"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<h3><a href={urlProjet(projet)}>{titre}</a></h3>
|
||||||
|
<p>{resume}</p>
|
||||||
|
{tags.length > 0 && <ul class="tags">{tags.map((t) => <li>{t.label}</li>)}</ul>}
|
||||||
|
</article>
|
||||||
@@ -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');
|
||||||
|
---
|
||||||
|
<div class="zone-projets" id={id}>
|
||||||
|
{tags.length > 0 && (
|
||||||
|
<nav class="filtres" aria-label={legende ?? 'Filtrer les projets'}>
|
||||||
|
{legende && <p class="etiquette">{legende}</p>}
|
||||||
|
<span class="ancre ancre-tout" id={`${id}-tout`}></span>
|
||||||
|
{tags.map((t) => <span class="ancre" id={`${id}-${t.id}`}></span>)}
|
||||||
|
<ul>
|
||||||
|
<li><a class="tout" href={`#${id}-tout`}>Tout</a></li>
|
||||||
|
{tags.map((t) => (
|
||||||
|
<li><a href={`#${id}-${t.id}`}>{t.label}</a></li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
)}
|
||||||
|
<div class="planches">
|
||||||
|
{projets.map((p, i) => <CarteProjet projet={p} numero={projets.length - i} />)}
|
||||||
|
</div>
|
||||||
|
<Fragment set:html={`<style>${regles}</style>`} />
|
||||||
|
</div>
|
||||||
@@ -1,62 +1,9 @@
|
|||||||
---
|
---
|
||||||
const today = new Date();
|
import { CONTACT_EMAIL } from '../consts';
|
||||||
|
const annee = new Date().getFullYear();
|
||||||
---
|
---
|
||||||
|
<footer class="pied">
|
||||||
<footer>
|
<p>
|
||||||
© {today.getFullYear()} Lucas Royer. All rights reserved.
|
© {annee} Lucas Royer EI{' · '}<a href={`mailto:${CONTACT_EMAIL}`}>{CONTACT_EMAIL}</a>{' · '}<a href="/mentions-legales/">Mentions légales</a>
|
||||||
<div class="social-links">
|
</p>
|
||||||
<a href="https://m.webtoo.ls/@astro" target="_blank">
|
|
||||||
<span class="sr-only">Follow Astro on Mastodon</span>
|
|
||||||
<svg
|
|
||||||
viewBox="0 0 16 16"
|
|
||||||
aria-hidden="true"
|
|
||||||
width="32"
|
|
||||||
height="32"
|
|
||||||
astro-icon="social/mastodon"
|
|
||||||
><path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765c0 0-2.285 1.017-2.285 4.488l-.002.662c-.004.64-.007 1.35.011 2.091.083 3.394.626 6.74 3.78 7.57 1.454.383 2.703.463 3.709.408 1.823-.1 2.847-.647 2.847-.647l-.06-1.317s-1.303.41-2.767.36c-1.45-.05-2.98-.156-3.215-1.928a3.614 3.614 0 0 1-.033-.496s1.424.346 3.228.428c1.103.05 2.137-.064 3.188-.189zm1.613-2.47H11.13v-4.08c0-.859-.364-1.295-1.091-1.295-.804 0-1.207.517-1.207 1.541v2.233H7.168V5.89c0-1.024-.403-1.541-1.207-1.541-.727 0-1.091.436-1.091 1.296v4.079H3.197V5.522c0-.859.22-1.541.66-2.046.456-.505 1.052-.764 1.793-.764.856 0 1.504.328 1.933.983L8 4.39l.417-.695c.429-.655 1.077-.983 1.934-.983.74 0 1.336.259 1.791.764.442.505.661 1.187.661 2.046v4.203z"
|
|
||||||
></path></svg
|
|
||||||
>
|
|
||||||
</a>
|
|
||||||
<a href="https://twitter.com/astrodotbuild" target="_blank">
|
|
||||||
<span class="sr-only">Follow Astro on Twitter</span>
|
|
||||||
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32" astro-icon="social/twitter"
|
|
||||||
><path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"
|
|
||||||
></path></svg
|
|
||||||
>
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/withastro/astro" target="_blank">
|
|
||||||
<span class="sr-only">Go to Astro's GitHub repo</span>
|
|
||||||
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32" astro-icon="social/github"
|
|
||||||
><path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"
|
|
||||||
></path></svg
|
|
||||||
>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
<style>
|
|
||||||
footer {
|
|
||||||
padding: 2em 1em 6em 1em;
|
|
||||||
background: linear-gradient(var(--gray-gradient)) no-repeat;
|
|
||||||
color: rgb(var(--gray));
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.social-links {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 1em;
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
.social-links a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: rgb(var(--gray));
|
|
||||||
}
|
|
||||||
.social-links a:hover {
|
|
||||||
color: rgb(var(--gray-dark));
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
+33
-80
@@ -1,85 +1,38 @@
|
|||||||
---
|
---
|
||||||
import { SITE_TITLE } from '../consts';
|
|
||||||
import HeaderLink from './HeaderLink.astro';
|
import HeaderLink from './HeaderLink.astro';
|
||||||
---
|
---
|
||||||
|
<header class="entete">
|
||||||
<header>
|
<nav aria-label="Navigation principale">
|
||||||
<nav>
|
<a class="logo" href="/">lucas royer<span aria-hidden="true">_</span></a>
|
||||||
<h2><a href="/">{SITE_TITLE}</a></h2>
|
<ul>
|
||||||
<div class="internal-links">
|
<li><HeaderLink href="/">Accueil</HeaderLink></li>
|
||||||
<HeaderLink href="/">Accueil</HeaderLink>
|
<li><HeaderLink href="/realisations">Réalisations</HeaderLink></li>
|
||||||
<HeaderLink href="/projets">Projets</HeaderLink>
|
<li><HeaderLink href="/atelier">Atelier</HeaderLink></li>
|
||||||
<HeaderLink href="/a-propos">À propos</HeaderLink>
|
<li><HeaderLink href="/a-propos">À propos</HeaderLink></li>
|
||||||
</div>
|
<li><HeaderLink href="/contact">Contact</HeaderLink></li>
|
||||||
<div class="social-links">
|
</ul>
|
||||||
<a href="https://m.webtoo.ls/@astro" target="_blank">
|
<button class="bascule" type="button" aria-label="Basculer entre mode clair et mode sombre" title="Mode clair / sombre">
|
||||||
<span class="sr-only">Follow Astro on Mastodon</span>
|
<svg class="icone-lune" viewBox="0 0 24 24" width="18" height="18" aria-hidden="true">
|
||||||
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
|
<path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z" />
|
||||||
><path
|
</svg>
|
||||||
fill="currentColor"
|
<svg class="icone-soleil" viewBox="0 0 24 24" width="18" height="18" aria-hidden="true">
|
||||||
d="M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765c0 0-2.285 1.017-2.285 4.488l-.002.662c-.004.64-.007 1.35.011 2.091.083 3.394.626 6.74 3.78 7.57 1.454.383 2.703.463 3.709.408 1.823-.1 2.847-.647 2.847-.647l-.06-1.317s-1.303.41-2.767.36c-1.45-.05-2.98-.156-3.215-1.928a3.614 3.614 0 0 1-.033-.496s1.424.346 3.228.428c1.103.05 2.137-.064 3.188-.189zm1.613-2.47H11.13v-4.08c0-.859-.364-1.295-1.091-1.295-.804 0-1.207.517-1.207 1.541v2.233H7.168V5.89c0-1.024-.403-1.541-1.207-1.541-.727 0-1.091.436-1.091 1.296v4.079H3.197V5.522c0-.859.22-1.541.66-2.046.456-.505 1.052-.764 1.793-.764.856 0 1.504.328 1.933.983L8 4.39l.417-.695c.429-.655 1.077-.983 1.934-.983.74 0 1.336.259 1.791.764.442.505.661 1.187.661 2.046v4.203z"
|
<circle cx="12" cy="12" r="4" />
|
||||||
></path></svg
|
<path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" />
|
||||||
>
|
</svg>
|
||||||
</a>
|
</button>
|
||||||
<a href="https://twitter.com/astrodotbuild" target="_blank">
|
</nav>
|
||||||
<span class="sr-only">Follow Astro on Twitter</span>
|
|
||||||
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
|
|
||||||
><path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"
|
|
||||||
></path></svg
|
|
||||||
>
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/withastro/astro" target="_blank">
|
|
||||||
<span class="sr-only">Go to Astro's GitHub repo</span>
|
|
||||||
<svg viewBox="0 0 16 16" aria-hidden="true" width="32" height="32"
|
|
||||||
><path
|
|
||||||
fill="currentColor"
|
|
||||||
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"
|
|
||||||
></path></svg
|
|
||||||
>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</header>
|
</header>
|
||||||
<style>
|
|
||||||
header {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0 1em;
|
|
||||||
background: white;
|
|
||||||
box-shadow: 0 2px 8px rgba(var(--black), 5%);
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 a,
|
<script>
|
||||||
h2 a.active {
|
const bouton = document.querySelector<HTMLButtonElement>('.bascule');
|
||||||
text-decoration: none;
|
bouton?.addEventListener('click', () => {
|
||||||
}
|
const racine = document.documentElement;
|
||||||
nav {
|
const suivant = racine.dataset.theme === 'dark' ? 'light' : 'dark';
|
||||||
display: flex;
|
racine.dataset.theme = suivant;
|
||||||
align-items: center;
|
try {
|
||||||
justify-content: space-between;
|
localStorage.setItem('theme', suivant);
|
||||||
}
|
} catch {
|
||||||
nav a {
|
/* stockage indisponible */
|
||||||
padding: 1em 0.5em;
|
}
|
||||||
color: var(--black);
|
});
|
||||||
border-bottom: 4px solid transparent;
|
</script>
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
nav a.active {
|
|
||||||
text-decoration: none;
|
|
||||||
border-bottom-color: var(--accent);
|
|
||||||
}
|
|
||||||
.social-links,
|
|
||||||
.social-links a {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
@media (max-width: 720px) {
|
|
||||||
.social-links {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -2,23 +2,14 @@
|
|||||||
import type { HTMLAttributes } from 'astro/types';
|
import type { HTMLAttributes } from 'astro/types';
|
||||||
|
|
||||||
type Props = HTMLAttributes<'a'>;
|
type Props = HTMLAttributes<'a'>;
|
||||||
|
|
||||||
const { href, class: className, ...props } = Astro.props;
|
const { href, class: className, ...props } = Astro.props;
|
||||||
const pathname = Astro.url.pathname.replace(import.meta.env.BASE_URL, '');
|
const pathname = Astro.url.pathname.replace(import.meta.env.BASE_URL, '');
|
||||||
const subpath = pathname.match(/[^\/]+/g);
|
const subpath = pathname.match(/[^\/]+/g);
|
||||||
const isActive = href === pathname || href === '/' + (subpath?.[0] || '');
|
const isActive = href === pathname || href === '/' + (subpath?.[0] || '');
|
||||||
---
|
---
|
||||||
|
<a
|
||||||
<a href={href} class:list={[className, { active: isActive }]} {...props}>
|
href={href}
|
||||||
<slot />
|
class:list={[className, { active: isActive }]}
|
||||||
</a>
|
aria-current={isActive ? 'page' : undefined}
|
||||||
<style>
|
{...props}
|
||||||
a {
|
><slot /></a>
|
||||||
display: inline-block;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
a.active {
|
|
||||||
font-weight: bolder;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,3 +1,40 @@
|
|||||||
export const SITE_TITLE = 'Lucas Royer';
|
export const SITE_TITLE = 'Lucas Royer';
|
||||||
export const SITE_DESCRIPTION = 'Infogérance et outils libres pour les associations et les petites structures.';
|
export const SITE_DESCRIPTION = 'Infogérance et outils libres pour les associations et les petites structures.';
|
||||||
export const CONTACT_EMAIL = 'bonjour@lucasroyer.fr';
|
export const CONTACT_EMAIL = 'bonjour@lucasroyer.fr';
|
||||||
|
|
||||||
|
export const BESOINS = {
|
||||||
|
sauvegardes: 'Sauvegardes et sécurité',
|
||||||
|
acces: 'Mots de passe et accès',
|
||||||
|
fichiers: 'Fichiers et messagerie',
|
||||||
|
automatisation: 'Automatisation',
|
||||||
|
materiel: 'Matériel et réemploi',
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type Besoin = keyof typeof BESOINS;
|
||||||
|
export const BESOINS_IDS = Object.keys(BESOINS) as [Besoin, ...Besoin[]];
|
||||||
|
|
||||||
|
export const DOMAINES = {
|
||||||
|
electronique: 'Électronique',
|
||||||
|
son: 'Son',
|
||||||
|
velo: 'Vélo',
|
||||||
|
logiciel: 'Logiciel',
|
||||||
|
fabrication: 'Fabrication',
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type Domaine = keyof typeof DOMAINES;
|
||||||
|
export const DOMAINES_IDS = Object.keys(DOMAINES) as [Domaine, ...Domaine[]];
|
||||||
|
|
||||||
|
export const RUBRIQUES = {
|
||||||
|
realisations: {
|
||||||
|
titre: 'Réalisations',
|
||||||
|
chapeau: 'Ce que j’ai mis en place pour des associations et des petites structures.',
|
||||||
|
filtre: 'besoin',
|
||||||
|
},
|
||||||
|
atelier: {
|
||||||
|
titre: 'Atelier',
|
||||||
|
chapeau: 'Ce que je construis pour le plaisir ou pour des collectifs : électronique, son, vélo, petits logiciels.',
|
||||||
|
filtre: 'domaine',
|
||||||
|
},
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type Rubrique = keyof typeof RUBRIQUES;
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { defineCollection } from 'astro:content';
|
import { defineCollection } from 'astro:content';
|
||||||
import { glob } from 'astro/loaders';
|
import { glob } from 'astro/loaders';
|
||||||
import { z } from 'astro/zod';
|
import { z } from 'astro/zod';
|
||||||
|
import { BESOINS_IDS, DOMAINES_IDS } from './consts';
|
||||||
|
|
||||||
const projets = defineCollection({
|
const projets = defineCollection({
|
||||||
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/projets' }),
|
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/projets' }),
|
||||||
@@ -10,6 +11,9 @@ const projets = defineCollection({
|
|||||||
resume: z.string().max(160),
|
resume: z.string().max(160),
|
||||||
date: z.coerce.date(),
|
date: z.coerce.date(),
|
||||||
categorie: z.enum(['client', 'atelier']),
|
categorie: z.enum(['client', 'atelier']),
|
||||||
|
client: z.string().optional(),
|
||||||
|
besoins: z.array(z.enum(BESOINS_IDS)).default([]),
|
||||||
|
domaines: z.array(z.enum(DOMAINES_IDS)).default([]),
|
||||||
technos: z.array(z.string()),
|
technos: z.array(z.string()),
|
||||||
image: image().optional(),
|
image: image().optional(),
|
||||||
imageAlt: z.string().optional(),
|
imageAlt: z.string().optional(),
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ titre: Karaoké mobile sur matrice LED
|
|||||||
resume: Une matrice LED de 256×32 pixels affiche en direct les paroles synchronisées de la musique jouée depuis un téléphone.
|
resume: Une matrice LED de 256×32 pixels affiche en direct les paroles synchronisées de la musique jouée depuis un téléphone.
|
||||||
date: 2025-06-01
|
date: 2025-06-01
|
||||||
categorie: atelier
|
categorie: atelier
|
||||||
|
domaines: [electronique, logiciel]
|
||||||
technos: [ESP32, matrice LED P5, Flutter, LRCLIB]
|
technos: [ESP32, matrice LED P5, Flutter, LRCLIB]
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ titre: Adhésions automatisées pour un atelier vélo associatif
|
|||||||
resume: Un formulaire en ligne remplace la saisie manuelle des adhésions et alimente directement le tableur de l'association.
|
resume: Un formulaire en ligne remplace la saisie manuelle des adhésions et alimente directement le tableur de l'association.
|
||||||
date: 2025-09-01
|
date: 2025-09-01
|
||||||
categorie: client
|
categorie: client
|
||||||
|
besoins: [automatisation]
|
||||||
technos: [n8n, Nextcloud, uMap]
|
technos: [n8n, Nextcloud, uMap]
|
||||||
misEnAvant: true
|
misEnAvant: true
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -15,6 +15,20 @@ const fullTitle = title ? `${title} · ${SITE_TITLE}` : SITE_TITLE;
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
|
<script is:inline>
|
||||||
|
(() => {
|
||||||
|
let theme;
|
||||||
|
try {
|
||||||
|
theme = localStorage.getItem('theme');
|
||||||
|
} catch {
|
||||||
|
/* stockage indisponible */
|
||||||
|
}
|
||||||
|
if (theme !== 'light' && theme !== 'dark') {
|
||||||
|
theme = matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||||
|
}
|
||||||
|
document.documentElement.dataset.theme = theme;
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
<BaseHead title={fullTitle} description={description} />
|
<BaseHead title={fullTitle} description={description} />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
import type { CollectionEntry } from 'astro:content';
|
||||||
|
import Base from './Base.astro';
|
||||||
|
import FiltresProjets from '../components/FiltresProjets.astro';
|
||||||
|
import { RUBRIQUES, type Rubrique } from '../consts';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
rubrique: Rubrique;
|
||||||
|
projets: CollectionEntry<'projets'>[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const { rubrique, projets } = Astro.props;
|
||||||
|
const { titre, chapeau } = RUBRIQUES[rubrique];
|
||||||
|
---
|
||||||
|
<Base title={titre}>
|
||||||
|
<section class="accroche">
|
||||||
|
<p class="etiquette">[{titre.toLowerCase()}]</p>
|
||||||
|
<h1>{titre}</h1>
|
||||||
|
<p class="chapeau">{chapeau}</p>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<FiltresProjets rubrique={rubrique} projets={projets} />
|
||||||
|
</section>
|
||||||
|
</Base>
|
||||||
@@ -2,19 +2,37 @@
|
|||||||
import type { CollectionEntry } from 'astro:content';
|
import type { CollectionEntry } from 'astro:content';
|
||||||
import { Image } from 'astro:assets';
|
import { Image } from 'astro:assets';
|
||||||
import Base from './Base.astro';
|
import Base from './Base.astro';
|
||||||
|
import { BESOINS, DOMAINES, RUBRIQUES } from '../consts';
|
||||||
|
|
||||||
type Props = CollectionEntry<'projets'>['data'];
|
type Props = CollectionEntry<'projets'>['data'];
|
||||||
const { titre, resume, technos, image, imageAlt, lien } = Astro.props;
|
const {
|
||||||
|
titre, resume, date, categorie, client, besoins, domaines, technos, image, imageAlt, lien,
|
||||||
|
} = Astro.props;
|
||||||
|
|
||||||
|
const rubrique = categorie === 'atelier' ? 'atelier' : 'realisations';
|
||||||
|
const dateTexte = date.toLocaleDateString('fr-FR', { month: 'long', year: 'numeric' });
|
||||||
|
const etiquettes =
|
||||||
|
categorie === 'atelier' ? domaines.map((d) => DOMAINES[d]) : besoins.map((b) => BESOINS[b]);
|
||||||
---
|
---
|
||||||
<Base title={titre} description={resume}>
|
<Base title={titre} description={resume}>
|
||||||
<article>
|
<article class="fiche">
|
||||||
{image && <Image src={image} alt={imageAlt ?? ''} />}
|
<p class="etiquette"><a href={`/${rubrique}/`}>{RUBRIQUES[rubrique].titre}</a> /</p>
|
||||||
<h1>{titre}</h1>
|
<h1>{titre}</h1>
|
||||||
<p>{resume}</p>
|
<p class="chapeau">{resume}</p>
|
||||||
<ul class="technos">
|
|
||||||
{technos.map((t) => <li>{t}</li>)}
|
<dl class="cartouche">
|
||||||
</ul>
|
<dt>Date</dt>
|
||||||
<slot />
|
<dd>{dateTexte}</dd>
|
||||||
{lien && <p><a href={lien}>Voir le projet</a></p>}
|
{client && (<><dt>Pour</dt><dd>{client}</dd></>)}
|
||||||
|
{etiquettes.length > 0 && (
|
||||||
|
<><dt>{categorie === 'atelier' ? 'Domaine' : 'Besoin'}</dt><dd>{etiquettes.join(', ')}</dd></>
|
||||||
|
)}
|
||||||
|
<dt>Technos</dt>
|
||||||
|
<dd><ul class="technos">{technos.map((t) => <li>{t}</li>)}</ul></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
{image && <Image src={image} alt={imageAlt ?? ''} class="illustration" />}
|
||||||
|
<div class="contenu"><slot /></div>
|
||||||
|
{lien && <p><a class="bouton" href={lien}>Voir le projet</a></p>}
|
||||||
</article>
|
</article>
|
||||||
</Base>
|
</Base>
|
||||||
@@ -1,7 +1,77 @@
|
|||||||
---
|
---
|
||||||
|
import { Image } from 'astro:assets';
|
||||||
import Base from '../layouts/Base.astro';
|
import Base from '../layouts/Base.astro';
|
||||||
|
|
||||||
|
const photos = import.meta.glob<{ default: ImageMetadata }>('../assets/lucas.{jpg,jpeg,png,webp}', {
|
||||||
|
eager: true,
|
||||||
|
});
|
||||||
|
const photo = Object.values(photos)[0]?.default;
|
||||||
---
|
---
|
||||||
<Base title="À propos">
|
<Base title="À propos" description="Lucas Royer, ingénieur, ancien enseignant et bénévole associatif, au service de l’informatique des petites structures.">
|
||||||
<h1>À propos</h1>
|
<section class="accroche presentation">
|
||||||
<p>À écrire.</p>
|
<div>
|
||||||
|
<p class="etiquette">[à propos]</p>
|
||||||
|
<h1>Bonjour, moi c’est Lucas</h1>
|
||||||
|
<p class="chapeau">
|
||||||
|
Ingénieur de formation, enseignant pendant un temps, bénévole dans de nombreuses
|
||||||
|
associations : j’ai appris l’informatique là où elle compte le plus et où les moyens
|
||||||
|
manquent le plus.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{photo && <Image src={photo} alt="Portrait de Lucas Royer" class="portrait" width={480} />}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="texte">
|
||||||
|
<p class="etiquette">[01] Parcours</p>
|
||||||
|
<h2>Un parcours pas en ligne droite</h2>
|
||||||
|
<p>
|
||||||
|
Je suis ingénieur diplômé de l’INSA Rennes en électronique et informatique industrielle,
|
||||||
|
avec un semestre d’échange à Erlangen, en Allemagne. Mon projet de fin d’études portait sur
|
||||||
|
un fauteuil roulant électrique équipé de capteurs pour détecter les obstacles, destiné à des
|
||||||
|
personnes polyhandicapées.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
J’ai ensuite enseigné les mathématiques et la technologie au collège. Pendant le confinement
|
||||||
|
de 2020, j’ai mis en place les outils de communication de l’équipe et coordonné les cours à
|
||||||
|
distance de tout l’établissement. C’est là que j’ai appris à rendre simples des outils
|
||||||
|
techniques pour des personnes qui n’ont pas le temps de s’y plonger.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
J’ai aussi été consultant en numérique responsable, à mesurer et réduire l’impact des
|
||||||
|
services numériques. Et dans une association d’interprétariat, j’ai rédigé un audit complet
|
||||||
|
de l’organisation et de ses outils, dont les recommandations ont été reprises par l’équipe
|
||||||
|
informatique.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="texte">
|
||||||
|
<p class="etiquette">[02] Associations</p>
|
||||||
|
<h2>Les associations, de l’intérieur</h2>
|
||||||
|
<p>
|
||||||
|
Depuis plusieurs années, je suis bénévole dans des associations autour du handicap, du vélo,
|
||||||
|
de la transition écologique et du logement. J’y ai vu des équipes faire des choses
|
||||||
|
essentielles avec peu de moyens, et une informatique qui leur prend souvent plus d’énergie
|
||||||
|
qu’elle ne leur en rend.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
C’est en aidant ces structures que mon activité a pris forme : des adhésions automatisées et
|
||||||
|
une tablette de suivi des pièces pour un atelier vélo associatif, puis une mission pour
|
||||||
|
remettre à plat sept ans d’informatique sans informaticien dans une association.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="texte">
|
||||||
|
<p class="etiquette">[03] Pourquoi</p>
|
||||||
|
<h2>Pourquoi en indépendant</h2>
|
||||||
|
<p>
|
||||||
|
Travailler à mon compte me permet de choisir les structures que j’accompagne, et de
|
||||||
|
travailler comme je pense qu’il faut le faire : en transparence, avec des outils libres, et
|
||||||
|
en rendant les équipes autonomes plutôt que dépendantes de moi.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
À côté, je bricole beaucoup : électronique, son, vélo. Vous trouverez tout ça dans
|
||||||
|
<a href="/atelier/">l’atelier</a>.
|
||||||
|
</p>
|
||||||
|
<p><a class="bouton" href="/contact/">Parlons de votre structure →</a></p>
|
||||||
|
</section>
|
||||||
</Base>
|
</Base>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
import { getCollection, render } from 'astro:content';
|
||||||
|
import Projet from '../../layouts/Projet.astro';
|
||||||
|
|
||||||
|
export async function getStaticPaths() {
|
||||||
|
const projets = await getCollection(
|
||||||
|
'projets',
|
||||||
|
({ data }) => data.categorie === 'atelier' && !data.brouillon,
|
||||||
|
);
|
||||||
|
return projets.map((projet) => ({ params: { slug: projet.id }, props: { projet } }));
|
||||||
|
}
|
||||||
|
|
||||||
|
const { projet } = Astro.props;
|
||||||
|
const { Content } = await render(projet);
|
||||||
|
---
|
||||||
|
<Projet {...projet.data}>
|
||||||
|
<Content />
|
||||||
|
</Projet>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
import PageRubrique from '../../layouts/PageRubrique.astro';
|
||||||
|
import { projetsRubrique } from '../../utils/projets';
|
||||||
|
|
||||||
|
const projets = await projetsRubrique('atelier');
|
||||||
|
---
|
||||||
|
<PageRubrique rubrique="atelier" projets={projets} />
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
import Base from '../layouts/Base.astro';
|
||||||
|
import { CONTACT_EMAIL } from '../consts';
|
||||||
|
---
|
||||||
|
<Base title="Contact">
|
||||||
|
<section class="accroche">
|
||||||
|
<p class="etiquette">[contact]</p>
|
||||||
|
<h1>Parlons de votre structure</h1>
|
||||||
|
<p class="chapeau">
|
||||||
|
Présentez-moi votre structure et votre besoin en quelques lignes : combien de personnes,
|
||||||
|
quels outils aujourd’hui, ce qui coince. Je vous réponds pour en discuter.
|
||||||
|
</p>
|
||||||
|
<p><a class="bouton" href={`mailto:${CONTACT_EMAIL}`}>{CONTACT_EMAIL}</a></p>
|
||||||
|
</section>
|
||||||
|
</Base>
|
||||||
+70
-32
@@ -1,69 +1,107 @@
|
|||||||
---
|
---
|
||||||
import { getCollection } from 'astro:content';
|
|
||||||
import Base from '../layouts/Base.astro';
|
import Base from '../layouts/Base.astro';
|
||||||
import { CONTACT_EMAIL } from '../consts';
|
import FiltresProjets from '../components/FiltresProjets.astro';
|
||||||
|
import { CONTACT_EMAIL, RUBRIQUES } from '../consts';
|
||||||
|
import { projetsRubrique } from '../utils/projets';
|
||||||
|
|
||||||
const misEnAvant = (
|
const realisations = await projetsRubrique('realisations');
|
||||||
await getCollection('projets', ({ data }) => data.misEnAvant && !data.brouillon)
|
const atelier = await projetsRubrique('atelier');
|
||||||
)
|
|
||||||
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf())
|
|
||||||
.slice(0, 3);
|
|
||||||
|
|
||||||
const services = [
|
const services = [
|
||||||
{
|
{
|
||||||
titre: 'Votre informatique au quotidien',
|
titre: 'Votre informatique au quotidien',
|
||||||
texte:
|
texte:
|
||||||
'Administration des serveurs et des postes de travail, gestion des accès et de la messagerie, support aux équipes. Des sauvegardes testées, pas de simples copies, et une supervision qui détecte un problème avant qu’il ne vous touche.',
|
'Administration des serveurs et des postes, gestion des accès et de la messagerie, support aux équipes. Des sauvegardes testées, pas de simples copies, et une supervision qui détecte un problème avant qu’il ne vous touche.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
titre: 'Passer à des outils libres',
|
titre: 'Passer à des outils libres',
|
||||||
texte:
|
texte:
|
||||||
'Partage de fichiers, messagerie, mots de passe : des solutions ouvertes et hébergées en France, avec un chiffrage clair des économies par rapport aux offres propriétaires, et une formation des équipes pour que ces outils restent entre vos mains.',
|
'Partage de fichiers, messagerie, mots de passe : des solutions ouvertes et hébergées en France, avec un chiffrage clair des économies par rapport aux offres propriétaires.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
titre: 'Laisser aux machines les tâches des machines',
|
titre: 'Laisser aux machines les tâches des machines',
|
||||||
texte:
|
texte:
|
||||||
'Formulaires, saisies en double, tableaux à recopier : j’automatise ce qui peut l’être, pour garder le temps et l’énergie pour ce qui compte vraiment dans votre structure.',
|
'Formulaires, saisies en double, tableaux à recopier : j’automatise ce qui peut l’être, pour garder le temps et l’énergie pour ce qui compte.',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const etapes = [
|
||||||
|
{
|
||||||
|
titre: 'On fait le point',
|
||||||
|
texte: 'Inventaire du parc, des comptes et des usages, avec un chiffrage clair de ce qui peut changer.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
titre: 'On met en place',
|
||||||
|
texte: 'Migration vers des outils ouverts, sécurité pensée dès le départ, sauvegardes testées.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
titre: 'On se forme ensemble',
|
||||||
|
texte: 'Vos équipes prennent les outils en main, pour ne pas dépendre d’un prestataire.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
titre: 'On reste en contact',
|
||||||
|
texte: 'Supervision des services, support au quotidien, améliorations progressives.',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
---
|
---
|
||||||
<Base>
|
<Base>
|
||||||
<section>
|
<section class="accroche">
|
||||||
|
<p class="etiquette">[00] Infogérance · associations · TPE · ESS</p>
|
||||||
<h1>Que l’informatique devienne un outil, pas un frein</h1>
|
<h1>Que l’informatique devienne un outil, pas un frein</h1>
|
||||||
<p>
|
<p class="chapeau">
|
||||||
J’accompagne les associations, les TPE et les acteurs de l’économie sociale et solidaire
|
J’accompagne les associations, les TPE et les acteurs de l’économie sociale et solidaire
|
||||||
dans la gestion et la sécurisation de leur informatique, en toute transparence.
|
dans la gestion et la sécurisation de leur informatique, en toute transparence.
|
||||||
</p>
|
</p>
|
||||||
<p><a href={`mailto:${CONTACT_EMAIL}`}>Parlons de votre structure</a></p>
|
<p><a class="bouton" href="/contact/">Parlons de votre structure →</a></p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h2>Ce que je fais</h2>
|
<p class="etiquette">[01] Services</p>
|
||||||
{services.map((s) => (
|
<h2>Ce que je fais pour vous</h2>
|
||||||
<article>
|
<div class="grille">
|
||||||
<h3>{s.titre}</h3>
|
{services.map((s) => (
|
||||||
<p>{s.texte}</p>
|
<article class="service">
|
||||||
</article>
|
<h3>{s.titre}</h3>
|
||||||
))}
|
<p>{s.texte}</p>
|
||||||
|
</article>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{misEnAvant.length > 0 && (
|
<section>
|
||||||
|
<p class="etiquette">[02] Méthode</p>
|
||||||
|
<h2>Comment je travaille</h2>
|
||||||
|
<ol class="etapes">
|
||||||
|
{etapes.map((e) => (
|
||||||
|
<li>
|
||||||
|
<h3>{e.titre}</h3>
|
||||||
|
<p>{e.texte}</p>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ol>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{realisations.length > 0 && (
|
||||||
<section>
|
<section>
|
||||||
|
<p class="etiquette">[03] Réalisations</p>
|
||||||
<h2>Quelques réalisations</h2>
|
<h2>Quelques réalisations</h2>
|
||||||
<ul>
|
<p class="chapeau">{RUBRIQUES.realisations.chapeau}</p>
|
||||||
{misEnAvant.map((p) => (
|
<FiltresProjets rubrique="realisations" projets={realisations} />
|
||||||
<li><a href={`/projets/${p.id}/`}>{p.data.titre}</a> : {p.data.resume}</li>
|
</section>
|
||||||
))}
|
)}
|
||||||
</ul>
|
|
||||||
<p><a href="/projets/">Tous les projets</a></p>
|
{atelier.length > 0 && (
|
||||||
|
<section>
|
||||||
|
<p class="etiquette">[04] Atelier</p>
|
||||||
|
<h2>Projets personnels</h2>
|
||||||
|
<p class="chapeau">{RUBRIQUES.atelier.chapeau}</p>
|
||||||
|
<FiltresProjets rubrique="atelier" projets={atelier} />
|
||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<section id="contact">
|
<section id="contact">
|
||||||
<h2>Contact</h2>
|
<p class="etiquette">[05] Contact</p>
|
||||||
<p>
|
<h2>Parlons de votre structure</h2>
|
||||||
Un besoin, une question, un doute sur vos sauvegardes ?
|
<p>Un besoin, une question, un doute sur vos sauvegardes ? Écrivez-moi : <a href={`mailto:${CONTACT_EMAIL}`}>{CONTACT_EMAIL}</a>.</p>
|
||||||
Écrivez-moi : <a href={`mailto:${CONTACT_EMAIL}`}>{CONTACT_EMAIL}</a>.
|
|
||||||
</p>
|
|
||||||
</section>
|
</section>
|
||||||
</Base>
|
</Base>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
import Base from '../layouts/Base.astro';
|
||||||
|
---
|
||||||
|
<Base title="Mentions légales">
|
||||||
|
<h1>Mentions légales</h1>
|
||||||
|
<p class="etiquette">À compléter : nom, statut (EI), SIRET, adresse, contact, hébergeur.</p>
|
||||||
|
</Base>
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
import { getCollection } from 'astro:content';
|
|
||||||
import Base from '../../layouts/Base.astro';
|
|
||||||
|
|
||||||
const projets = (await getCollection('projets', ({ data }) => !data.brouillon)).sort(
|
|
||||||
(a, b) => b.data.date.valueOf() - a.data.date.valueOf(),
|
|
||||||
);
|
|
||||||
|
|
||||||
const sections = [
|
|
||||||
{ titre: 'Réalisations', items: projets.filter((p) => p.data.categorie === 'client') },
|
|
||||||
{ titre: 'Atelier', items: projets.filter((p) => p.data.categorie === 'atelier') },
|
|
||||||
];
|
|
||||||
---
|
|
||||||
<Base title="Projets">
|
|
||||||
<h1>Projets</h1>
|
|
||||||
{sections.map(({ titre, items }) => items.length > 0 && (
|
|
||||||
<section>
|
|
||||||
<h2>{titre}</h2>
|
|
||||||
<ul>
|
|
||||||
{items.map((p) => (
|
|
||||||
<li><a href={`/projets/${p.id}/`}>{p.data.titre}</a> : {p.data.resume}</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
))}
|
|
||||||
</Base>
|
|
||||||
@@ -3,7 +3,10 @@ import { getCollection, render } from 'astro:content';
|
|||||||
import Projet from '../../layouts/Projet.astro';
|
import Projet from '../../layouts/Projet.astro';
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const projets = await getCollection('projets', ({ data }) => !data.brouillon);
|
const projets = await getCollection(
|
||||||
|
'projets',
|
||||||
|
({ data }) => data.categorie === 'client' && !data.brouillon,
|
||||||
|
);
|
||||||
return projets.map((projet) => ({ params: { slug: projet.id }, props: { projet } }));
|
return projets.map((projet) => ({ params: { slug: projet.id }, props: { projet } }));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
import PageRubrique from '../../layouts/PageRubrique.astro';
|
||||||
|
import { projetsRubrique } from '../../utils/projets';
|
||||||
|
|
||||||
|
const projets = await projetsRubrique('realisations');
|
||||||
|
---
|
||||||
|
<PageRubrique rubrique="realisations" projets={projets} />
|
||||||
+208
-151
@@ -1,155 +1,212 @@
|
|||||||
/*
|
/* ---------- Couleurs ---------- */
|
||||||
The CSS in this style tag is based off of Bear Blog's default CSS.
|
|
||||||
https://github.com/HermanMartinus/bearblog/blob/297026a877bc2ab2b3bdfbd6b9f7961c350917dd/templates/styles/blog/default.css
|
|
||||||
License MIT: https://github.com/HermanMartinus/bearblog/blob/master/LICENSE.md
|
|
||||||
*/
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--accent: #2337ff;
|
--papier: #f6f3ec;
|
||||||
--accent-dark: #000d8a;
|
--papier-carte: #fbf9f4;
|
||||||
--black: 15, 18, 25;
|
--encre: #1c1b19;
|
||||||
--gray: 96, 115, 159;
|
--encre-douce: #5c5750;
|
||||||
--gray-light: 229, 233, 240;
|
--trait: #d8d1c3;
|
||||||
--gray-dark: 34, 41, 57;
|
--point: #ddd6c8;
|
||||||
--gray-gradient: rgba(var(--gray-light), 50%), #fff;
|
--accent: #b93c0b;
|
||||||
--box-shadow:
|
--accent-fond: #f7e1d3;
|
||||||
0 2px 6px rgba(var(--gray), 25%), 0 8px 24px rgba(var(--gray), 33%), 0 16px 32px
|
--sur-accent: #ffffff;
|
||||||
rgba(var(--gray), 33%);
|
--sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
|
||||||
}
|
--mono: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
|
||||||
@font-face {
|
--largeur: 64rem;
|
||||||
font-family: "Atkinson";
|
color-scheme: light;
|
||||||
src: url("/fonts/atkinson-regular.woff") format("woff");
|
|
||||||
font-weight: 400;
|
|
||||||
font-style: normal;
|
|
||||||
font-display: swap;
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: "Atkinson";
|
|
||||||
src: url("/fonts/atkinson-bold.woff") format("woff");
|
|
||||||
font-weight: 700;
|
|
||||||
font-style: normal;
|
|
||||||
font-display: swap;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
font-family: "Atkinson", sans-serif;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
text-align: left;
|
|
||||||
background: linear-gradient(var(--gray-gradient)) no-repeat;
|
|
||||||
background-size: 100% 600px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
color: rgb(var(--gray-dark));
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 1.7;
|
|
||||||
}
|
|
||||||
main {
|
|
||||||
width: 720px;
|
|
||||||
max-width: calc(100% - 2em);
|
|
||||||
margin: auto;
|
|
||||||
padding: 3em 1em;
|
|
||||||
}
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6 {
|
|
||||||
margin: 0 0 0.5rem 0;
|
|
||||||
color: rgb(var(--black));
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
font-size: 3.052em;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-size: 2.441em;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: 1.953em;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
font-size: 1.563em;
|
|
||||||
}
|
|
||||||
h5 {
|
|
||||||
font-size: 1.25em;
|
|
||||||
}
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: var(--accent);
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: var(--accent);
|
|
||||||
}
|
|
||||||
p {
|
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
|
||||||
.prose p {
|
|
||||||
margin-bottom: 2em;
|
|
||||||
}
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
input {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
code {
|
|
||||||
padding: 2px 5px;
|
|
||||||
background-color: rgb(var(--gray-light));
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
padding: 1.5em;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
pre > code {
|
|
||||||
all: unset;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
border-left: 4px solid var(--accent);
|
|
||||||
padding: 0 0 0 20px;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 1.333em;
|
|
||||||
}
|
|
||||||
hr {
|
|
||||||
border: none;
|
|
||||||
border-top: 1px solid rgb(var(--gray-light));
|
|
||||||
}
|
|
||||||
@media (max-width: 720px) {
|
|
||||||
body {
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
main {
|
|
||||||
padding: 1em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sr-only {
|
:root[data-theme="dark"] {
|
||||||
border: 0;
|
--papier: #15171b;
|
||||||
padding: 0;
|
--papier-carte: #1b1e23;
|
||||||
margin: 0;
|
--encre: #ece7dd;
|
||||||
position: absolute !important;
|
--encre-douce: #a9a39a;
|
||||||
height: 1px;
|
--trait: #30343b;
|
||||||
width: 1px;
|
--point: #262a30;
|
||||||
overflow: hidden;
|
--accent: #f08a4b;
|
||||||
/* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */
|
--accent-fond: #3a2618;
|
||||||
clip: rect(1px 1px 1px 1px);
|
--sur-accent: #15171b;
|
||||||
/* maybe deprecated but we need to support legacy browsers */
|
color-scheme: dark;
|
||||||
clip: rect(1px, 1px, 1px, 1px);
|
|
||||||
/* modern browsers, clip-path works inwards from each corner */
|
|
||||||
clip-path: inset(50%);
|
|
||||||
/* added line to stop words getting smushed together (as they go onto separate lines and some screen readers do not understand line feeds as a space */
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Sans JavaScript, on suit le réglage du système */
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root:not([data-theme]) {
|
||||||
|
--papier: #15171b;
|
||||||
|
--papier-carte: #1b1e23;
|
||||||
|
--encre: #ece7dd;
|
||||||
|
--encre-douce: #a9a39a;
|
||||||
|
--trait: #30343b;
|
||||||
|
--point: #262a30;
|
||||||
|
--accent: #f08a4b;
|
||||||
|
--accent-fond: #3a2618;
|
||||||
|
--sur-accent: #15171b;
|
||||||
|
color-scheme: dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- Base ---------- */
|
||||||
|
*, *::before, *::after { box-sizing: border-box; }
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--sans);
|
||||||
|
font-size: 1.0625rem;
|
||||||
|
line-height: 1.65;
|
||||||
|
color: var(--encre);
|
||||||
|
background-color: var(--papier);
|
||||||
|
background-image: radial-gradient(var(--point) 1px, transparent 1px);
|
||||||
|
background-size: 22px 22px;
|
||||||
|
}
|
||||||
|
img { max-width: 100%; height: auto; display: block; }
|
||||||
|
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
|
||||||
|
a:hover { text-decoration-thickness: 2px; }
|
||||||
|
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
|
||||||
|
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.75rem; text-wrap: balance; }
|
||||||
|
h1 { font-size: clamp(1.8rem, 2vw + 1.1rem, 2.3rem); font-weight: 800; }
|
||||||
|
h2 { font-size: clamp(1.45rem, 1.2vw + 1.05rem, 1.85rem); font-weight: 750; }
|
||||||
|
h3 { font-size: 1.15rem; font-weight: 700; }
|
||||||
|
p { margin: 0 0 1rem; text-wrap: pretty; }
|
||||||
|
code { font-family: var(--mono); font-size: 0.9em; }
|
||||||
|
|
||||||
|
/* ---------- Mise en page ---------- */
|
||||||
|
.entete nav, main, .pied { max-width: var(--largeur); margin-inline: auto; padding-inline: 1rem; }
|
||||||
|
main { padding-block: 3rem 4rem; }
|
||||||
|
main > section { margin-bottom: 4.5rem; padding-top: 1.25rem; border-top: 1px solid var(--trait); }
|
||||||
|
main > section:first-child { border-top: 0; padding-top: 0; }
|
||||||
|
|
||||||
|
/* ---------- En-tête ---------- */
|
||||||
|
.entete { border-bottom: 1px solid var(--trait); background: var(--papier); }
|
||||||
|
.entete nav {
|
||||||
|
display: flex; flex-wrap: wrap; align-items: center;
|
||||||
|
gap: 0.5rem 1.5rem; padding-block: 0.9rem;
|
||||||
|
}
|
||||||
|
.logo { font-family: var(--mono); font-weight: 700; color: var(--encre); text-decoration: none; }
|
||||||
|
.logo span { color: var(--accent); }
|
||||||
|
.entete ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 0 auto; padding: 0; }
|
||||||
|
.entete ul a {
|
||||||
|
font-family: var(--mono); font-size: 0.9rem; color: var(--encre-douce);
|
||||||
|
text-decoration: none; padding-block: 0.25rem; border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
.entete ul a:hover, .entete ul a.active { color: var(--encre); border-bottom-color: var(--accent); }
|
||||||
|
|
||||||
|
.bascule {
|
||||||
|
display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem;
|
||||||
|
padding: 0; cursor: pointer; color: var(--encre);
|
||||||
|
background: var(--papier-carte); border: 1px solid var(--trait);
|
||||||
|
}
|
||||||
|
.bascule:hover { border-color: var(--encre); }
|
||||||
|
.bascule svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
||||||
|
:root[data-theme="dark"] .icone-lune,
|
||||||
|
:root:not([data-theme="dark"]) .icone-soleil { display: none; }
|
||||||
|
:root:not([data-theme]) .bascule { display: none; }
|
||||||
|
|
||||||
|
/* ---------- Pied de page ---------- */
|
||||||
|
.pied { padding-block: 2rem 3rem; border-top: 1px solid var(--trait); color: var(--encre-douce); font-size: 0.95rem; }
|
||||||
|
.pied p { margin: 0; }
|
||||||
|
|
||||||
|
/* ---------- Éléments communs ---------- */
|
||||||
|
.etiquette {
|
||||||
|
font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase;
|
||||||
|
letter-spacing: 0.08em; color: var(--encre-douce); margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
.chapeau { font-size: 1.15rem; color: var(--encre-douce); max-width: 56rem; }
|
||||||
|
.accroche h1 { max-width: none; }
|
||||||
|
.suite { margin-top: 1.25rem; }
|
||||||
|
|
||||||
|
.bouton {
|
||||||
|
display: inline-block; font-family: var(--mono); font-weight: 700;
|
||||||
|
padding: 0.7rem 1.1rem; color: var(--sur-accent); background: var(--accent);
|
||||||
|
border: 1.5px solid var(--encre); box-shadow: 4px 4px 0 var(--encre); text-decoration: none;
|
||||||
|
}
|
||||||
|
.bouton:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--encre); }
|
||||||
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
|
.bouton { transition: transform 0.12s, box-shadow 0.12s; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- Services ---------- */
|
||||||
|
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
|
||||||
|
.service { border-top: 2px solid var(--encre); padding-top: 0.9rem; }
|
||||||
|
.service p:last-child { margin-bottom: 0; }
|
||||||
|
|
||||||
|
/* ---------- Étapes reliées par des pointillés ---------- */
|
||||||
|
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: etape; }
|
||||||
|
.etapes li { position: relative; counter-increment: etape; }
|
||||||
|
.etapes li::before {
|
||||||
|
content: "0" counter(etape); display: inline-block; font-family: var(--mono); font-size: 0.8rem;
|
||||||
|
padding: 0.15rem 0.5rem; border: 1px solid var(--encre); background: var(--papier); margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
.etapes li:last-child::before { background: var(--accent); color: var(--sur-accent); border-color: var(--accent); }
|
||||||
|
@media (min-width: 52rem) {
|
||||||
|
.etapes { grid-template-columns: repeat(4, 1fr); }
|
||||||
|
.etapes li:not(:last-child)::after {
|
||||||
|
content: ""; position: absolute; top: 1.05rem; left: 3.2rem; right: -1.25rem;
|
||||||
|
border-top: 1px dashed var(--encre-douce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- Filtres ---------- */
|
||||||
|
.filtres { margin-bottom: 1.5rem; }
|
||||||
|
.filtres ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
|
||||||
|
.filtres a {
|
||||||
|
display: inline-block; font-family: var(--mono); font-size: 0.8rem; padding: 0.3rem 0.7rem;
|
||||||
|
color: var(--encre); text-decoration: none; border: 1px solid var(--trait); background: var(--papier-carte);
|
||||||
|
}
|
||||||
|
.filtres a:hover { border-color: var(--encre); }
|
||||||
|
.filtres a[aria-current="page"] { background: var(--encre); color: var(--papier); border-color: var(--encre); }
|
||||||
|
|
||||||
|
/* ---------- Planches : cartes de projets ---------- */
|
||||||
|
.planches { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
|
||||||
|
.planche {
|
||||||
|
position: relative; display: flex; flex-direction: column; min-height: 16rem;
|
||||||
|
padding: 1.25rem; background: var(--papier-carte); border: 1px solid var(--trait);
|
||||||
|
}
|
||||||
|
.planche:hover { border-color: var(--encre); }
|
||||||
|
.planche:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
|
||||||
|
.planche-haut { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 1rem; }
|
||||||
|
.planche-image {
|
||||||
|
width: calc(100% + 2.5rem); max-width: none; margin: 0 -1.25rem 1rem;
|
||||||
|
aspect-ratio: 4 / 3; object-fit: cover; border-block: 1px solid var(--trait);
|
||||||
|
}
|
||||||
|
.planche h3 a { color: var(--encre); text-decoration: none; }
|
||||||
|
.planche h3 a:focus-visible { outline: none; }
|
||||||
|
.planche h3 a::after { content: ""; position: absolute; inset: 0; }
|
||||||
|
.planche p { color: var(--encre-douce); font-size: 0.95rem; }
|
||||||
|
|
||||||
|
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: auto 0 0; padding: 0; }
|
||||||
|
.tags li {
|
||||||
|
font-family: var(--mono); font-size: 0.75rem; padding: 0.1rem 0.45rem;
|
||||||
|
color: var(--accent); background: var(--accent-fond);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- Fiche projet ---------- */
|
||||||
|
.fiche { max-width: 56rem; }
|
||||||
|
.cartouche {
|
||||||
|
display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.5rem; align-items: baseline;
|
||||||
|
margin: 2rem 0; padding-block: 1rem; border-block: 1px solid var(--trait);
|
||||||
|
}
|
||||||
|
.cartouche dt {
|
||||||
|
font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase;
|
||||||
|
letter-spacing: 0.08em; color: var(--encre-douce);
|
||||||
|
}
|
||||||
|
.cartouche dd { margin: 0; }
|
||||||
|
.technos { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
|
||||||
|
.technos li {
|
||||||
|
font-family: var(--mono); font-size: 0.8rem; padding: 0.1rem 0.45rem;
|
||||||
|
border: 1px solid var(--trait); background: var(--papier-carte);
|
||||||
|
}
|
||||||
|
.illustration { border: 1px solid var(--trait); margin-block: 2rem; }
|
||||||
|
.contenu h2 { font-size: 1.4rem; margin-top: 2.5rem; }
|
||||||
|
|
||||||
|
/* ---------- À propos ---------- */
|
||||||
|
.presentation { display: grid; gap: 2rem; align-items: start; }
|
||||||
|
@media (min-width: 52rem) {
|
||||||
|
.presentation:has(.portrait) { grid-template-columns: 1fr 16rem; }
|
||||||
|
}
|
||||||
|
.portrait { width: 100%; max-width: 16rem; border: 1px solid var(--trait); }
|
||||||
|
.texte { max-width: 56rem; }
|
||||||
|
|
||||||
|
/* Filtres sur place : ancres invisibles */
|
||||||
|
.ancre { position: fixed; top: 0; left: 0; width: 0; height: 0; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Pas de marge sous la dernière section */
|
||||||
|
main > section:last-child { margin-bottom: 0; }
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
import { getCollection, type CollectionEntry } from 'astro:content';
|
||||||
|
import { BESOINS, DOMAINES, type Rubrique } from '../consts';
|
||||||
|
|
||||||
|
type Projet = CollectionEntry<'projets'>;
|
||||||
|
export type Tag = { id: string; label: string };
|
||||||
|
|
||||||
|
export const rubriqueProjet = (p: Projet): Rubrique =>
|
||||||
|
p.data.categorie === 'atelier' ? 'atelier' : 'realisations';
|
||||||
|
|
||||||
|
export const urlProjet = (p: Projet) => `/${rubriqueProjet(p)}/${p.id}/`;
|
||||||
|
|
||||||
|
export const tagsProjet = (p: Projet): Tag[] =>
|
||||||
|
p.data.categorie === 'atelier'
|
||||||
|
? p.data.domaines.map((id) => ({ id, label: DOMAINES[id] }))
|
||||||
|
: p.data.besoins.map((id) => ({ id, label: BESOINS[id] }));
|
||||||
|
|
||||||
|
export const tagsPresents = (rubrique: Rubrique, projets: Projet[]): Tag[] => {
|
||||||
|
const ids = new Set(projets.flatMap((p) => tagsProjet(p).map((t) => t.id)));
|
||||||
|
const source: Record<string, string> = rubrique === 'atelier' ? DOMAINES : BESOINS;
|
||||||
|
return Object.entries(source)
|
||||||
|
.filter(([id]) => ids.has(id))
|
||||||
|
.map(([id, label]) => ({ id, label }));
|
||||||
|
};
|
||||||
|
|
||||||
|
export const projetsRubrique = async (rubrique: Rubrique) =>
|
||||||
|
(
|
||||||
|
await getCollection(
|
||||||
|
'projets',
|
||||||
|
({ data }) =>
|
||||||
|
data.categorie === (rubrique === 'atelier' ? 'atelier' : 'client') && !data.brouillon,
|
||||||
|
)
|
||||||
|
).sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
|
||||||
Reference in new issue
Block a user