fix colors
This commit is contained in:
parent
242d3bd915
commit
da5e765d49
13 changed files with 455 additions and 656 deletions
|
|
@ -1,17 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- templates/result.html -->
|
||||
{% extends "base.html" %}
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Print Cost Result</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
</head>
|
||||
{% block title %}Druckkosten Ergebnis – Studio EinsZwoVier{% endblock %}
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Print Cost for {{ result.filename }}</h1>
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h1>Druckkosten für {{ result.filename }}</h1>
|
||||
|
||||
<!-- Success / Error Banner -->
|
||||
<!-- Erfolg / Fehler Banner -->
|
||||
{% if success %}
|
||||
<div class="alert success">{{ success }}</div>
|
||||
{% endif %}
|
||||
|
|
@ -19,64 +15,67 @@
|
|||
<div class="alert error">{{ error }}</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Ergebnis Tabelle -->
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Page</th>
|
||||
<th>Width (m)</th>
|
||||
<th>Height (m)</th>
|
||||
<th>Area (m²)</th>
|
||||
<th>Ink %</th>
|
||||
<th>Type</th>
|
||||
<th>Cost (€)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for page in result.pages %}
|
||||
<tr class="{{ 'color' if page.is_color else 'black' }}">
|
||||
<td>{{ page.page }}</td>
|
||||
<td>{{ "%.3f"|format(page.width_m) }}</td>
|
||||
<td>{{ "%.3f"|format(page.height_m) }}</td>
|
||||
<td>{{ "%.4f"|format(page.area_m2) }}</td>
|
||||
<td>{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}</td>
|
||||
<td>{{ 'Color' if page.is_color else 'B&W' }}</td>
|
||||
<td>{{ "%.2f"|format(page.cost) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="totals">
|
||||
<td colspan="3">Total Black Pages</td>
|
||||
<td>{{ "%.4f"|format(result.total_area_black) }}</td>
|
||||
<td colspan="2"></td>
|
||||
<td>{{ "%.2f"|format(result.total_cost_black) }}</td>
|
||||
</tr>
|
||||
<tr class="totals">
|
||||
<td colspan="3">Total Color Pages</td>
|
||||
<td>{{ "%.4f"|format(result.total_area_color) }}</td>
|
||||
<td colspan="2"></td>
|
||||
<td>{{ "%.2f"|format(result.total_cost_color) }}</td>
|
||||
</tr>
|
||||
<tr class="totals">
|
||||
<td colspan="6">Grand Total</td>
|
||||
<td>{{ "%.2f"|format(result.grand_total) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Seite</th>
|
||||
<th>Breite (m)</th>
|
||||
<th>Höhe (m)</th>
|
||||
<th>Fläche (m²)</th>
|
||||
<th>Tinten %</th>
|
||||
<th>Typ</th>
|
||||
<th>Kosten (€)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for page in result.pages %}
|
||||
<tr class="{{ 'color' if page.is_color else 'black' }}">
|
||||
<td>{{ page.page }}</td>
|
||||
<td>{{ "%.3f"|format(page.width_m) }}</td>
|
||||
<td>{{ "%.3f"|format(page.height_m) }}</td>
|
||||
<td>{{ "%.4f"|format(page.area_m2) }}</td>
|
||||
<td>{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}</td>
|
||||
<td>{{ 'Farbe' if page.is_color else 'S/W' }}</td>
|
||||
<td>{{ "%.2f"|format(page.cost) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="totals">
|
||||
<td colspan="3">Summe S/W</td>
|
||||
<td>{{ "%.4f"|format(result.total_area_black) }}</td>
|
||||
<td colspan="2"></td>
|
||||
<td>{{ "%.2f"|format(result.total_cost_black) }}</td>
|
||||
</tr>
|
||||
<tr class="totals">
|
||||
<td colspan="3">Summe Farbe</td>
|
||||
<td>{{ "%.4f"|format(result.total_area_color) }}</td>
|
||||
<td colspan="2"></td>
|
||||
<td>{{ "%.2f"|format(result.total_cost_color) }}</td>
|
||||
</tr>
|
||||
<tr class="totals">
|
||||
<td colspan="6">Gesamtsumme</td>
|
||||
<td>{{ "%.2f"|format(result.grand_total) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<!-- Send order form -->
|
||||
<!-- Auftrag senden Formular -->
|
||||
<form action="/send-order" method="post">
|
||||
<input type="hidden" name="filename" value="{{ result.filename }}">
|
||||
<label for="comment"><strong>Additional Instructions:</strong></label>
|
||||
<textarea id="comment" name="comment"
|
||||
placeholder="e.g. Please print double-sided, staple in top left corner..."></textarea>
|
||||
<button type="submit">Send Order</button>
|
||||
<input type="hidden" name="filename" value="{{ result.filename }}">
|
||||
|
||||
<label for="name"><strong>Name:</strong></label>
|
||||
<input type="text" id="name" name="name" required placeholder="Dein Name">
|
||||
|
||||
<label for="comment"><strong>Zusätzliche Hinweise:</strong></label>
|
||||
<textarea id="comment" name="comment" rows="4" placeholder="z. B. doppelseitig oder spezielles Papier"></textarea>
|
||||
|
||||
<button type="submit">Auftrag senden</button>
|
||||
</form>
|
||||
|
||||
<div class="link">
|
||||
<a href="/">Upload another PDF</a>
|
||||
<div class="link" style="text-align:center; margin-top:1em;">
|
||||
<a href="/">Neues PDF hochladen</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue