Files
bookapp/templates/project_review.html
2026-02-03 10:13:33 -05:00

92 lines
4.5 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="row justify-content-center">
<div class="col-md-10">
<div class="card shadow">
<div class="card-header bg-success text-white d-flex justify-content-between align-items-center">
<h4 class="mb-0"><i class="fas fa-check-circle me-2"></i>Review Bible & Story Beats</h4>
<a href="/project/{{ project.id }}" class="btn btn-light btn-sm fw-bold">Looks Good, Start Writing <i class="fas fa-arrow-right ms-1"></i></a>
</div>
<div class="card-body">
<p class="text-muted">The AI has generated your characters and plot structure. Review them below and refine if needed.</p>
<!-- Refinement Bar -->
<form action="/project/{{ project.id }}/refine_bible" method="POST" class="mb-4" onsubmit="showLoading(this)">
<div class="input-group shadow-sm">
<span class="input-group-text bg-warning text-dark"><i class="fas fa-magic"></i></span>
<input type="text" name="instruction" class="form-control" placeholder="AI Instruction: e.g. 'Change the ending of Book 1', 'Add a plot point about the ring', 'Make the tone darker'" required>
<button type="submit" class="btn btn-warning">Refine with AI</button>
</div>
</form>
<!-- Characters Section -->
<h5 class="text-primary border-bottom pb-2 mb-3">👥 Characters</h5>
<div class="table-responsive mb-4">
<table class="table table-hover table-bordered">
<thead class="table-light">
<tr>
<th style="width: 20%">Name</th>
<th style="width: 20%">Role</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for c in bible.characters %}
<tr>
<td class="fw-bold">{{ c.name }}</td>
<td><span class="badge bg-secondary">{{ c.role }}</span></td>
<td class="small">{{ c.description }}</td>
</tr>
{% else %}
<tr><td colspan="3" class="text-center text-muted">No characters generated.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- Books & Beats Section -->
<h5 class="text-primary border-bottom pb-2 mb-3">📚 Plot Structure</h5>
{% for book in bible.books %}
<div class="card mb-4 border-light bg-light">
<div class="card-body">
<h5 class="card-title text-dark">
<span class="badge bg-dark me-2">Book {{ book.book_number }}</span>
{{ book.title }}
</h5>
<p class="card-text text-muted fst-italic border-start border-4 border-warning ps-3 mb-3">
{{ book.manual_instruction }}
</p>
<h6 class="fw-bold mt-3">Plot Beats:</h6>
<ol class="list-group list-group-numbered">
{% for beat in book.plot_beats %}
<li class="list-group-item bg-white">{{ beat }}</li>
{% else %}
<li class="list-group-item text-muted">No plot beats generated.</li>
{% endfor %}
</ol>
</div>
</div>
{% endfor %}
<div class="d-grid gap-2 mt-4">
<a href="/project/{{ project.id }}" class="btn btn-success btn-lg">
<i class="fas fa-check me-2"></i>Finalize & Go to Dashboard
</a>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
function showLoading(form) {
const btn = form.querySelector('button[type="submit"]');
btn.disabled = true;
btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span>Refining...';
}
</script>
{% endblock %}