feat: web app compagnon sur sliding_api - chat Narrator, plan, galerie, revision (C9)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Sliding — {% block title %}{% endblock %}</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a class="brand" href="/">SLIDING <span>· Pernod Ricard</span></a>
|
||||
<nav><a href="/logout">Déconnexion</a></nav>
|
||||
</header>
|
||||
<main>{% block content %}{% endblock %}</main>
|
||||
<div id="busy" class="htmx-indicator">Le NAS travaille…</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}{% block title %}Connexion{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card login">
|
||||
<h1>Sliding Automation</h1>
|
||||
<p class="hint">Mot de sécurité (le même que le connecteur MCP).</p>
|
||||
{% if error %}<p class="err">{{ error }}</p>{% endif %}
|
||||
<form method="POST" action="/login">
|
||||
<input type="password" name="word" placeholder="Mot de sécurité" autofocus>
|
||||
<button type="submit">Entrer</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,69 @@
|
||||
{% extends "base.html" %}{% block title %}{{ p.slug }}{% endblock %}
|
||||
{% block content %}
|
||||
<h1>{{ p.slug }}</h1>
|
||||
<div class="cols">
|
||||
<section class="card chatbox">
|
||||
<h2>Narrator</h2>
|
||||
<div id="chat">{{ chat_html | safe }}</div>
|
||||
<form hx-post="/p/{{ p.slug }}/chat" hx-target="#chat"
|
||||
hx-indicator="#busy"
|
||||
hx-on::after-request="this.reset();
|
||||
document.getElementById('chat').scrollTop = 1e9">
|
||||
<textarea name="message" rows="4"
|
||||
placeholder="Parle au Narrator (multiligne natif — f: et d: fonctionnent)"></textarea>
|
||||
<button type="submit">Envoyer</button>
|
||||
</form>
|
||||
<div class="actions">
|
||||
<button hx-post="/p/{{ p.slug }}/formalise"
|
||||
hx-target="#pipeline-out" hx-indicator="#busy"
|
||||
hx-confirm="Lancer Designer + Encoder + rendu (1-3 min) ?">
|
||||
Formaliser le deck</button>
|
||||
<button hx-post="/p/{{ p.slug }}/preview"
|
||||
hx-target="#gallery" hx-indicator="#busy">
|
||||
Générer les aperçus</button>
|
||||
{% if p.dernier_pptx %}
|
||||
<a class="btn" href="/p/{{ p.slug }}/download">Télécharger le PPTX</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="pipeline-out"></div>
|
||||
</section>
|
||||
<aside>
|
||||
<section class="card">
|
||||
<h2>Plan compact</h2>
|
||||
<form hx-post="/p/{{ p.slug }}/plan" hx-target="#plan-status"
|
||||
hx-indicator="#busy">
|
||||
<textarea name="plan_compact" rows="14">{{ p.plan_compact }}</textarea>
|
||||
<button type="submit">Sauvegarder</button>
|
||||
<span id="plan-status"></span>
|
||||
</form>
|
||||
</section>
|
||||
<section class="card">
|
||||
<h2>Documents</h2>
|
||||
<ul class="hint">{% for d in p.documents %}<li>{{ d }}</li>{% endfor %}</ul>
|
||||
<form method="POST" action="/p/{{ p.slug }}/upload"
|
||||
enctype="multipart/form-data">
|
||||
<input type="file" name="file"><button type="submit">Déposer</button>
|
||||
</form>
|
||||
</section>
|
||||
<section class="card">
|
||||
<h2>Assets (images)</h2>
|
||||
<ul class="hint">{% for a in p.assets %}<li>{{ a }}</li>{% endfor %}</ul>
|
||||
<form method="POST" action="/p/{{ p.slug }}/upload_asset"
|
||||
enctype="multipart/form-data">
|
||||
<input type="file" name="file" accept="image/*">
|
||||
<button type="submit">Déposer</button>
|
||||
</form>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
<section id="gallery">
|
||||
{% if previews %}
|
||||
<div class="gallery">
|
||||
{% for n in previews %}
|
||||
<figure><img src="/p/{{ p.slug }}/previews/{{ n }}" loading="lazy">
|
||||
<figcaption>{{ n }}</figcaption></figure>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}{% block title %}Projets{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Projets</h1>
|
||||
<form class="newproj" method="POST" action="/projects">
|
||||
<input name="nom" placeholder="Nouveau projet…" required>
|
||||
<button type="submit">Créer</button>
|
||||
</form>
|
||||
<div class="grid">
|
||||
{% for pr in projects %}
|
||||
<a class="card proj" href="/p/{{ pr.slug }}">
|
||||
<h2>{{ pr.nom }}</h2>
|
||||
<p class="hint">{{ pr.sessions }} session(s)
|
||||
{% if pr.a_un_plan %}· plan ✓{% endif %}
|
||||
{% if pr.dernier_pptx %}· deck ✓{% endif %}</p>
|
||||
<p class="hint">{{ pr.maj or "jamais ouvert" }}</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user