Update templates/index.html
Browse files- templates/index.html +95 -153
templates/index.html
CHANGED
@@ -1,167 +1,109 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
-
<html lang="pt-
|
3 |
<head>
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
</head>
|
33 |
<body>
|
34 |
-
|
35 |
-
<h1>
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
<label for="valorizacao" class="form-label">Valorização anual Studio (%)</label>
|
67 |
-
<input
|
68 |
-
type="number"
|
69 |
-
step="0.01"
|
70 |
-
class="form-control"
|
71 |
-
id="valorizacao"
|
72 |
-
name="valorizacao"
|
73 |
-
required
|
74 |
-
value="{{ valorizacao or 5 }}"
|
75 |
-
/>
|
76 |
-
</div>
|
77 |
-
|
78 |
-
<div class="col-md-4">
|
79 |
-
<label for="franquia_ret" class="form-label">Retorno anual Franquia (R$)</label>
|
80 |
-
<input
|
81 |
-
type="number"
|
82 |
-
step="0.01"
|
83 |
-
class="form-control"
|
84 |
-
id="franquia_ret"
|
85 |
-
name="franquia_ret"
|
86 |
-
required
|
87 |
-
value="{{ franquia_ret or 12000 }}"
|
88 |
-
/>
|
89 |
-
</div>
|
90 |
-
|
91 |
-
<div class="col-md-4">
|
92 |
-
<label for="acoes_ret" class="form-label">Retorno anual Ações (%)</label>
|
93 |
-
<input
|
94 |
-
type="number"
|
95 |
-
step="0.01"
|
96 |
-
class="form-control"
|
97 |
-
id="acoes_ret"
|
98 |
-
name="acoes_ret"
|
99 |
-
required
|
100 |
-
value="{{ acoes_ret or 10 }}"
|
101 |
-
/>
|
102 |
-
</div>
|
103 |
-
|
104 |
-
<div class="col-md-4">
|
105 |
-
<label for="renda_fixa" class="form-label">Retorno anual Renda Fixa (%)</label>
|
106 |
-
<input
|
107 |
-
type="number"
|
108 |
-
step="0.01"
|
109 |
-
class="form-control"
|
110 |
-
id="renda_fixa"
|
111 |
-
name="renda_fixa"
|
112 |
-
required
|
113 |
-
value="{{ renda_fixa or 7 }}"
|
114 |
-
/>
|
115 |
</div>
|
|
|
|
|
116 |
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
|
|
128 |
</div>
|
129 |
-
</div>
|
130 |
-
|
131 |
-
<button type="submit" class="btn btn-primary mt-4">Simular</button>
|
132 |
</form>
|
133 |
|
134 |
-
{% if tabela
|
135 |
-
<hr />
|
136 |
-
<
|
137 |
-
|
138 |
-
|
139 |
-
{{ analise_final | safe }}
|
140 |
-
</div>
|
141 |
-
|
142 |
-
<div class="analise">
|
143 |
-
{{ consideracoes | safe }}
|
144 |
</div>
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
<h3>Evolução Ano a Ano</h3>
|
150 |
-
<div class="table-wrapper">
|
151 |
-
{{ tabela | safe }}
|
152 |
</div>
|
153 |
-
|
154 |
-
<form method="POST" action="/download_pdf" class="mt-4">
|
155 |
-
<input type="hidden" name="capital" value="{{ capital }}" />
|
156 |
-
<input type="hidden" name="studio_ret" value="{{ studio_ret }}" />
|
157 |
-
<input type="hidden" name="valorizacao" value="{{ valorizacao }}" />
|
158 |
-
<input type="hidden" name="franquia_ret" value="{{ franquia_ret }}" />
|
159 |
-
<input type="hidden" name="acoes_ret" value="{{ acoes_ret }}" />
|
160 |
-
<input type="hidden" name="renda_fixa" value="{{ renda_fixa }}" />
|
161 |
-
<input type="hidden" name="inflacao" value="{{ inflacao }}" />
|
162 |
-
<button type="submit" class="btn btn-success">Baixar Relatório em PDF</button>
|
163 |
-
</form>
|
164 |
{% endif %}
|
165 |
-
|
|
|
|
|
|
|
166 |
</body>
|
167 |
</html>
|
|
|
|
1 |
<!DOCTYPE html>
|
2 |
+
<html lang="pt-br">
|
3 |
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<title>Simulador de Investimentos</title>
|
6 |
+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" />
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
margin: 20px;
|
10 |
+
background: #f9f9f9;
|
11 |
+
}
|
12 |
+
.container {
|
13 |
+
max-width: 900px;
|
14 |
+
background: white;
|
15 |
+
padding: 20px 30px;
|
16 |
+
border-radius: 8px;
|
17 |
+
box-shadow: 0 0 15px #ddd;
|
18 |
+
}
|
19 |
+
h1 {
|
20 |
+
margin-bottom: 25px;
|
21 |
+
color: #2E7D32;
|
22 |
+
}
|
23 |
+
.btn-pdf {
|
24 |
+
background-color: #2E7D32;
|
25 |
+
color: white;
|
26 |
+
}
|
27 |
+
.btn-pdf:hover {
|
28 |
+
background-color: #1B4D24;
|
29 |
+
color: white;
|
30 |
+
}
|
31 |
+
footer {
|
32 |
+
margin-top: 40px;
|
33 |
+
font-size: 0.9em;
|
34 |
+
color: #666;
|
35 |
+
text-align: center;
|
36 |
+
}
|
37 |
+
</style>
|
38 |
</head>
|
39 |
<body>
|
40 |
+
<div class="container">
|
41 |
+
<h1>Simulador de Investimentos Imobiliários</h1>
|
42 |
+
<form method="POST" action="/">
|
43 |
+
<div class="row g-3">
|
44 |
+
<div class="col-md-6">
|
45 |
+
<label for="capital" class="form-label">Capital Inicial (R$):</label>
|
46 |
+
<input type="number" class="form-control" id="capital" name="capital" required step="0.01" min="1" value="{{ capital or 100000 }}" />
|
47 |
+
</div>
|
48 |
+
<div class="col-md-6">
|
49 |
+
<label for="studio_ret" class="form-label">Retorno Mensal Studio (%):</label>
|
50 |
+
<input type="number" class="form-control" id="studio_ret" name="studio_ret" required step="0.01" value="{{ studio_ret or 1.0 }}" />
|
51 |
+
</div>
|
52 |
+
<div class="col-md-6">
|
53 |
+
<label for="valorizacao" class="form-label">Valorização Anual Studio (%):</label>
|
54 |
+
<input type="number" class="form-control" id="valorizacao" name="valorizacao" required step="0.01" value="{{ valorizacao or 5.0 }}" />
|
55 |
+
</div>
|
56 |
+
<div class="col-md-6">
|
57 |
+
<label for="franquia_ret" class="form-label">Retorno Anual Franquia (R$):</label>
|
58 |
+
<input type="number" class="form-control" id="franquia_ret" name="franquia_ret" required step="0.01" value="{{ franquia_ret or 5000 }}" />
|
59 |
+
</div>
|
60 |
+
<div class="col-md-6">
|
61 |
+
<label for="acoes_ret" class="form-label">Retorno Anual Ações (%):</label>
|
62 |
+
<input type="number" class="form-control" id="acoes_ret" name="acoes_ret" required step="0.01" value="{{ acoes_ret or 8.0 }}" />
|
63 |
+
</div>
|
64 |
+
<div class="col-md-6">
|
65 |
+
<label for="renda_fixa" class="form-label">Retorno Anual Renda Fixa (%):</label>
|
66 |
+
<input type="number" class="form-control" id="renda_fixa" name="renda_fixa" required step="0.01" value="{{ renda_fixa or 6.0 }}" />
|
67 |
+
</div>
|
68 |
+
<div class="col-md-6">
|
69 |
+
<label for="inflacao" class="form-label">Inflação Anual Estimada (%):</label>
|
70 |
+
<input type="number" class="form-control" id="inflacao" name="inflacao" required step="0.01" value="{{ inflacao or 4.0 }}" />
|
71 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
</div>
|
73 |
+
<div class="mt-4 d-flex gap-3">
|
74 |
+
<button type="submit" class="btn btn-success">Calcular</button>
|
75 |
|
76 |
+
{% if capital %}
|
77 |
+
<form method="POST" action="/download_pdf" style="display:inline;">
|
78 |
+
<input type="hidden" name="capital" value="{{ capital }}">
|
79 |
+
<input type="hidden" name="studio_ret" value="{{ studio_ret }}">
|
80 |
+
<input type="hidden" name="valorizacao" value="{{ valorizacao }}">
|
81 |
+
<input type="hidden" name="franquia_ret" value="{{ franquia_ret }}">
|
82 |
+
<input type="hidden" name="acoes_ret" value="{{ acoes_ret }}">
|
83 |
+
<input type="hidden" name="renda_fixa" value="{{ renda_fixa }}">
|
84 |
+
<input type="hidden" name="inflacao" value="{{ inflacao }}">
|
85 |
+
<button type="submit" class="btn btn-pdf">Gerar PDF</button>
|
86 |
+
</form>
|
87 |
+
{% endif %}
|
88 |
</div>
|
|
|
|
|
|
|
89 |
</form>
|
90 |
|
91 |
+
{% if tabela %}
|
92 |
+
<hr class="my-4" />
|
93 |
+
<h3>Evolução dos Investimentos - 5 anos</h3>
|
94 |
+
<div class="table-responsive">
|
95 |
+
{{ tabela | safe }}
|
|
|
|
|
|
|
|
|
|
|
96 |
</div>
|
97 |
+
<div class="mt-4">
|
98 |
+
<h4>Análise Final:</h4>
|
99 |
+
<p>{{ analise_final | safe }}</p>
|
100 |
+
<p><strong>Investimento com maior retorno:</strong> {{ investimento_mais_valorizado }} ({{ valor_mais_alto | round(2) | string | replace(".", ",") }})</p>
|
|
|
|
|
|
|
101 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
{% endif %}
|
103 |
+
</div>
|
104 |
+
<footer>
|
105 |
+
Desenvolvido por Rafael Persano - Simulador Financeiro
|
106 |
+
</footer>
|
107 |
</body>
|
108 |
</html>
|
109 |
+
|