Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4b3b324f5 | ||
|
|
d395642f16 | ||
|
|
ec3590d25f | ||
|
|
16f03184bf |
@@ -1,5 +1,28 @@
|
||||
# Changelog
|
||||
|
||||
## 0.16.0 — 2026-10-11
|
||||
|
||||
### Nouveautés
|
||||
- **Layout repensé** (issue #16, retour de Bruno sur la 0.15.0 :
|
||||
disposition pas conviviale, trop de place, mobile inchangé) —
|
||||
la barre de pilules horizontale disparaît au profit d'une
|
||||
**barre latérale** : navigation groupée (Principal, Rituels,
|
||||
Pilotage, Outils), bouton palette en tête, **repliable en rail
|
||||
d'icônes** sur desktop (état mémorisé par navigateur), et
|
||||
**tiroir hors-canvas** sur mobile (burger dans une topbar mince
|
||||
de 52 px : fil d'Ariane + actions contextuelles seulement).
|
||||
Le partiel `_header.html` reste l'unique source du cadre.
|
||||
- **Wallboard** : hauteur verrouillée à l'écran (`100dvh`,
|
||||
`overflow: hidden`) — **plus aucune barre de défilement de
|
||||
page** ; le pied de diapositive (« ✅ Fermées aujourd'hui »,
|
||||
« 📋 Ouvertes », « ● EN DIRECT ») reste **toujours visible**,
|
||||
au-dessus de la zone réservée à la navigation des diapos ; la
|
||||
liste des cartes se tronque avec un fondu et une ligne
|
||||
« … +N autres cartes en vol » ; mode compact sous 760 px de
|
||||
hauteur (TV 720p).
|
||||
|
||||
6 tests adaptés/ajoutés (171 au total).
|
||||
|
||||
## 0.15.0 — 2026-10-11
|
||||
|
||||
### Nouveautés
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ from pathlib import Path
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
APP_VERSION = "0.15.0"
|
||||
APP_VERSION = "0.16.0"
|
||||
|
||||
|
||||
def _env_bool(name: str, default: bool) -> bool:
|
||||
|
||||
+1
-1
@@ -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.15.0"},
|
||||
"clientInfo": {"name": "kanbante", "version": "0.16.0"},
|
||||
},
|
||||
req_id=1,
|
||||
)
|
||||
|
||||
@@ -1557,6 +1557,7 @@ async def _collect_wall_data(only_repo: str | None) -> list[dict]:
|
||||
"counts": {col: len(columns[col]) for col in KANBAN_COLUMNS},
|
||||
"open_total": len(open_issues),
|
||||
"cards": cards[:9],
|
||||
"cards_total": len(cards),
|
||||
"closed_today": closed_today.get(full_name, 0),
|
||||
}
|
||||
)
|
||||
|
||||
+76
-54
@@ -1,63 +1,85 @@
|
||||
{# ── 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.
|
||||
{# ── Cadre applicatif partagé (issue #16, refonte 0.16.0) ─────────
|
||||
Barre latérale unique pour TOUTES les pages applicatives :
|
||||
desktop = barre fixe repliable en rail d'icônes (état mémorisé),
|
||||
mobile = tiroir hors-canvas ouvert par le burger de la topbar.
|
||||
NE PAS dupliquer ce markup dans les pages.
|
||||
Page active : `active_nav` (déduite du gabarit dans render()).
|
||||
Fil d'Ariane : `owner`+`repo` (board) ou `full_name` (projet).
|
||||
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>
|
||||
<script>
|
||||
document.body.classList.add('with-sidebar');
|
||||
try {
|
||||
if (localStorage.getItem('kanbante-sidebar') === 'collapsed') {
|
||||
document.body.classList.add('sidebar-collapsed');
|
||||
}
|
||||
} catch (e) { /* stockage indisponible : état par défaut */ }
|
||||
</script>
|
||||
{% set nav_groups = [
|
||||
("Principal", [
|
||||
("home", "/", "🏠", "Projets"),
|
||||
("focus", "/focus", "🎯", "Focus"),
|
||||
("today", "/today", "🌅", "Aujourd'hui"),
|
||||
("my", "/my", "👤", "Mes issues"),
|
||||
]),
|
||||
("Rituels", [
|
||||
("briefing", "/briefing", "📊", "Briefing"),
|
||||
("standup", "/standup", "🗣️", "Standup"),
|
||||
("digest", "/digest", "🧠", "Digest"),
|
||||
]),
|
||||
("Pilotage", [
|
||||
("forecast", "/forecast", "🔮", "Prévisions"),
|
||||
("health", "/health", "🩺", "Santé"),
|
||||
("rules", "/rules", "⚙️", "Règles"),
|
||||
("activity", "/activity", "📰", "Activité"),
|
||||
]),
|
||||
("Outils", [
|
||||
("search", "/search", "🔍", "Recherche"),
|
||||
("capture", "/capture", "⚡", "Capture"),
|
||||
("wall", "/wall", "🖥️", "Wallboard"),
|
||||
]),
|
||||
] %}
|
||||
<aside class="sidebar" id="sidebar" aria-label="Navigation principale">
|
||||
<a href="/" class="side-logo" aria-label="Kanbante — accueil">
|
||||
<span class="logo-mark">📋</span>
|
||||
<span class="side-label gradient-text">Kanbante</span>
|
||||
</a>
|
||||
<button type="button" class="side-search palette-trigger" title="Palette de commandes (Ctrl+K)">
|
||||
<span class="side-ico">⌨️</span>
|
||||
<span class="side-label">Recherche & commandes</span>
|
||||
<kbd class="side-label">Ctrl K</kbd>
|
||||
</button>
|
||||
<nav class="side-nav">
|
||||
{% for group, links in nav_groups %}
|
||||
<div class="side-group">{{ group }}</div>
|
||||
{% for key, href, icon, label in links %}
|
||||
<a href="{{ href }}" class="side-link{% if active_nav == key %} active{% endif %}" title="{{ label }}">
|
||||
<span class="side-ico">{{ icon }}</span>
|
||||
<span class="side-label">{{ label }}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</nav>
|
||||
<div class="side-foot">
|
||||
<button type="button" class="side-collapse" id="side-collapse" aria-label="Replier ou déplier le menu">
|
||||
<span class="side-collapse-ico">«</span>
|
||||
<span class="side-label">Replier</span>
|
||||
</button>
|
||||
<span class="side-version side-label">v{{ version }}</span>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="side-backdrop" id="side-backdrop" hidden></div>
|
||||
<header class="app-header topbar">
|
||||
<button type="button" class="nav-burger" id="nav-burger" aria-expanded="false" aria-controls="sidebar" aria-label="Ouvrir le menu">☰</button>
|
||||
{% if owner is defined and repo is defined %}
|
||||
<span class="crumb"><a href="/board/{{ owner }}/{{ repo }}">{{ owner }} / <strong>{{ repo }}</strong></a></span>
|
||||
{% elif full_name is defined %}
|
||||
<span class="crumb"><a href="/board/{{ full_name }}">{{ full_name }}</a></span>
|
||||
{% endif %}
|
||||
<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>
|
||||
<button type="button" class="nav-pill palette-trigger topbar-search" title="Recherche et commandes (Ctrl+K)">🔍</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>
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% if slide.cards_total > slide.cards|length %}
|
||||
<li class="wall-card wall-more">… +{{ slide.cards_total - slide.cards|length }} autres cartes en vol</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p class="wall-idle">🌿 Rien en vol pour le moment — tout est au Backlog ou terminé.</p>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "kanbante"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
description = "Kanban project manager integrated with Gitea"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
|
||||
+109
-35
@@ -900,15 +900,21 @@ footer {
|
||||
color: #e5ecf5;
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wall-stage { position: relative; min-height: 100vh; }
|
||||
.wall-stage { position: relative; height: 100vh; height: 100dvh; }
|
||||
.wall-slide {
|
||||
display: none;
|
||||
min-height: 100vh;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
max-height: 100dvh;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
padding: 4vh 4vw;
|
||||
padding: 3.5vh 4vw 96px;
|
||||
flex-direction: column;
|
||||
gap: 3vh;
|
||||
gap: 2.5vh;
|
||||
}
|
||||
.wall-slide.active { display: flex; animation: wall-in 0.45s ease; }
|
||||
@keyframes wall-in { from { opacity: 0; } to { opacity: 1; } }
|
||||
@@ -934,7 +940,14 @@ footer {
|
||||
}
|
||||
.wall-count-n { display: block; font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 800; }
|
||||
.wall-count-l { display: block; color: #aebdd2; font-size: clamp(0.78rem, 1.25vw, 1.02rem); margin-top: 2px; }
|
||||
.wall-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
|
||||
.wall-cards {
|
||||
list-style: none; margin: 0; padding: 0;
|
||||
display: flex; flex-direction: column; gap: 12px;
|
||||
flex: 1 1 auto; min-height: 0; overflow: hidden;
|
||||
-webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent);
|
||||
mask-image: linear-gradient(to bottom, #000 88%, transparent);
|
||||
}
|
||||
.wall-more { justify-content: center; color: #8fa3bf; font-size: 1.1rem; background: transparent; }
|
||||
.wall-card {
|
||||
display: flex; align-items: center; gap: 18px;
|
||||
background: rgba(255, 255, 255, 0.045);
|
||||
@@ -954,8 +967,17 @@ footer {
|
||||
.wall-foot {
|
||||
margin-top: auto;
|
||||
display: flex; gap: 36px; flex-wrap: wrap;
|
||||
justify-content: space-between; align-items: center;
|
||||
width: 100%; box-sizing: border-box;
|
||||
font-size: clamp(1rem, 1.7vw, 1.35rem); color: #aebdd2;
|
||||
}
|
||||
@media (max-height: 760px) {
|
||||
.wall-slide { gap: 1.6vh; padding-top: 2.5vh; }
|
||||
.wall-card { padding: 10px 16px; }
|
||||
.wall-count { padding: 8px 8px 7px; }
|
||||
.wall-project { font-size: clamp(1.8rem, 4vw, 2.6rem); }
|
||||
.wall-time { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
|
||||
}
|
||||
.wall-live { color: #34d399; font-weight: 700; letter-spacing: 0.08em; }
|
||||
.wall-empty {
|
||||
min-height: 100vh; display: flex; flex-direction: column;
|
||||
@@ -1166,46 +1188,98 @@ footer {
|
||||
.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; }
|
||||
}
|
||||
|
||||
/* ── Barre latérale (0.16.0, #16 refonte) ── */
|
||||
body.with-sidebar { padding-left: 238px; transition: padding-left 0.18s ease; }
|
||||
body.with-sidebar.sidebar-collapsed { padding-left: 68px; }
|
||||
.sidebar {
|
||||
position: fixed; left: 0; top: 0; bottom: 0; z-index: 200;
|
||||
width: 238px; box-sizing: border-box;
|
||||
display: flex; flex-direction: column; gap: 6px;
|
||||
padding: 16px 12px 12px; overflow-y: auto; overflow-x: hidden;
|
||||
background: rgba(13, 16, 24, 0.96); backdrop-filter: blur(14px);
|
||||
border-right: 1px solid var(--border);
|
||||
transition: width 0.18s ease, transform 0.22s ease;
|
||||
}
|
||||
body.sidebar-collapsed .sidebar { width: 68px; }
|
||||
.side-logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; color: var(--text); font-size: 1.18rem; font-weight: 700; white-space: nowrap; }
|
||||
.side-logo:hover { text-decoration: none; }
|
||||
.side-search {
|
||||
display: flex; align-items: center; gap: 10px; width: 100%;
|
||||
padding: 9px 10px; margin-bottom: 8px; cursor: pointer;
|
||||
background: var(--surface-2); color: var(--text-2);
|
||||
border: 1px solid var(--border); border-radius: 10px; font-size: 0.9rem;
|
||||
white-space: nowrap; overflow: hidden;
|
||||
}
|
||||
.side-search:hover { color: var(--text); border-color: var(--accent, #58a6ff); }
|
||||
.side-search kbd {
|
||||
margin-left: auto; font-size: 0.72rem; background: var(--surface-3, #1d2942);
|
||||
border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px;
|
||||
}
|
||||
.side-nav { display: flex; flex-direction: column; gap: 2px; }
|
||||
.side-group {
|
||||
margin: 14px 10px 5px; font-size: 0.7rem; font-weight: 700;
|
||||
letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.side-link {
|
||||
display: flex; align-items: center; gap: 11px;
|
||||
padding: 8px 10px; border-radius: 9px;
|
||||
color: var(--text-2); font-size: 0.95rem; font-weight: 500;
|
||||
white-space: nowrap; border-left: 3px solid transparent;
|
||||
}
|
||||
.side-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
|
||||
.side-link.active {
|
||||
color: #fff; border-left-color: #a78bfa;
|
||||
background: linear-gradient(90deg, rgba(124,92,252,.32), rgba(91,138,247,.14));
|
||||
}
|
||||
.side-ico { font-size: 1.05rem; width: 22px; text-align: center; flex-shrink: 0; }
|
||||
.side-foot {
|
||||
margin-top: auto; padding-top: 12px;
|
||||
display: flex; align-items: center; justify-content: space-between; gap: 8px;
|
||||
}
|
||||
.side-collapse {
|
||||
display: flex; align-items: center; gap: 8px; cursor: pointer;
|
||||
background: transparent; border: 1px solid var(--border); border-radius: 9px;
|
||||
color: var(--text-2); padding: 6px 10px; font-size: 0.85rem; white-space: nowrap;
|
||||
}
|
||||
.side-collapse:hover { color: var(--text); }
|
||||
.side-collapse-ico { display: inline-block; transition: transform 0.18s ease; }
|
||||
body.sidebar-collapsed .side-collapse-ico { transform: rotate(180deg); }
|
||||
.side-version { color: var(--text-3); font-size: 0.8rem; }
|
||||
body.sidebar-collapsed .side-label,
|
||||
body.sidebar-collapsed .side-group { display: none; }
|
||||
body.sidebar-collapsed .side-link,
|
||||
body.sidebar-collapsed .side-search { justify-content: center; padding-left: 0; padding-right: 0; }
|
||||
body.sidebar-collapsed .side-logo { justify-content: center; padding-left: 0; padding-right: 0; }
|
||||
body.sidebar-collapsed .side-foot { justify-content: center; }
|
||||
.side-backdrop {
|
||||
position: fixed; inset: 0; z-index: 190;
|
||||
background: rgba(4, 6, 10, 0.55);
|
||||
}
|
||||
.topbar { min-height: 52px; padding: 8px 18px; justify-content: flex-start; gap: 14px; }
|
||||
.topbar-search { display: none; }
|
||||
@media (max-width: 900px) {
|
||||
body.with-sidebar, body.with-sidebar.sidebar-collapsed { padding-left: 0; }
|
||||
.sidebar { width: 264px; transform: translateX(-105%); box-shadow: none; }
|
||||
body.sidebar-open .sidebar { transform: none; box-shadow: 18px 0 44px rgba(0,0,0,.5); }
|
||||
body.sidebar-collapsed .side-label,
|
||||
body.sidebar-collapsed .side-group { display: initial; }
|
||||
body.sidebar-collapsed .side-link,
|
||||
body.sidebar-collapsed .side-search { justify-content: flex-start; padding-left: 10px; padding-right: 10px; }
|
||||
.side-foot { display: none; }
|
||||
.topbar-search { display: inline-flex; }
|
||||
}
|
||||
|
||||
+28
-38
@@ -1,55 +1,45 @@
|
||||
/**
|
||||
* 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.
|
||||
* Kanbante — sidebar behaviour (issue #16, 0.16.0 layout).
|
||||
* Desktop: collapse to an icon rail (persisted in localStorage).
|
||||
* Mobile: the same sidebar becomes an off-canvas drawer, toggled
|
||||
* by the topbar burger, closed by backdrop / Escape / navigation.
|
||||
*/
|
||||
(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');
|
||||
var backdrop = document.getElementById('side-backdrop');
|
||||
var collapseBtn = document.getElementById('side-collapse');
|
||||
|
||||
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);
|
||||
function closeDrawer() {
|
||||
document.body.classList.remove('sidebar-open');
|
||||
if (backdrop) backdrop.hidden = true;
|
||||
if (burger) {
|
||||
burger.setAttribute('aria-expanded', 'false');
|
||||
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');
|
||||
if (burger) {
|
||||
burger.addEventListener('click', function () {
|
||||
var open = document.body.classList.toggle('sidebar-open');
|
||||
burger.setAttribute('aria-expanded', open ? 'true' : 'false');
|
||||
burger.textContent = open ? '✕' : '☰';
|
||||
if (backdrop) backdrop.hidden = !open;
|
||||
});
|
||||
}
|
||||
document.addEventListener('click', function () { closeAll(); });
|
||||
if (backdrop) backdrop.addEventListener('click', closeDrawer);
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape') closeAll();
|
||||
if (e.key === 'Escape') closeDrawer();
|
||||
});
|
||||
window.addEventListener('resize', function () {
|
||||
if (window.innerWidth > 900) {
|
||||
closeAll();
|
||||
if (burger) burger.textContent = '☰';
|
||||
}
|
||||
if (window.innerWidth > 900) closeDrawer();
|
||||
});
|
||||
|
||||
if (collapseBtn) {
|
||||
collapseBtn.addEventListener('click', function () {
|
||||
var collapsed = document.body.classList.toggle('sidebar-collapsed');
|
||||
try {
|
||||
localStorage.setItem('kanbante-sidebar', collapsed ? 'collapsed' : 'open');
|
||||
} catch (e) { /* private mode: state lasts for the page only */ }
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
+48
-21
@@ -1,49 +1,76 @@
|
||||
"""Palier 12 (0.15.0): header unifié desktop/mobile (issue #16)."""
|
||||
"""Palier 12 (0.15.0 → refonte 0.16.0): layout barre latérale (#16)
|
||||
et wallboard sans défilement parasite."""
|
||||
|
||||
import app.main as main
|
||||
|
||||
|
||||
def test_shared_header_on_app_pages(client, fake_gitea):
|
||||
def test_sidebar_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="sidebar"') == 1, path
|
||||
assert page.text.count('id="nav-burger"') == 1, path
|
||||
assert page.text.count('id="mobile-nav"') == 1, path
|
||||
assert "with-sidebar" in page.text, 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
|
||||
# Les quatre groupes de la barre latérale.
|
||||
for group in ("Principal", "Rituels", "Pilotage", "Outils"):
|
||||
assert group in page.text, (path, group)
|
||||
assert 'href="/health"' in page.text
|
||||
assert 'id="side-collapse"' in page.text
|
||||
|
||||
|
||||
def test_active_states(client, fake_gitea):
|
||||
def test_sidebar_active_states(client, fake_gitea):
|
||||
home = client.get("/")
|
||||
assert 'href="/" class="nav-pill active"' in home.text
|
||||
assert 'href="/" class="side-link 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
|
||||
assert 'href="/forecast" class="side-link active"' in forecast.text
|
||||
today = client.get("/today")
|
||||
assert 'href="/today" class="nav-pill active"' in today.text
|
||||
assert 'href="/today" class="side-link active"' in today.text
|
||||
|
||||
|
||||
def test_board_header_crumb_and_gitea_link(client, fake_gitea):
|
||||
def test_board_topbar_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 'href="/board/Projets/demo"' in board.text # fil d'Ariane topbar
|
||||
assert "Gitea ↗" in board.text
|
||||
assert 'id="nav-burger"' in board.text
|
||||
assert 'id="sidebar"' in board.text
|
||||
|
||||
|
||||
def test_wall_has_no_app_header(client, fake_gitea):
|
||||
def test_wall_has_no_sidebar(client, fake_gitea):
|
||||
wall = client.get("/wall")
|
||||
assert wall.status_code == 200
|
||||
assert 'id="nav-burger"' not in wall.text # plein écran TV assumé
|
||||
assert 'id="sidebar"' not in wall.text # plein écran TV assumé
|
||||
assert "wall-foot" in wall.text
|
||||
|
||||
|
||||
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 "sidebar-collapsed" in js.text
|
||||
assert "localStorage" in js.text
|
||||
assert "side-backdrop" in js.text
|
||||
assert "Escape" in js.text
|
||||
assert "aria-expanded" in js.text
|
||||
|
||||
|
||||
def test_wall_more_cards_line(client, fake_gitea, monkeypatch):
|
||||
async def fake_collect(only_repo):
|
||||
return [{
|
||||
"full_name": "Projets/demo",
|
||||
"counts": {c: 0 for c in
|
||||
("backlog", "todo", "in_progress", "qa", "review", "done")},
|
||||
"open_total": 12,
|
||||
"cards": [
|
||||
{"number": i, "title": f"Carte {i}", "column": "in_progress",
|
||||
"column_label": "🚧 En cours", "age_days": 2, "aging": False}
|
||||
for i in range(1, 10)
|
||||
],
|
||||
"cards_total": 12,
|
||||
"closed_today": 1,
|
||||
}]
|
||||
|
||||
monkeypatch.setattr(main, "_collect_wall_data", fake_collect)
|
||||
page = client.get("/wall")
|
||||
assert page.status_code == 200
|
||||
assert "+3 autres cartes en vol" in page.text
|
||||
assert "📋 Ouvertes" in page.text
|
||||
|
||||
Reference in New Issue
Block a user