Évolution du thème existant "étiquette d'inventaire" plutôt que remplacement : couche de tokens sémantiques + échelles espacement/ typographie, mode sombre via prefers-color-scheme, hiérarchie de boutons (primaire/secondaire/danger), icônes SVG et état actif dans la nav, fil d'Ariane et compteur de résultats sur /materiels, badges de stock bas réutilisés depuis /scan, formulaire de planification regroupé en carte sur /destinataires, et correctif de contraste en mode sombre (inputs natifs + boutons qui restaient rendus en clair). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EEC2W1xtjmpHkEYgua7gWC
58 lines
2.6 KiB
HTML
58 lines
2.6 KiB
HTML
<!doctype html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block titre %}Gestion de stock IT{% endblock %}</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body>
|
|
<a href="#contenu" class="lien-evitement">Aller au contenu</a>
|
|
|
|
{#
|
|
Icônes SVG dessinées à la main (traits simples, currentColor) plutôt
|
|
qu'une icon font externe : le poste peut tourner sans accès internet
|
|
(voir CLAUDE.md), donc rien qui dépende d'un CDN.
|
|
|
|
L'état actif compare request.url.path au préfixe de chaque section :
|
|
"request" est injecté automatiquement dans le contexte Jinja par
|
|
Starlette (TemplateResponse(request, ...)), donc aucune route n'a
|
|
besoin de le transmettre explicitement pour que ça fonctionne ici.
|
|
#}
|
|
{% set chemin = request.url.path %}
|
|
<nav>
|
|
<a href="/materiels" {{ 'aria-current="page"' | safe if chemin == "/materiels" or chemin == "/" else "" }}>
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M21 8 12 3 3 8v8l9 5 9-5Z"></path>
|
|
<path d="M3 8l9 5 9-5"></path>
|
|
<path d="M12 13v8"></path>
|
|
</svg>
|
|
Matériels
|
|
</a>
|
|
<a href="/categories" {{ 'aria-current="page"' | safe if chemin.startswith("/categories") else "" }}>
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M3 7a1 1 0 0 1 1-1h5l2 2h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1Z"></path>
|
|
</svg>
|
|
Catégories
|
|
</a>
|
|
<a href="/scan" {{ 'aria-current="page"' | safe if chemin.startswith("/scan") else "" }}>
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M3 7V4h3M21 7V4h-3M3 17v3h3M21 17v3h-3"></path>
|
|
<path d="M7 6v12M11 6v12M14 6v12M18 6v12"></path>
|
|
</svg>
|
|
Scanner
|
|
</a>
|
|
<a href="/destinataires" {{ 'aria-current="page"' | safe if chemin.startswith("/destinataires") else "" }}>
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
<path d="M12 4a5 5 0 0 0-5 5v3l-2 4h14l-2-4V9a5 5 0 0 0-5-5Z"></path>
|
|
<path d="M9.5 20a2.5 2.5 0 0 0 5 0"></path>
|
|
</svg>
|
|
Alertes
|
|
</a>
|
|
</nav>
|
|
<main id="contenu">
|
|
{% block contenu %}{% endblock %}
|
|
</main>
|
|
</body>
|
|
</html>
|