Compare commits

..
4 Commits
Author SHA1 Message Date
Spark 6fdf39959c chore(release): Kanbante 0.15.0 — header unifié desktop/mobile
CI / test (push) Successful in 1m54s
2026-10-11 20:15:23 -04:00
Spark 18e1dd0f3d test(0.15.0): header partagé, états actifs, exceptions wall — 5 tests, 170 au total 2026-10-11 20:15:23 -04:00
Spark 58204e621e fix(forecast): semaines calées sur le référentiel UTC du journal
Les horodatages board_events sont en UTC (SQLite): une fermeture
en soirée locale tombait hors des semaines locales et faussait
le débit hebdomadaire.
2026-10-11 20:15:23 -04:00
Spark 2fde103e93 feat(nav): header unifié desktop/mobile (issue #16)
Partiel _header.html unique pour les 19 pages (fin des copies qui
dérivaient): desktop une ligne — primaires + menu Plus + Ctrl K,
page active déduite du gabarit dans render(); mobile ≤900px
burger + panneau ≥44px, Échap/clic extérieur; wallboard sans
header et triage sur le même partiel. nav.js partagé.
2026-10-11 20:15:23 -04:00
29 changed files with 291 additions and 332 deletions
+24
View File
@@ -1,5 +1,29 @@
# Changelog
## 0.15.0 — 2026-10-11
### Nouveautés
- **Header refait** (issue #16, créée et spécifiée par Bruno) :
les 19 copies de markup de header sont remplacées par un
**partiel unique `_header.html`**. Desktop : une seule ligne —
5 entrées primaires (Projets, Focus, Aujourd'hui, Recherche,
Capture), menu « Plus ▾ » pour les 9 autres, Ctrl+K à droite,
page active marquée (y compris dans « Plus »). Mobile
(≤ 900 px) : burger + panneau plein largeur, cibles ≥ 44 px,
fermeture Échap / clic extérieur. La page active est déduite du
gabarit dans `render()` (`active_nav`) — une seule source de
vérité. Le wallboard garde son plein écran sans header et la
session triage utilise le même partiel. `static/js/nav.js`
partagé, aucune dépendance ajoutée.
### Corrigé
- Prévisions : les semaines se calent désormais sur le référentiel
du journal (UTC, comme les horodatages `board_events`) — une
fermeture journalisée en soirée locale (déjà le lendemain en
UTC) tombait hors de toutes les semaines et faussait le débit.
5 tests ajoutés (170 au total).
## 0.14.0 — 2026-10-11
### Nouveautés
+1 -1
View File
@@ -89,7 +89,7 @@ from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
APP_VERSION = "0.14.0"
APP_VERSION = "0.15.0"
def _env_bool(name: str, default: bool) -> bool:
+1 -1
View File
@@ -143,7 +143,7 @@ async def _mcp_session(client: httpx.AsyncClient, url: str, token: str) -> None:
{
"protocolVersion": MCP_PROTOCOL_VERSION,
"capabilities": {},
"clientInfo": {"name": "kanbante", "version": "0.14.0"},
"clientInfo": {"name": "kanbante", "version": "0.15.0"},
},
req_id=1,
)
+11 -3
View File
@@ -7,7 +7,15 @@ date, and are withheld entirely when the journal has no closures
to learn from — "not enough history" is an answer, too.
"""
from datetime import date, datetime, timedelta
from datetime import date, datetime, timedelta, timezone
def _journal_today() -> date:
"""'Today' in the journal's frame: board_events stamps are UTC
(SQLite datetime('now')), so week buckets anchor to UTC —
otherwise closures logged in the local evening (already
tomorrow in UTC) fall outside every bucket."""
return datetime.now(timezone.utc).date()
MONTHS_FR = [
"janvier", "février", "mars", "avril", "mai", "juin",
@@ -35,7 +43,7 @@ def _event_date(event: dict) -> date | None:
def weekly_closures(events: list[dict], weeks: int = 8,
today: date | None = None) -> list[dict]:
"""Closure counts per ISO week, oldest first, current week last."""
today = today or date.today()
today = today or _journal_today()
current_monday = today - timedelta(days=today.weekday())
buckets: list[dict] = []
for i in range(weeks - 1, -1, -1):
@@ -83,7 +91,7 @@ def estimate(remaining: int, weekly: list[dict],
no throughput to project from, else dates: central (avg rate),
earliest (best week), latest (worst nonzero week, if any).
"""
today = today or date.today()
today = today or _journal_today()
if remaining <= 0:
return {"done": True}
stats = throughput_stats(weekly)
+22
View File
@@ -292,6 +292,27 @@ _tpl_env = Environment(
)
# Which main-nav entry a template represents (issue #16): the
# shared _header.html partial highlights it from this one place
# instead of 19 hand-maintained copies.
_NAV_BY_TEMPLATE = {
"dashboard.html": "home",
"focus.html": "focus",
"today.html": "today",
"my.html": "my",
"activity.html": "activity",
"briefing.html": "briefing",
"standup.html": "standup",
"search.html": "search",
"capture.html": "capture",
"digest.html": "digest",
"forecast.html": "forecast",
"rules.html": "rules",
"health.html": "health",
"health_project.html": "health",
}
def render(
request: Request, name: str, status_code: int = 200, **context
) -> HTMLResponse:
@@ -307,6 +328,7 @@ def render(
token = secrets.token_urlsafe(32)
context.setdefault("csrf_token", token)
context.setdefault("version", APP_VERSION)
context.setdefault("active_nav", _NAV_BY_TEMPLATE.get(name, ""))
html = _tpl_env.get_template(name).render(**context)
response = HTMLResponse(html, status_code=status_code)
if generated:
+63
View File
@@ -0,0 +1,63 @@
{# ── Header global partagé (issue #16) ─────────────────────────────
NE PAS dupliquer ce markup dans les pages : c'est l'unique source.
Page active : variable `active_nav` (déduite du gabarit dans
render(), app/main.py). Fil d'Ariane projet : `owner`+`repo`
(board) ou `full_name` (pages projet). Lien Gitea externe si
`repo_info.html_url` est présent (board).
Desktop : primaires + menu « Plus ▾ ». Mobile : burger + panneau.
Le wallboard (TV) n'inclut pas ce partiel, volontairement. #}
<header class="app-header">
<div class="brand">
<a href="/" class="logo" aria-label="Kanbante — accueil"><span class="logo-mark">📋</span><span class="gradient-text">Kanbante</span></a>
{% if owner is defined and repo is defined %}
<span class="crumb"><span class="sep">/</span> <a href="/board/{{ owner }}/{{ repo }}">{{ owner }} / <strong>{{ repo }}</strong></a></span>
{% elif full_name is defined %}
<span class="crumb"><span class="sep">/</span> <a href="/board/{{ full_name }}">{{ full_name }}</a></span>
{% endif %}
</div>
<nav class="nav-pills main-nav" aria-label="Navigation principale">
<a href="/" class="nav-pill{% if active_nav == 'home' %} active{% endif %}">🏠 Projets</a>
<a href="/focus" class="nav-pill{% if active_nav == 'focus' %} active{% endif %}">🎯 Focus</a>
<a href="/today" class="nav-pill{% if active_nav == 'today' %} active{% endif %}">🌅 Aujourd'hui</a>
<a href="/search" class="nav-pill{% if active_nav == 'search' %} active{% endif %}">🔍 Recherche</a>
<a href="/capture" class="nav-pill{% if active_nav == 'capture' %} active{% endif %}">⚡ Capture</a>
<div class="nav-more">
<button type="button" class="nav-pill nav-more-btn{% if active_nav in ['my', 'activity', 'briefing', 'standup', 'digest', 'forecast', 'rules', 'health'] %} active-soft{% endif %}" id="nav-more-btn" aria-expanded="false" aria-controls="nav-more-menu">Plus <span aria-hidden="true">▾</span></button>
<div class="nav-more-menu" id="nav-more-menu" role="menu" hidden>
<a href="/my" class="nav-pill{% if active_nav == 'my' %} active{% endif %}" role="menuitem">👤 Mes issues</a>
<a href="/activity" class="nav-pill{% if active_nav == 'activity' %} active{% endif %}" role="menuitem">📰 Activité</a>
<a href="/briefing" class="nav-pill{% if active_nav == 'briefing' %} active{% endif %}" role="menuitem">📊 Briefing</a>
<a href="/standup" class="nav-pill{% if active_nav == 'standup' %} active{% endif %}" role="menuitem">🗣️ Standup</a>
<a href="/digest" class="nav-pill{% if active_nav == 'digest' %} active{% endif %}" role="menuitem">🧠 Digest</a>
<a href="/forecast" class="nav-pill{% if active_nav == 'forecast' %} active{% endif %}" role="menuitem">🔮 Prévisions</a>
<a href="/rules" class="nav-pill{% if active_nav == 'rules' %} active{% endif %}" role="menuitem">⚙️ Règles</a>
<a href="/health" class="nav-pill{% if active_nav == 'health' %} active{% endif %}" role="menuitem">🩺 Santé</a>
<a href="/wall" class="nav-pill" role="menuitem">🖥️ Wallboard</a>
</div>
</div>
</nav>
<div class="header-actions">
{% if repo_info is defined and repo_info and repo_info.html_url %}
<a href="{{ repo_info.html_url }}" target="_blank" rel="noopener" class="nav-pill" title="Ouvrir ce dépôt dans Gitea">🔗 Gitea ↗</a>
{% endif %}
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
<button type="button" class="nav-burger" id="nav-burger" aria-expanded="false" aria-controls="mobile-nav" aria-label="Ouvrir le menu">☰</button>
</div>
<nav class="mobile-nav" id="mobile-nav" aria-label="Menu mobile" hidden>
<a href="/" class="{% if active_nav == 'home' %}active{% endif %}">🏠 Projets</a>
<a href="/focus" class="{% if active_nav == 'focus' %}active{% endif %}">🎯 Focus</a>
<a href="/today" class="{% if active_nav == 'today' %}active{% endif %}">🌅 Aujourd'hui</a>
<a href="/search" class="{% if active_nav == 'search' %}active{% endif %}">🔍 Recherche</a>
<a href="/capture" class="{% if active_nav == 'capture' %}active{% endif %}">⚡ Capture</a>
<a href="/my" class="{% if active_nav == 'my' %}active{% endif %}">👤 Mes issues</a>
<a href="/activity" class="{% if active_nav == 'activity' %}active{% endif %}">📰 Activité</a>
<a href="/briefing" class="{% if active_nav == 'briefing' %}active{% endif %}">📊 Briefing</a>
<a href="/standup" class="{% if active_nav == 'standup' %}active{% endif %}">🗣️ Standup</a>
<a href="/digest" class="{% if active_nav == 'digest' %}active{% endif %}">🧠 Digest</a>
<a href="/forecast" class="{% if active_nav == 'forecast' %}active{% endif %}">🔮 Prévisions</a>
<a href="/rules" class="{% if active_nav == 'rules' %}active{% endif %}">⚙️ Règles</a>
<a href="/health" class="{% if active_nav == 'health' %}active{% endif %}">🩺 Santé</a>
<a href="/wall">🖥️ Wallboard</a>
</nav>
<script src="/static/js/nav.js" defer></script>
</header>
+1 -23
View File
@@ -8,29 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<div class="brand">
<a href="/" class="logo" aria-label="Kanbante — accueil"><span class="logo-mark">📋</span><span class="gradient-text">Kanbante</span></a>
<span class="crumb"><span class="sep">/</span> 📰 <strong>Activité</strong></span>
</div>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill active">📰 Activité</a>
<a href="/briefing" class="nav-pill">📊 Briefing</a>
<a href="/standup" class="nav-pill">🗣️ Standup</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<p class="focus-intro">Les {{ events|length }} derniers événements du journal — déplacements, créations, fermetures et commentaires, tous projets confondus.</p>
+1 -24
View File
@@ -12,30 +12,7 @@
<script src="/static/js/board.js" defer></script>
</head>
<body>
<header class="app-header">
<div class="brand">
<a href="/" class="logo" aria-label="Kanbante — accueil"><span class="logo-mark">📋</span><span class="gradient-text">Kanbante</span></a>
<span class="crumb"><span class="sep">/</span> {{ owner }} / <strong>{{ repo }}</strong></span>
</div>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
{% if repo_info.html_url %}
<a href="{{ repo_info.html_url }}" target="_blank" class="nav-pill">🔗 Gitea ↗</a>
{% endif %}
</nav>
</header>
{% include "_header.html" %}
{% if milestones %}
<div class="milestone-bar">
+1 -21
View File
@@ -9,27 +9,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<div class="brand">
<a href="/" class="logo" aria-label="Kanbante — accueil"><span class="logo-mark">📋</span><span class="gradient-text">Kanbante</span></a>
<span class="crumb"><span class="sep">/</span> 📊 <strong>Briefing</strong></span>
</div>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<p class="focus-intro">Le briefing du <strong>{{ data.date }}</strong> — le même contenu que celui poussé sur ntfy.</p>
+1 -20
View File
@@ -8,26 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/briefing" class="nav-pill">📊 Briefing</a>
<a href="/standup" class="nav-pill">🗣️ Standup</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill active">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<section class="briefing-card">
+1 -22
View File
@@ -9,28 +9,7 @@
<script defer src="/static/vendor/alpine.min.js"></script>
</head>
<body>
<header class="app-header">
<div class="brand">
<a href="/" class="logo" aria-label="Kanbante — accueil"><span class="logo-mark">📋</span><span class="gradient-text">Kanbante</span></a>
</div>
<nav class="nav-pills">
<a href="/" class="nav-pill active">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/briefing" class="nav-pill">📊 Briefing</a>
<a href="/standup" class="nav-pill">🗣️ Standup</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<section class="hero">
<div class="hero-text">
+1 -17
View File
@@ -8,23 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/briefing" class="nav-pill">📊 Briefing</a>
<a href="/standup" class="nav-pill">🗣️ Standup</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill active">🧠 Digest</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<section class="briefing-card">
+1 -12
View File
@@ -7,18 +7,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<div class="brand">
<a href="/" class="logo" aria-label="Kanbante — accueil"><span class="logo-mark">📋</span><span class="gradient-text">Kanbante</span></a>
</div>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
</nav>
</header>
{% include "_header.html" %}
<main class="error-main">
<div class="error-box">
<h2>⚠️ Quelque chose s'est mal passé</h2>
+1 -23
View File
@@ -8,29 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<div class="brand">
<a href="/" class="logo" aria-label="Kanbante — accueil"><span class="logo-mark">📋</span><span class="gradient-text">Kanbante</span></a>
<span class="crumb"><span class="sep">/</span> 🎯 <strong>Focus</strong></span>
</div>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill active">🎯 Focus</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/briefing" class="nav-pill">📊 Briefing</a>
<a href="/standup" class="nav-pill">🗣️ Standup</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
<span class="badge">{{ groups|map(attribute='cards')|map('length')|sum }} cartes en cours</span>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<p class="focus-intro">Tout ce qui est <strong>En cours</strong> ou <strong>En révision</strong>, tous projets actifs confondus.</p>
+1 -18
View File
@@ -8,24 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/briefing" class="nav-pill">📊 Briefing</a>
<a href="/standup" class="nav-pill">🗣️ Standup</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill active">🔮 Prévisions</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<section class="briefing-card">
+1 -13
View File
@@ -8,19 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill active">🩺 Santé</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<section class="briefing-card">
+1 -9
View File
@@ -8,15 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/board/{{ full_name }}" class="nav-pill">📋 Board</a>
<a href="/health" class="nav-pill active">🩺 Santé</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
{% if health is none %}
+1 -21
View File
@@ -8,27 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<div class="brand">
<a href="/" class="logo" aria-label="Kanbante — accueil"><span class="logo-mark">📋</span><span class="gradient-text">Kanbante</span></a>
<span class="crumb"><span class="sep">/</span> 👤 <strong>Mes issues</strong></span>
</div>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill active">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
{% if not user %}
+1 -12
View File
@@ -8,18 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill active">⚙️ Règles</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<section class="briefing-card">
+1 -21
View File
@@ -8,27 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<div class="brand">
<a href="/" class="logo" aria-label="Kanbante — accueil"><span class="logo-mark">📋</span><span class="gradient-text">Kanbante</span></a>
<span class="crumb"><span class="sep">/</span> 🔍 <strong>Recherche</strong></span>
</div>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/search" class="nav-pill active">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<form method="get" action="/search" class="search-hero">
+1 -11
View File
@@ -10,17 +10,7 @@
<script src="/static/vendor/purify.min.js"></script>
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/board/{{ full_name }}" class="nav-pill">📋 Board</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
{% if markdown %}
+1 -11
View File
@@ -8,17 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/briefing" class="nav-pill">📊 Briefing</a>
<a href="/standup" class="nav-pill">🗣️ Standup</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<section class="briefing-card">
+1 -20
View File
@@ -8,26 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill active">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/briefing" class="nav-pill">📊 Briefing</a>
<a href="/standup" class="nav-pill">🗣️ Standup</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="today-main">
<h1 class="today-title">🌅 {{ date_label }}</h1>
+1 -20
View File
@@ -8,26 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/" class="nav-pill">🏠 Projets</a>
<a href="/focus" class="nav-pill">🎯 Focus</a>
<a href="/today" class="nav-pill">🌅 Aujourd'hui</a>
<a href="/my" class="nav-pill">👤 Mes issues</a>
<a href="/activity" class="nav-pill">📰 Activité</a>
<a href="/briefing" class="nav-pill">📊 Briefing</a>
<a href="/standup" class="nav-pill">🗣️ Standup</a>
<a href="/search" class="nav-pill">🔍 Recherche</a>
<a href="/capture" class="nav-pill">⚡ Capture</a>
<a href="/digest" class="nav-pill">🧠 Digest</a>
<a href="/forecast" class="nav-pill">🔮 Prévisions</a>
<a href="/rules" class="nav-pill">⚙️ Règles</a>
<a href="/health" class="nav-pill">🩺 Santé</a>
<a href="/wall" class="nav-pill">🖥️ Wallboard</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="focus-main">
<section class="briefing-card">
+1 -8
View File
@@ -8,14 +8,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<header class="app-header">
<a href="/" class="logo">📋 Kanbante</a>
<nav class="nav-pills">
<a href="/board/{{ full_name }}" class="nav-pill">📋 Board</a>
<a href="/triage" class="nav-pill">📥 Autre projet</a>
<button type="button" class="nav-pill palette-trigger" title="Palette de commandes (Ctrl+K)">⌨️ Ctrl K</button>
</nav>
</header>
{% include "_header.html" %}
<main class="triage-main" data-repo="{{ full_name }}">
<div class="triage-head">
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "kanbante"
version = "0.14.0"
version = "0.15.0"
description = "Kanban project manager integrated with Gitea"
requires-python = ">=3.11"
dependencies = [
+45
View File
@@ -1164,3 +1164,48 @@ footer {
.health-table th, .health-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border, #22304a); }
.health-slowest td { color: var(--warn, #e8a33d); font-weight: 600; }
.zombie-actions { display: flex; gap: 6px; flex-shrink: 0; }
/* ── Header unifié (0.15.0, #16) ── */
.main-nav { flex-wrap: nowrap; }
.header-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.nav-more { position: relative; }
.nav-more-btn { background: transparent; cursor: pointer; }
.nav-more-btn.active-soft { color: var(--text); border-color: var(--accent, #58a6ff); }
.nav-more-menu {
position: absolute; right: 0; top: calc(100% + 8px); z-index: 120;
min-width: 232px; display: flex; flex-direction: column; gap: 2px;
background: var(--surface-1, #131a29); border: 1px solid var(--border);
border-radius: 12px; padding: 6px;
box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.nav-more-menu .nav-pill { display: flex; border-radius: 8px; }
.nav-more-menu[hidden], .mobile-nav[hidden] { display: none !important; }
.nav-burger {
display: none; width: 40px; height: 40px; border-radius: 10px;
background: var(--surface-2); border: 1px solid var(--border);
color: var(--text); font-size: 1.05rem; cursor: pointer;
align-items: center; justify-content: center;
}
.mobile-nav {
position: absolute; top: 100%; left: 0; right: 0; z-index: 110;
display: flex; flex-direction: column; gap: 2px;
background: rgba(16, 19, 28, 0.97); backdrop-filter: blur(14px);
border-bottom: 1px solid var(--border); padding: 10px 14px 16px;
}
.mobile-nav a {
display: flex; align-items: center; min-height: 44px;
padding: 10px 12px; border-radius: 10px;
color: var(--text-2); font-size: 1rem; text-decoration: none;
}
.mobile-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.mobile-nav a.active {
color: #fff;
background: linear-gradient(135deg, rgba(124,92,252,.85), rgba(91,138,247,.85));
}
.crumb a { color: inherit; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
@media (max-width: 900px) {
.main-nav { display: none; }
.nav-burger { display: inline-flex; }
.crumb { display: none; }
}
+55
View File
@@ -0,0 +1,55 @@
/**
* Kanbante — header navigation (issue #16): the "Plus" dropdown on
* desktop and the burger panel on mobile. One shared partial
* (_header.html), one shared behaviour: this file.
*/
(function () {
var moreBtn = document.getElementById('nav-more-btn');
var moreMenu = document.getElementById('nav-more-menu');
var burger = document.getElementById('nav-burger');
var mobileNav = document.getElementById('mobile-nav');
function setOpen(menu, btn, open) {
if (!menu || !btn) return;
menu.hidden = !open;
btn.setAttribute('aria-expanded', open ? 'true' : 'false');
}
function closeAll() {
setOpen(moreMenu, moreBtn, false);
setOpen(mobileNav, burger, false);
if (burger) {
burger.textContent = '☰';
burger.setAttribute('aria-label', 'Ouvrir le menu');
}
}
if (moreBtn && moreMenu) {
moreBtn.addEventListener('click', function (e) {
e.stopPropagation();
var willOpen = moreMenu.hidden;
closeAll();
setOpen(moreMenu, moreBtn, willOpen);
});
moreMenu.addEventListener('click', function (e) { e.stopPropagation(); });
}
if (burger && mobileNav) {
burger.addEventListener('click', function (e) {
e.stopPropagation();
var willOpen = mobileNav.hidden;
closeAll();
setOpen(mobileNav, burger, willOpen);
burger.textContent = willOpen ? '✕' : '☰';
burger.setAttribute('aria-label', willOpen ? 'Fermer le menu' : 'Ouvrir le menu');
});
}
document.addEventListener('click', function () { closeAll(); });
document.addEventListener('keydown', function (e) {
if (e.key === 'Escape') closeAll();
});
window.addEventListener('resize', function () {
if (window.innerWidth > 900) {
closeAll();
if (burger) burger.textContent = '☰';
}
});
})();
+49
View File
@@ -0,0 +1,49 @@
"""Palier 12 (0.15.0): header unifié desktop/mobile (issue #16)."""
def test_shared_header_on_app_pages(client, fake_gitea):
for path in ("/", "/focus", "/today", "/briefing", "/forecast",
"/rules", "/health", "/standup", "/capture"):
page = client.get(path)
assert page.status_code == 200, path
assert page.text.count('id="nav-more-btn"') == 1, path
assert page.text.count('id="nav-burger"') == 1, path
assert page.text.count('id="mobile-nav"') == 1, path
assert "/static/js/nav.js" in page.text, path
# Primaires visibles, secondaires dans le menu « Plus ».
assert 'href="/today"' in page.text
assert 'href="/health"' in page.text # présent (menu Plus/mobile)
assert 'class="nav-pills main-nav"' in page.text
def test_active_states(client, fake_gitea):
home = client.get("/")
assert 'href="/" class="nav-pill active"' in home.text
forecast = client.get("/forecast")
# La page active est dans « Plus » : bouton marqué + lien actif.
assert "active-soft" in forecast.text
assert 'href="/forecast" class="nav-pill active"' in forecast.text
today = client.get("/today")
assert 'href="/today" class="nav-pill active"' in today.text
def test_board_header_crumb_and_gitea_link(client, fake_gitea):
board = client.get("/board/Projets/demo")
assert board.status_code == 200
assert 'href="/board/Projets/demo"' in board.text # fil d'Ariane
assert "Gitea ↗" in board.text
assert 'id="nav-burger"' in board.text
def test_wall_has_no_app_header(client, fake_gitea):
wall = client.get("/wall")
assert wall.status_code == 200
assert 'id="nav-burger"' not in wall.text # plein écran TV assumé
def test_nav_js_contract(client, fake_gitea):
js = client.get("/static/js/nav.js")
assert js.status_code == 200
assert "nav-burger" in js.text
assert "Escape" in js.text
assert "aria-expanded" in js.text