feat: web app compagnon sur sliding_api - chat Narrator, plan, galerie, revision (C9)
This commit is contained in:
@@ -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 %}
|
||||
Reference in New Issue
Block a user