Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWGVn3BQ1T1H7gCv5B89d1
50 lines
7.2 KiB
JavaScript
50 lines
7.2 KiB
JavaScript
// Les pictos des fiches, dans cet ordre : ① les logos de la planche 4 du concours Habiter Demain et les trois systèmes
|
|
// de la planche 2 (pipeline/axo/10_logos.py, demande de Jules du 08/10 : « suivre le fil de la captation au résultat ») ;
|
|
// ② les bulles du quartier en 2030 (p. 15) ; ③ quelques dessins provisoires ci-dessous. Tous sont provisoires au sens
|
|
// du lot pictos de la plateforme (reinnover public/pictos/<nom>.svg, SPEC menu branches fiches §10) : ses SVG
|
|
// remplaceront ces images sous le même nom.
|
|
const LOGOS = Object.fromEntries(Object.entries(import.meta.glob('./assets/logos/*.png', { eager: true, query: '?url', import: 'default' })).map(([k, v]) => [k.split('/').pop().slice(0, -4), v]));
|
|
|
|
export const COULEURS = {
|
|
eau: { c: '#3a74a8', encre: '#1d5886', fond: '#e1ebf5' },
|
|
vivant: { c: '#8f7b22', encre: '#62560f', fond: '#eeead0' },
|
|
energie: { c: '#c96d0c', encre: '#8f4506', fond: '#fde8c8' },
|
|
transport: { c: '#5f7f8c', encre: '#3f5f6c', fond: '#e4ecef' }, // lot ④ : le quatrième onglet de S (gris-bleu de la palette)
|
|
quartier: { c: '#8a5a7a', encre: '#5e3a54', fond: '#f1e6ee' },
|
|
// lot ⑤ (R6) : le quartier redécoupé. Habiter : la terre cuite des voitures (PAL.autos) et le pêche des tiny houses (DOUX),
|
|
// une encre neuve (#7a3b2e, AA sur les deux fonds) ; faire : le vert des gens (PAL.gens), le vert doux (DOUX), l'encre du vivant.
|
|
habiter: { c: '#a8675a', encre: '#7a3b2e', fond: '#e6c9b8' },
|
|
faire: { c: '#8aa36a', encre: '#62560f', fond: '#c9d6c4' },
|
|
accueil: { c: '#6b6458', encre: '#3f5563', fond: '#ece8de' },
|
|
auj: { c: '#6b6458', encre: '#4a443b', fond: '#ece8de' },
|
|
};
|
|
|
|
const rond = (c, corps) => `<svg viewBox="0 0 56 56" role="img" aria-hidden="true"><circle cx="28" cy="28" r="25" fill="#fff" stroke="${c}" stroke-width="2.5"/>${corps}</svg>`;
|
|
const E = COULEURS.eau.c, V = COULEURS.vivant.c, C = COULEURS.energie.c, Q = COULEURS.quartier.c, G = '#6b6458', VERT = '#7d9a4f';
|
|
|
|
const DESSINS = {
|
|
toit: [E, `<path d="M14 27l12-10 12 10" fill="none" stroke="${E}" stroke-width="2.6" stroke-linejoin="round"/><path d="M17 30v12h12V30" fill="none" stroke="${E}" stroke-width="2.2"/><path d="M36 13c1.6 2.4 2.4 3.6 2.4 4.8a2.4 2.4 0 0 1-4.8 0c0-1.2.8-2.4 2.4-4.8zM42 19c1.6 2.4 2.4 3.6 2.4 4.8a2.4 2.4 0 0 1-4.8 0c0-1.2.8-2.4 2.4-4.8z" fill="${E}"/>`],
|
|
gouttiere: [E, `<path d="M12 22h26v3H12z" fill="#cfe0ef" stroke="${E}" stroke-width="2"/><path d="M35 25v10" stroke="${E}" stroke-width="3"/><rect x="29" y="35" width="12" height="9" rx="2" fill="#fff" stroke="${E}" stroke-width="2.2"/><path d="M31 38h8M31 41h8" stroke="${E}" stroke-width="1.4"/><path d="M20 30c1.4 2 2 3 2 4a2 2 0 0 1-4 0c0-1 .6-2 2-4z" fill="${E}"/>`],
|
|
cuve: [E, `<ellipse cx="28" cy="18" rx="11" ry="4" fill="#cfe0ef" stroke="${E}" stroke-width="2.2"/><path d="M17 18v18c0 2.2 5 4 11 4s11-1.8 11-4V18" fill="#e7f0f8" stroke="${E}" stroke-width="2.2"/><path d="M17 27c0 2.2 5 4 11 4s11-1.8 11-4" fill="none" stroke="${E}" stroke-width="1.6" stroke-dasharray="2 2"/><path d="M19 31c3 2 15 2 18 0v5c0 2-4 3.5-9 3.5S19 38 19 36z" fill="#9fc3e3"/>`],
|
|
pompe: [E, `<rect x="14" y="26" width="13" height="12" rx="2" fill="#fff" stroke="${E}" stroke-width="2.2"/><circle cx="20.5" cy="32" r="3.2" fill="none" stroke="${E}" stroke-width="2"/><path d="M27 32h7v-9h6" fill="none" stroke="${E}" stroke-width="2.4" stroke-linejoin="round"/><path d="M40 20v6" stroke="${E}" stroke-width="2.4"/><path d="M38 31c1.4 2 2 3 2 4a2 2 0 0 1-4 0c0-1 .6-2 2-4z" fill="${E}"/>`],
|
|
rigole: [E, `<path d="M13 22h9l6 6h8l7 7" fill="none" stroke="${E}" stroke-width="2.6" stroke-dasharray="3 3" stroke-linecap="round"/><path d="M39 31l4 4-5 1" fill="none" stroke="${E}" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/><path d="M18 36c2 3 3 4.5 3 6a3 3 0 0 1-6 0c0-1.5 1-3 3-6z" fill="${E}"/>`],
|
|
noue: [E, `<path d="M11 34c4 5 9 7 17 7s13-2 17-7" fill="#cfe0ef" stroke="${E}" stroke-width="2.4"/><path d="M20 33v-9M24 33v-12M32 33v-10M36 33v-7" stroke="${VERT}" stroke-width="2.4" stroke-linecap="round"/><circle cx="24" cy="20" r="2" fill="#d9b23a"/><circle cx="32" cy="22" r="2" fill="#b0608a"/>`],
|
|
bassin: [E, `<path d="M11 30h34" stroke="#8a847a" stroke-width="2"/><path d="M13 31c3 8 8 11 15 11s12-3 15-11z" fill="#cfe0ef" stroke="${E}" stroke-width="2.4"/><path d="M19 36c3-2 6 2 9 0s6-2 9 0" fill="none" stroke="${E}" stroke-width="2"/><path d="M34 29v-9M38 29v-6" stroke="${VERT}" stroke-width="2.4" stroke-linecap="round"/>`],
|
|
paille: [C, `<path d="M14 28l14-12 14 12" fill="none" stroke="${C}" stroke-width="2.6" stroke-linejoin="round"/><rect x="17" y="27" width="22" height="15" fill="#f1d58a" stroke="${C}" stroke-width="2.2"/><path d="M21 31h6M29 35h6M21 39h6" stroke="${C}" stroke-width="1.6"/>`],
|
|
serre: [C, `<path d="M12 40V26l9-7h23v21z" fill="#e9f4f1" stroke="${C}" stroke-width="2.2" stroke-linejoin="round"/><path d="M21 19v21M30 19v21M37 19v21M12 31h32" stroke="${C}" stroke-width="1.4"/><circle cx="42" cy="13" r="4" fill="#f4b24a"/>`],
|
|
poele: [C, `<rect x="19" y="24" width="18" height="18" rx="3" fill="#fff" stroke="${C}" stroke-width="2.2"/><path d="M25 32c2-3 1-5 3-7 0 3 3 4 3 7a3 3 0 0 1-6 0z" fill="#e3893a"/><path d="M26 24v-10h4v10" fill="none" stroke="${C}" stroke-width="2.2"/><path d="M33 12c2 1 2 3 0 4" fill="none" stroke="#b5ab9b" stroke-width="2"/>`],
|
|
quartier: [G, `<path d="M9 36l7-6 7 6v7H9zM24 33l8-7 8 7v10H24zM37 37l5-4 5 4v6H37z" fill="#fff" stroke="${G}" stroke-width="2" stroke-linejoin="round"/><circle cx="17" cy="21" r="4" fill="#a9be7c"/><circle cx="41" cy="24" r="3.5" fill="#e6c96a"/>`],
|
|
liens: [G, `<path d="M28 12l-8 31M28 12l8 31M22 30h12M24 22h8" fill="none" stroke="${G}" stroke-width="2.4" stroke-linecap="round"/><path d="M10 44c6-4 12-4 18 0s12 4 18 0" fill="none" stroke="${Q}" stroke-width="2.2" stroke-dasharray="3 3"/>`],
|
|
route: [Q, `<rect x="13" y="26" width="30" height="10" rx="4" fill="#fff" stroke="${G}" stroke-width="2.4"/><path d="M18 26l4-6h12l4 6" fill="none" stroke="${G}" stroke-width="2.4" stroke-linejoin="round"/><circle cx="20" cy="37" r="3" fill="${G}"/><circle cx="36" cy="37" r="3" fill="${G}"/>`],
|
|
voiture: [Q, `<rect x="12" y="27" width="32" height="10" rx="4" fill="#d6e6e6" stroke="${G}" stroke-width="2.2"/><path d="M17 27l4-6h14l4 6" fill="none" stroke="${G}" stroke-width="2.2" stroke-linejoin="round"/><circle cx="20" cy="38" r="3" fill="${G}"/><circle cx="36" cy="38" r="3" fill="${G}"/><circle cx="22" cy="16" r="2.4" fill="${Q}"/><circle cx="28" cy="15" r="2.4" fill="${Q}"/><circle cx="34" cy="16" r="2.4" fill="${Q}"/>`],
|
|
mouton: [V, `<ellipse cx="27" cy="31" rx="11" ry="7" fill="#f6f2e8" stroke="${G}" stroke-width="2"/><circle cx="20" cy="27" r="3.4" fill="#f6f2e8" stroke="${G}" stroke-width="1.6"/><circle cx="26" cy="25" r="3.6" fill="#f6f2e8" stroke="${G}" stroke-width="1.6"/><circle cx="33" cy="26" r="3.4" fill="#f6f2e8" stroke="${G}" stroke-width="1.6"/><ellipse cx="40" cy="30" rx="4" ry="3" fill="#5a5148"/><path d="M22 37v5M31 37v5" stroke="#5a5148" stroke-width="2"/>`],
|
|
};
|
|
|
|
export function picto(nom, bulles) {
|
|
if (LOGOS[nom]) return `<img src="${LOGOS[nom]}" alt="">`;
|
|
const d = DESSINS[nom];
|
|
if (d) return rond(d[0], d[1]);
|
|
if (bulles && bulles[nom]) return `<img src="${bulles[nom]}" alt="">`;
|
|
return rond(G, DESSINS.quartier[1]);
|
|
}
|