IAacademy / experience.py
MAALOUFimad02's picture
Upload 70 files
94cc713 verified
Raw History Blame Contribute Delete
3.37 kB
"""Motion and original SVG assets for the Gradio shell."""
from pathlib import Path
ROOT = Path(__file__).resolve().parent
CSS = (ROOT/'assets/experience.css').read_text(encoding='utf8')
JS = (ROOT/'assets/experience.js').read_text(encoding='utf8')
BRAND = '''<div class="academy-toolbar"><div class="academy-brand">IA Academy <span>Votre campus d’intelligence artificielle</span></div><button type="button" id="ia-motion-toggle" aria-pressed="false">Mettre les animations en pause</button></div>'''
HERO_ART = '''<div class="hero-illustration"><svg viewBox="0 0 400 340" role="img" aria-label="Des données deviennent un modèle, puis un projet : votre parcours d’apprentissage"><defs><linearGradient id="ia-core-gradient" x2="1" y2="1"><stop stop-color="#6488df"/><stop offset="1" stop-color="#7953b2"/></linearGradient></defs><g fill="none" stroke="#526c9e" stroke-width="1"><circle cx="200" cy="170" r="130" opacity=".4"/><ellipse class="orbit" cx="200" cy="170" rx="170" ry="70" stroke-dasharray="3 9"/><ellipse class="counter-orbit" cx="200" cy="170" rx="155" ry="104" stroke="#91cbbb" stroke-dasharray="1 10"/></g><g stroke="#a2c7ee" fill="none" class="signal"><path d="M85 90L200 170L315 90M80 253L200 170L310 260"/><path d="M200 170L200 40"/></g><g class="ai-core"><rect x="154" y="124" width="92" height="92" rx="27" fill="url(#ia-core-gradient)" stroke="#c0cdff"/><text x="200" y="181" text-anchor="middle" style="font-size:30px;font-weight:800;fill:white">IA</text></g><g class="float-a"><rect x="28" y="55" width="107" height="60" rx="14" fill="#1c3653" stroke="#7eacbc"/><path d="M46 72h25m-25 8h25m-25 8h25" stroke="#a7ebd9" stroke-width="2"/><text x="79" y="88">Data</text><rect x="260" y="57" width="111" height="60" rx="14" fill="#292d56" stroke="#9e99d5"/><path d="M278 75l-7 9 7 9m22-18 7 9-7 9m-14 2 7-23" fill="none" stroke="#c8cbff" stroke-width="2"/><text x="317" y="88">Code</text></g><g class="float-b"><rect x="26" y="228" width="115" height="60" rx="14" fill="#243956" stroke="#7d9ed2"/><path d="M43 270v-15m9 15v-26m9 26v-20" stroke="#9fc2ff" stroke-width="4"/><text x="74" y="263">Modèle</text><rect x="260" y="232" width="115" height="60" rx="14" fill="#193b3d" stroke="#72b6aa"/><path d="m278 263 7 7 14-17" stroke="#a5f4da" stroke-width="3" fill="none"/><text x="307" y="268">Projet</text></g><circle cx="200" cy="40" r="11" fill="#9ee8d5"/><text x="200" y="320" text-anchor="middle" style="letter-spacing:2px;font-size:10px;fill:#a4bddc">COMPRENDRE · ESSAYER · PROGRESSER</text></svg></div>'''
ICONS = [
'<circle cx="12" cy="12" r="4"/><path d="M12 2v3m0 14v3M2 12h3m14 0h3M5 5l2 2m10 10 2 2M5 19l2-2M17 7l2-2"/>',
'<ellipse cx="12" cy="5" rx="8" ry="3"/><path d="M4 5v14c0 4 16 4 16 0V5M4 12c0 4 16 4 16 0"/>',
'<path d="M4 19V5m0 14h16M7 15l4-5 4 3 5-8"/><circle cx="11" cy="10" r="1"/>',
'<circle cx="5" cy="5" r="2"/><circle cx="5" cy="19" r="2"/><circle cx="19" cy="5" r="2"/><circle cx="19" cy="19" r="2"/><circle cx="12" cy="12" r="2"/><path d="m7 7 3 3m4 4 3 3M7 17l3-3m4-4 3-3"/>',
'<path d="M4 6h16v12H4zM8 6V3m8 3V3M8 18v3m8-3v3"/><circle cx="9" cy="11" r="1"/><circle cx="15" cy="11" r="1"/><path d="M9 15h6"/>',
'<path d="M4 5h16v11H9l-5 4zM8 9h8m-8 4h5"/>',
]
def branch_icon(index):
return '<div class="branch-icon" aria-hidden="true"><svg viewBox="0 0 24 24">'+ICONS[index % len(ICONS)]+'</svg></div>'