Update templates/index.html
Browse files- templates/index.html +43 -47
templates/index.html
CHANGED
|
@@ -51,7 +51,6 @@
|
|
| 51 |
margin-bottom: 30px;
|
| 52 |
}
|
| 53 |
|
| 54 |
-
/* Estilo da tabela: */
|
| 55 |
table {
|
| 56 |
border-collapse: collapse;
|
| 57 |
font-size: 0.95em;
|
|
@@ -61,7 +60,7 @@
|
|
| 61 |
box-shadow: 0 0 12px rgb(0 0 0 / 0.1);
|
| 62 |
width: 100%;
|
| 63 |
max-width: 900px;
|
| 64 |
-
margin: 0 auto;
|
| 65 |
}
|
| 66 |
th, td {
|
| 67 |
border: 1px solid #ddd;
|
|
@@ -78,7 +77,6 @@
|
|
| 78 |
background-color: #f2f9ff;
|
| 79 |
}
|
| 80 |
|
| 81 |
-
/* Ajuste para centralizar a tabela no browser e não afetar o PDF */
|
| 82 |
@media screen {
|
| 83 |
table {
|
| 84 |
width: fit-content !important;
|
|
@@ -91,61 +89,59 @@
|
|
| 91 |
<body>
|
| 92 |
<h1 style="text-align:center; margin-bottom: 20px;">Simulador de Investimentos</h1>
|
| 93 |
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
-
<
|
| 96 |
-
|
| 97 |
-
<input type="number" id="capital" name="capital" step="0.01" required value="{{ capital or 400000 }}">
|
| 98 |
|
| 99 |
-
|
| 100 |
-
|
| 101 |
|
| 102 |
-
|
| 103 |
-
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
|
| 108 |
-
|
| 109 |
-
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
|
| 114 |
-
|
| 115 |
-
|
|
|
|
|
|
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
</form>
|
| 125 |
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
{% if tabela %}
|
| 129 |
-
<div class="grafico">
|
| 130 |
-
<h2>Gráfico de Simulação</h2>
|
| 131 |
-
<img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de Investimentos" />
|
| 132 |
-
</div>
|
| 133 |
-
|
| 134 |
-
<h2 style="text-align:center;">Resultados</h2>
|
| 135 |
-
<div>
|
| 136 |
-
{{ tabela | safe }}
|
| 137 |
-
</div>
|
| 138 |
-
|
| 139 |
-
<!-- Aqui está o botão visível no navegador -->
|
| 140 |
-
<div style="text-align:center; margin-top: 30px;">
|
| 141 |
<form action="/download_pdf" method="post">
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
{
|
| 148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
</body>
|
| 150 |
</html>
|
| 151 |
|
|
|
|
| 51 |
margin-bottom: 30px;
|
| 52 |
}
|
| 53 |
|
|
|
|
| 54 |
table {
|
| 55 |
border-collapse: collapse;
|
| 56 |
font-size: 0.95em;
|
|
|
|
| 60 |
box-shadow: 0 0 12px rgb(0 0 0 / 0.1);
|
| 61 |
width: 100%;
|
| 62 |
max-width: 900px;
|
| 63 |
+
margin: 0 auto;
|
| 64 |
}
|
| 65 |
th, td {
|
| 66 |
border: 1px solid #ddd;
|
|
|
|
| 77 |
background-color: #f2f9ff;
|
| 78 |
}
|
| 79 |
|
|
|
|
| 80 |
@media screen {
|
| 81 |
table {
|
| 82 |
width: fit-content !important;
|
|
|
|
| 89 |
<body>
|
| 90 |
<h1 style="text-align:center; margin-bottom: 20px;">Simulador de Investimentos</h1>
|
| 91 |
|
| 92 |
+
<form method="post" action="/" id="formSimulacao">
|
| 93 |
+
<label for="capital">Capital Inicial (R$):</label>
|
| 94 |
+
<input type="number" id="capital" name="capital" step="0.01" required value="{{ capital or 400000 }}">
|
| 95 |
|
| 96 |
+
<label for="studio_ret">Retorno Mensal do Studio (%):</label>
|
| 97 |
+
<input type="number" id="studio_ret" name="studio_ret" step="0.01" required value="{{ studio_ret or 1 }}">
|
|
|
|
| 98 |
|
| 99 |
+
<label for="valorizacao">Valorização Anual do Imóvel (%):</label>
|
| 100 |
+
<input type="number" id="valorizacao" name="valorizacao" step="0.01" required value="{{ valorizacao or 4 }}">
|
| 101 |
|
| 102 |
+
<label for="franquia_ret">Lucro Anual da Franquia (R$):</label>
|
| 103 |
+
<input type="number" id="franquia_ret" name="franquia_ret" step="0.01" required value="{{ franquia_ret or 40000 }}">
|
| 104 |
|
| 105 |
+
<label for="acoes_ret">Retorno Anual em Ações (%):</label>
|
| 106 |
+
<input type="number" id="acoes_ret" name="acoes_ret" step="0.01" required value="{{ acoes_ret or 11 }}">
|
| 107 |
|
| 108 |
+
<label for="renda_fixa">Retorno Anual Renda Fixa (%):</label>
|
| 109 |
+
<input type="number" id="renda_fixa" name="renda_fixa" step="0.01" required value="{{ renda_fixa or 12 }}">
|
| 110 |
|
| 111 |
+
<label for="inflacao">Inflação Anual Esperada (%):</label>
|
| 112 |
+
<input type="number" id="inflacao" name="inflacao" step="0.01" required value="{{ inflacao or 5 }}">
|
| 113 |
|
| 114 |
+
<button type="submit" style="margin-top: 20px; background: #007cf0; color: white; padding: 12px; font-size: 1em; border: none; border-radius: 4px; cursor: pointer; width: 100%;">
|
| 115 |
+
Rodar Simulação
|
| 116 |
+
</button>
|
| 117 |
+
</form>
|
| 118 |
|
| 119 |
+
{% if tabela %}
|
| 120 |
+
<div class="grafico">
|
| 121 |
+
<h2>Gráfico de Simulação</h2>
|
| 122 |
+
<img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de Investimentos" />
|
| 123 |
+
</div>
|
| 124 |
|
| 125 |
+
<h2 style="text-align:center;">Resultados</h2>
|
| 126 |
+
<div>
|
| 127 |
+
{{ tabela | safe }}
|
| 128 |
+
</div>
|
|
|
|
| 129 |
|
| 130 |
+
<div style="text-align:center; margin-top: 30px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
<form action="/download_pdf" method="post">
|
| 132 |
+
<input type="hidden" name="capital" value="{{ capital }}">
|
| 133 |
+
<input type="hidden" name="studio_ret" value="{{ studio_ret }}">
|
| 134 |
+
<input type="hidden" name="valorizacao" value="{{ valorizacao }}">
|
| 135 |
+
<input type="hidden" name="franquia_ret" value="{{ franquia_ret }}">
|
| 136 |
+
<input type="hidden" name="acoes_ret" value="{{ acoes_ret }}">
|
| 137 |
+
<input type="hidden" name="renda_fixa" value="{{ renda_fixa }}">
|
| 138 |
+
<input type="hidden" name="inflacao" value="{{ inflacao }}">
|
| 139 |
+
<button type="submit" style="background: #28a745; color: white; padding: 12px 20px; font-size: 1em; border: none; border-radius: 4px; cursor: pointer;">
|
| 140 |
+
Gerar PDF do Relatório
|
| 141 |
+
</button>
|
| 142 |
+
</form>
|
| 143 |
+
</div>
|
| 144 |
+
{% endif %}
|
| 145 |
</body>
|
| 146 |
</html>
|
| 147 |
|