Update templates/index.html
This commit is contained in:
@@ -7,8 +7,8 @@
|
|||||||
:root { --mac-bg: #f2f2f7; --mac-blue: #007aff; --mac-red: #ff3b30; --mac-green: #34c759; --mac-gray: #8e8e93; }
|
: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; }
|
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; }
|
.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); }
|
.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; }
|
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; }
|
th { padding: 10px; font-size: 13px; color: white; text-transform: uppercase; }
|
||||||
td { padding: 8px; border: 1px solid #e5e5ea; text-align: center; }
|
td { padding: 8px; border: 1px solid #e5e5ea; text-align: center; }
|
||||||
.h-blue { background: var(--mac-blue); }
|
.h-blue { background: var(--mac-blue); }
|
||||||
@@ -18,10 +18,10 @@
|
|||||||
.btn-calc { background: var(--mac-green); }
|
.btn-calc { background: var(--mac-green); }
|
||||||
.btn-cups { background: var(--mac-blue); }
|
.btn-cups { background: var(--mac-blue); }
|
||||||
.btn-exp { background: #5856d6; }
|
.btn-exp { background: #5856d6; }
|
||||||
.res-box { border: 1px solid #d1d1d6; border-radius: 10px; padding: 15px; background: #fff; }
|
.btn-device { background: #c7c7cc; color: #1c1c1e; }
|
||||||
.res-section h4 { margin: 10px 0 5px 0; text-transform: uppercase; font-size: 11px; color: var(--mac-gray); }
|
.res-box { border: 1px solid #d1d1d6; border-radius: 10px; padding: 15px; background: #fff; line-height: 1.6; }
|
||||||
ul { list-style: none; padding: 0; }
|
ul { list-style: none; padding: 0; margin: 0; }
|
||||||
li { padding-left: 15px; position: relative; margin-bottom: 2px; }
|
li { padding-left: 15px; position: relative; }
|
||||||
li::before { content: "•"; position: absolute; left: 0; }
|
li::before { content: "•"; position: absolute; left: 0; }
|
||||||
hr { border: 0; border-top: 1px solid #d1d1d6; margin: 15px 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; }
|
.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>
|
<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>
|
<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>
|
||||||
|
<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>
|
<button type="submit" class="btn btn-calc">Esegui Calcolo</button>
|
||||||
</form>
|
</form>
|
||||||
<div class="footer">VERSIONE SOFTWARE: V 1.2 | DATA: 20/01/2026</div>
|
<div class="footer">VERSIONE SOFTWARE: V 1.2 | DATA: 20/01/2026</div>
|
||||||
@@ -49,40 +56,38 @@
|
|||||||
<h3>Risultati</h3>
|
<h3>Risultati</h3>
|
||||||
{% if res %}
|
{% if res %}
|
||||||
<div class="res-box">
|
<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>DIMENSIONI GETTO</b><br>
|
||||||
<b>VOLUME:</b> {{ res.vol }} m³ | <b>Peso:</b> {{ res.weight }} Kg
|
Altezza: {{res.dim.a}} {{res.dim.ua}} Larghezza: {{res.dim.l}} {{res.dim.ul}} Profondità: {{res.dim.p}} {{res.dim.up}}<br><br>
|
||||||
|
<b>VOLUME:</b> {{ res.vol }} m³ | <b>Peso:</b> {{ res.peso }} Kg
|
||||||
<hr>
|
<hr>
|
||||||
<div class="res-section">
|
<b>ACQUISTI</b>
|
||||||
<h4>ACQUISTI</h4>
|
<ul>
|
||||||
<ul>
|
<li>Cemento: {{ res.s_cem }} sacchetti</li>
|
||||||
<li>• Cemento: {{ res.s_cem }} sacchetti</li>
|
<li>Sabbia: {{ res.s_sab }} sacchetti</li>
|
||||||
<li>• Sabbia: {{ res.s_sab }} sacchetti</li>
|
<li>Ghiaia: {{ res.s_ghi }} sacchetti</li>
|
||||||
<li>• Ghiaia: {{ res.s_ghi }} sacchetti</li>
|
<li>Acqua: {{ res.acqua }} L | <b>Totale: {{ res.tot_sacc }} sacch.</b></li>
|
||||||
<li>• Acqua: {{ res.acqua }} L | Totale: {{ res.tot_sacc }} sacch.</li>
|
</ul>
|
||||||
</ul>
|
<br>
|
||||||
</div>
|
<b>COSTO TOTALE: {{ res.costo_tot }} €</b>
|
||||||
<div class="res-section"><h4>COSTO TOTALE: <b>{{ res.costo_tot }} €</b></h4></div>
|
|
||||||
<hr>
|
<hr>
|
||||||
<div class="res-section">
|
<b>PROPORZIONI</b><br>
|
||||||
<h4>PROPORZIONI (%)</h4>
|
Cemento: {{res.parti.cem}} Sabbia: {{res.parti.sab}} Ghiaia: {{res.parti.ghi}}<br>
|
||||||
Cem: {{ "%.1f"|format(res.perc.cem) }}% | Sab: {{ "%.1f"|format(res.perc.sab) }}% | Ghi: {{ "%.1f"|format(res.perc.ghi) }}%
|
Cemento: {{ "%.1f"|format(res.perc.cem) }}% Sabbia: {{ "%.1f"|format(res.perc.sab) }}% Ghiaia: {{ "%.1f"|format(res.perc.ghi) }}%
|
||||||
</div>
|
|
||||||
<hr>
|
<hr>
|
||||||
<div class="res-section">
|
<b>PER OGNI CARICO ({{ res.n_c }} CARICHI):</b>
|
||||||
<h4>PER OGNI CARICO ({{ res.n_c }} CARICHI):</h4>
|
<ul>
|
||||||
<ul>
|
<li>• Cemento: {{ res.bc_cem }} sacchetti</li>
|
||||||
<li>• Cemento: {{ res.bc_cem }} sacchetti</li>
|
<li>• Sabbia: {{ res.bc_sab }} sacchetti</li>
|
||||||
<li>• Sabbia: {{ res.bc_sab }} sacchetti</li>
|
<li>• Ghiaia: {{ res.bc_ghi }} sacchetti</li>
|
||||||
<li>• Ghiaia: {{ res.bc_ghi }} sacchetti</li>
|
<li>• Acqua: {{ res.bc_aq }} L</li>
|
||||||
<li>• Acqua: {{ res.bc_aq }} L</li>
|
</ul>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<form method="POST" class="no-print">
|
<form method="POST" class="no-print">
|
||||||
{% for k,v in form.items() %}<input type="hidden" name="{{k}}" value="{{v}}">{% endfor %}
|
{% 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_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_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="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="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_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}}">
|
<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" 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="submit" formaction="/download" class="btn btn-exp">Esporta TXT</button>
|
||||||
|
<button type="button" onclick="window.print()" class="btn btn-device">Stampa Pagina</button>
|
||||||
</form>
|
</form>
|
||||||
{% if msg_stampa %}<p style="color:var(--mac-green); font-weight:bold; text-align:center;">{{ msg_stampa }}</p>{% endif %}
|
{% if msg_stampa %}<p style="color:var(--mac-green); font-weight:bold; text-align:center;">{{ msg_stampa }}</p>{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user