Persano commited on
Commit
3a050ea
·
verified ·
1 Parent(s): cc43a1f

Update templates/index.html

Browse files
Files changed (1) hide show
  1. 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; /* Centraliza no browser */
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
- <form method="post" action="/" id="formSimulacao">
96
- <label for="capital">Capital Inicial (R$):</label>
97
- <input type="number" id="capital" name="capital" step="0.01" required value="{{ capital or 400000 }}">
98
 
99
- <label for="studio_ret">Retorno Mensal do Studio (%):</label>
100
- <input type="number" id="studio_ret" name="studio_ret" step="0.01" required value="{{ studio_ret or 1 }}">
101
 
102
- <label for="valorizacao">Valorização Anual do Imóvel (%):</label>
103
- <input type="number" id="valorizacao" name="valorizacao" step="0.01" required value="{{ valorizacao or 4 }}">
104
 
105
- <label for="franquia_ret">Lucro Anual da Franquia (R$):</label>
106
- <input type="number" id="franquia_ret" name="franquia_ret" step="0.01" required value="{{ franquia_ret or 40000 }}">
107
 
108
- <label for="acoes_ret">Retorno Anual em Ações (%):</label>
109
- <input type="number" id="acoes_ret" name="acoes_ret" step="0.01" required value="{{ acoes_ret or 11 }}">
110
 
111
- <label for="renda_fixa">Retorno Anual Renda Fixa (%):</label>
112
- <input type="number" id="renda_fixa" name="renda_fixa" step="0.01" required value="{{ renda_fixa or 12 }}">
113
 
114
- <label for="inflacao">Inflação Anual Esperada (%):</label>
115
- <input type="number" id="inflacao" name="inflacao" step="0.01" required value="{{ inflacao or 5 }}">
 
 
116
 
117
- <!-- Botão principal para simular -->
118
- <button type="submit" style="margin-bottom: 10px;">Rodar Simulação</button>
 
 
 
119
 
120
- <!-- Botão alternativo que envia o mesmo formulário para /download_pdf -->
121
- <button type="submit" formaction="/download_pdf" formmethod="post" style="background: #28a745;">
122
- Gerar PDF do Relatório
123
- </button>
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
- <button type="submit" style="background: #28a745; color: white; padding: 12px 20px; font-size: 1em; border: none; border-radius: 4px; cursor: pointer;">
143
- Gerar PDF do Relatório
144
- </button>
145
- </form>
146
- </div>
147
- {% endif %}
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