Update templates/index.html

This commit is contained in:
2026-01-20 15:17:20 +01:00
parent cdcfdba82e
commit c04fa96ab2

View File

@@ -7,8 +7,8 @@
:root { --mac-bg: #f2f2f7; --mac-blue: #007aff; --mac-red: #ff3b30; --mac-green: #34c759; --mac-gray: #8e8e93; }
body { font-family: -apple-system, sans-serif; background: var(--mac-bg); padding: 20px; font-size: 14px; }
.container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; max-width: 1200px; margin: auto; }
.panel { background: white; border-radius: 12px; padding: 20px; flex: 1; min-width: 320px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
table { width: 100%; border-collapse: collapse; margin-bottom: 15px; border-radius: 8px; overflow: hidden; }
.panel { background: rgba(255,255,255,0.9); border-radius: 12px; padding: 20px; flex: 1; min-width: 320px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
table { width: 100%; border-collapse: collapse; margin-bottom: 15px; border-radius: 8px; overflow: hidden; background: white; }
th { padding: 10px; font-size: 13px; color: white; text-transform: uppercase; }
td { padding: 8px; border: 1px solid #e5e5ea; text-align: center; }
.h-blue { background: var(--mac-blue); }
@@ -18,10 +18,10 @@
.btn-calc { background: var(--mac-green); }
.btn-cups { background: var(--mac-blue); }
.btn-exp { background: #5856d6; }
.res-box { border: 1px solid #d1d1d6; border-radius: 10px; padding: 15px; background: #fff; }
.res-section h4 { margin: 10px 0 5px 0; text-transform: uppercase; font-size: 11px; color: var(--mac-gray); }
ul { list-style: none; padding: 0; }
li { padding-left: 15px; position: relative; margin-bottom: 2px; }
.btn-device { background: #c7c7cc; color: #1c1c1e; }
.res-box { border: 1px solid #d1d1d6; border-radius: 10px; padding: 15px; background: #fff; line-height: 1.6; }
ul { list-style: none; padding: 0; margin: 0; }
li { padding-left: 15px; position: relative; }
li::before { content: "•"; position: absolute; left: 0; }
hr { border: 0; border-top: 1px solid #d1d1d6; margin: 15px 0; }
.footer { text-align: center; font-size: 10px; color: var(--mac-gray); margin-top: 15px; }
@@ -40,6 +40,13 @@
<table><tr class="h-red"><th colspan="3">Miscela (Parti)</th></tr>
<tr><td>Cem:<br><input type="text" name="p_cem" value="{{form.get('p_cem','1')}}"></td><td>Sab:<br><input type="text" name="p_sab" value="{{form.get('p_sab','3')}}"></td><td>Ghi:<br><input type="text" name="p_ghi" value="{{form.get('p_ghi','5')}}"></td></tr>
</table>
<table><tr class="h-red"><th colspan="3">Peso sacchette (Kg)</th></tr>
<tr><td>Cem:<input type="text" name="w_cem" value="{{form.get('w_cem','25')}}"></td><td>Sab:<input type="text" name="w_sab" value="{{form.get('w_sab','25')}}"></td><td>Ghi:<input type="text" name="w_ghi" value="{{form.get('w_ghi','25')}}"></td></tr>
</table>
<table><tr class="h-red"><th colspan="3">Costo sacchette (€)</th></tr>
<tr><td>Cem:<input type="text" name="c_cem" value="{{form.get('c_cem','1')}}"></td><td>Sab:<input type="text" name="c_sab" value="{{form.get('c_sab','1')}}"></td><td>Ghi:<input type="text" name="c_ghi" value="{{form.get('c_ghi','1')}}"></td></tr>
</table>
<table><tr class="h-red"><th>Attrezzatura</th></tr><tr><td>Volume Betoniera: <input type="text" name="v_bet" value="{{form.get('v_bet','160')}}" style="width:60px;"> L</td></tr></table>
<button type="submit" class="btn btn-calc">Esegui Calcolo</button>
</form>
<div class="footer">VERSIONE SOFTWARE: V 1.2 | DATA: 20/01/2026</div>
@@ -49,27 +56,25 @@
<h3>Risultati</h3>
{% if res %}
<div class="res-box">
<b>DIMENSIONI GETTO:</b> {{res.dim.a}} {{res.dim.ua}} x {{res.dim.l}} {{res.dim.ul}} x {{res.dim.p}} {{res.dim.up}}<br>
<b>VOLUME:</b> {{ res.vol }} m³ | <b>Peso:</b> {{ res.weight }} Kg
<b>DIMENSIONI GETTO</b><br>
Altezza: {{res.dim.a}} {{res.dim.ua}} &nbsp; Larghezza: {{res.dim.l}} {{res.dim.ul}} &nbsp; Profondità: {{res.dim.p}} {{res.dim.up}}<br><br>
<b>VOLUME:</b> {{ res.vol }} m³ | <b>Peso:</b> {{ res.peso }} Kg
<hr>
<div class="res-section">
<h4>ACQUISTI</h4>
<b>ACQUISTI</b>
<ul>
<li>Cemento: {{ res.s_cem }} sacchetti</li>
<li>Sabbia: {{ res.s_sab }} sacchetti</li>
<li>Ghiaia: {{ res.s_ghi }} sacchetti</li>
<li>Acqua: {{ res.acqua }} L | Totale: {{ res.tot_sacc }} sacch.</li>
<li>Cemento: {{ res.s_cem }} sacchetti</li>
<li>Sabbia: {{ res.s_sab }} sacchetti</li>
<li>Ghiaia: {{ res.s_ghi }} sacchetti</li>
<li>Acqua: {{ res.acqua }} L | <b>Totale: {{ res.tot_sacc }} sacch.</b></li>
</ul>
</div>
<div class="res-section"><h4>COSTO TOTALE: <b>{{ res.costo_tot }} €</b></h4></div>
<br>
<b>COSTO TOTALE: {{ res.costo_tot }} €</b>
<hr>
<div class="res-section">
<h4>PROPORZIONI (%)</h4>
Cem: {{ "%.1f"|format(res.perc.cem) }}% | Sab: {{ "%.1f"|format(res.perc.sab) }}% | Ghi: {{ "%.1f"|format(res.perc.ghi) }}%
</div>
<b>PROPORZIONI</b><br>
Cemento: {{res.parti.cem}} &nbsp; Sabbia: {{res.parti.sab}} &nbsp; Ghiaia: {{res.parti.ghi}}<br>
Cemento: {{ "%.1f"|format(res.perc.cem) }}% &nbsp; Sabbia: {{ "%.1f"|format(res.perc.sab) }}% &nbsp; Ghiaia: {{ "%.1f"|format(res.perc.ghi) }}%
<hr>
<div class="res-section">
<h4>PER OGNI CARICO ({{ res.n_c }} CARICHI):</h4>
<b>PER OGNI CARICO ({{ res.n_c }} CARICHI):</b>
<ul>
<li>• Cemento: {{ res.bc_cem }} sacchetti</li>
<li>• Sabbia: {{ res.bc_sab }} sacchetti</li>
@@ -77,12 +82,12 @@
<li>• Acqua: {{ res.bc_aq }} L</li>
</ul>
</div>
</div>
<form method="POST" class="no-print">
{% for k,v in form.items() %}<input type="hidden" name="{{k}}" value="{{v}}">{% endfor %}
<input type="hidden" name="d_a" value="{{res.dim.a}}"><input type="hidden" name="d_ua" value="{{res.dim.ua}}">
<input type="hidden" name="d_l" value="{{res.dim.l}}"><input type="hidden" name="d_ul" value="{{res.dim.ul}}">
<input type="hidden" name="d_p" value="{{res.dim.p}}"><input type="hidden" name="d_up" value="{{res.dim.up}}">
<input type="hidden" name="p_cem" value="{{res.parti.cem}}"><input type="hidden" name="p_sab" value="{{res.parti.sab}}"><input type="hidden" name="p_ghi" value="{{res.parti.ghi}}">
<input type="hidden" name="pc_cem" value="{{'%.1f'|format(res.perc.cem)}}"><input type="hidden" name="pc_sab" value="{{'%.1f'|format(res.perc.sab)}}"><input type="hidden" name="pc_ghi" value="{{'%.1f'|format(res.perc.ghi)}}">
<input type="hidden" name="res_vol" value="{{res.vol}}"><input type="hidden" name="res_peso" value="{{res.peso}}">
<input type="hidden" name="res_aq" value="{{res.acqua}}"><input type="hidden" name="res_tot_s" value="{{res.tot_sacc}}">
@@ -92,6 +97,7 @@
<button type="submit" name="btn_stampa_cups" class="btn btn-cups">Stampa PDF (CUPS)</button>
<button type="submit" formaction="/download" class="btn btn-exp">Esporta TXT</button>
<button type="button" onclick="window.print()" class="btn btn-device">Stampa Pagina</button>
</form>
{% if msg_stampa %}<p style="color:var(--mac-green); font-weight:bold; text-align:center;">{{ msg_stampa }}</p>{% endif %}
{% endif %}