GET /api/palette: projets (filtrage local) + recherche globale
d'issues annotées de leur colonne. Composant partagé _palette.html
+ palette.js (actions, projets, issues; ↑↓/Entrée/Échap; bouton
⌨️ dans la navigation). Aucune librairie ajoutée.
76 lines
3.8 KiB
HTML
76 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr" data-theme="dark">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Recherche — Kanbante</title>
|
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🔍</text></svg>">
|
|
<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="/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="/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>
|
|
|
|
<main class="focus-main">
|
|
<form method="get" action="/search" class="search-hero">
|
|
<input type="text" name="q" value="{{ q }}" autofocus
|
|
placeholder="Rechercher dans toutes les issues de tous les projets...">
|
|
<button type="submit" class="btn-save btn-inline">Rechercher</button>
|
|
</form>
|
|
|
|
{% if q %}
|
|
<p class="focus-intro">{{ total }} résultat(s) pour « {{ q }} » — recherche Gitea, tous projets confondus.</p>
|
|
{% if not groups %}
|
|
<div class="empty-state">🔍 Aucune issue ne correspond. Essayez un mot plus court ou vérifiez l'orthographe.</div>
|
|
{% endif %}
|
|
{% for group in groups %}
|
|
<section class="focus-group">
|
|
<h2><a href="/board/{{ group.full_name }}">{{ group.full_name }}</a>
|
|
<span class="badge secondary">{{ group.rows|length }}</span></h2>
|
|
<div class="issue-results">
|
|
{% for row in group.rows %}
|
|
{% set issue = row.issue %}
|
|
<div class="issue-row">
|
|
<span class="issue-state">{{ '✅' if issue.state != 'open' else '🟢' }}</span>
|
|
<a class="issue-main" href="/board/{{ group.full_name }}">
|
|
<span class="card-id">#{{ issue.number }}</span> {{ issue.title }}
|
|
</a>
|
|
<span class="col-chip" style="background: {{ column_colors[row.column] }}20; color: {{ column_colors[row.column] }}">{{ column_labels[row.column] }}</span>
|
|
{% for label in issue.labels or [] %}
|
|
<span class="label-tag" style="background: #{{ label.color }}30; color: #{{ label.color }}">{{ label.name }}</span>
|
|
{% endfor %}
|
|
<span class="activity-date">{{ (issue.updated_at or '')[:10] }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
{% endfor %}
|
|
{% else %}
|
|
<div class="empty-state">🔍 Tapez un mot-clé : la recherche couvre les titres et corps d'issues de <strong>tous</strong> vos projets Gitea, ouverts comme fermés.</div>
|
|
{% endif %}
|
|
</main>
|
|
|
|
<footer>
|
|
Kanbante v{{ version }} · recherche globale
|
|
</footer>
|
|
<script src="/static/js/live.js" defer></script>
|
|
{% include "_palette.html" %}
|
|
<script src="/static/js/palette.js" defer></script>
|
|
</body>
|
|
</html>
|