Update templates/index.html
Browse files- templates/index.html +59 -79
templates/index.html
CHANGED
@@ -3,100 +3,80 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8" />
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
6 |
-
<title>Simulador de
|
7 |
-
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
|
8 |
<style>
|
9 |
-
body {
|
10 |
-
|
11 |
-
|
12 |
-
}
|
13 |
-
.
|
14 |
-
max-width: 900px;
|
15 |
-
}
|
16 |
-
img {
|
17 |
-
max-width: 100%;
|
18 |
-
height: auto;
|
19 |
-
}
|
20 |
-
.table td, .table th {
|
21 |
-
vertical-align: middle;
|
22 |
-
}
|
23 |
-
.grafico {
|
24 |
-
text-align: center;
|
25 |
-
margin: 30px 0;
|
26 |
-
}
|
27 |
</style>
|
28 |
</head>
|
29 |
<body>
|
|
|
30 |
<div class="container">
|
31 |
-
<h1 class="mb-4
|
32 |
|
33 |
-
<form method="POST"
|
34 |
-
<div class="
|
35 |
-
<
|
36 |
-
|
37 |
-
<input type="number" class="form-control" step="0.01" name="capital" placeholder="Ex: 100000" required>
|
38 |
-
</div>
|
39 |
-
<div class="col-md-6">
|
40 |
-
<label class="form-label">Retorno Studio (% a.m.)</label>
|
41 |
-
<input type="number" class="form-control" step="0.01" name="studio_ret" placeholder="Ex: 0.8" required>
|
42 |
-
</div>
|
43 |
-
<div class="col-md-6">
|
44 |
-
<label class="form-label">Valorização Imóvel (% a.a.)</label>
|
45 |
-
<input type="number" class="form-control" step="0.01" name="valorizacao" placeholder="Ex: 6.0" required>
|
46 |
-
</div>
|
47 |
-
<div class="col-md-6">
|
48 |
-
<label class="form-label">Retorno Franquia (R$/ano)</label>
|
49 |
-
<input type="number" class="form-control" step="0.01" name="franquia_ret" placeholder="Ex: 20000" required>
|
50 |
-
</div>
|
51 |
-
<div class="col-md-6">
|
52 |
-
<label class="form-label">Retorno Ações (% a.a.)</label>
|
53 |
-
<input type="number" class="form-control" step="0.01" name="acoes_ret" placeholder="Ex: 12.0" required>
|
54 |
-
</div>
|
55 |
-
<div class="col-md-6">
|
56 |
-
<label class="form-label">Renda Fixa (% a.a.)</label>
|
57 |
-
<input type="number" class="form-control" step="0.01" name="renda_fixa" placeholder="Ex: 9.0" required>
|
58 |
-
</div>
|
59 |
-
<div class="col-md-6">
|
60 |
-
<label class="form-label">Inflação estimada (% a.a.)</label>
|
61 |
-
<input type="number" class="form-control" step="0.01" name="inflacao" placeholder="Ex: 4.5" required>
|
62 |
-
</div>
|
63 |
</div>
|
64 |
-
|
65 |
-
|
66 |
-
<
|
|
|
|
|
|
|
|
|
67 |
</div>
|
68 |
-
</form>
|
69 |
-
|
70 |
-
{% if tabela %}
|
71 |
-
<hr class="my-5" />
|
72 |
|
73 |
-
<
|
74 |
-
|
75 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
</div>
|
77 |
|
78 |
-
<
|
79 |
-
|
80 |
-
{{
|
81 |
</div>
|
82 |
|
83 |
-
|
84 |
-
|
85 |
</div>
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
{% endif %}
|
100 |
</div>
|
|
|
101 |
</body>
|
102 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8" />
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
6 |
+
<title>Simulador de Investimentos</title>
|
7 |
+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" />
|
8 |
<style>
|
9 |
+
body { padding: 20px; background: #f9f9f9; }
|
10 |
+
.form-label { font-weight: 600; }
|
11 |
+
.table-container { overflow-x: auto; }
|
12 |
+
.analise { margin-top: 20px; padding: 20px; background: white; border-radius: 8px; box-shadow: 0 0 6px #ccc; }
|
13 |
+
.grafico img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 0 6px #ccc; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
</style>
|
15 |
</head>
|
16 |
<body>
|
17 |
+
|
18 |
<div class="container">
|
19 |
+
<h1 class="mb-4">Simulador de Investimentos - 5 anos</h1>
|
20 |
|
21 |
+
<form method="POST" class="row g-3">
|
22 |
+
<div class="col-md-4">
|
23 |
+
<label for="capital" class="form-label">Capital Inicial (R$)</label>
|
24 |
+
<input type="number" step="0.01" min="0" name="capital" id="capital" class="form-control" required value="{{ capital or '' }}" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
</div>
|
26 |
+
<div class="col-md-4">
|
27 |
+
<label for="studio_ret" class="form-label">Rendimento mensal Studio (%)</label>
|
28 |
+
<input type="number" step="0.01" min="0" max="100" name="studio_ret" id="studio_ret" class="form-control" required value="{{ request.form.get('studio_ret', '') }}" />
|
29 |
+
</div>
|
30 |
+
<div class="col-md-4">
|
31 |
+
<label for="valorizacao" class="form-label">Valorização anual Studio (%)</label>
|
32 |
+
<input type="number" step="0.01" min="0" max="100" name="valorizacao" id="valorizacao" class="form-control" required value="{{ request.form.get('valorizacao', '') }}" />
|
33 |
</div>
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
<div class="col-md-4">
|
36 |
+
<label for="franquia_ret" class="form-label">Rendimento anual Franquia (R$)</label>
|
37 |
+
<input type="number" step="0.01" min="0" name="franquia_ret" id="franquia_ret" class="form-control" required value="{{ request.form.get('franquia_ret', '') }}" />
|
38 |
+
</div>
|
39 |
+
<div class="col-md-4">
|
40 |
+
<label for="acoes_ret" class="form-label">Retorno anual Ações (%)</label>
|
41 |
+
<input type="number" step="0.01" min="0" max="100" name="acoes_ret" id="acoes_ret" class="form-control" required value="{{ request.form.get('acoes_ret', '') }}" />
|
42 |
+
</div>
|
43 |
+
<div class="col-md-4">
|
44 |
+
<label for="renda_fixa" class="form-label">Retorno anual Renda Fixa (%)</label>
|
45 |
+
<input type="number" step="0.01" min="0" max="100" name="renda_fixa" id="renda_fixa" class="form-control" required value="{{ request.form.get('renda_fixa', '') }}" />
|
46 |
</div>
|
47 |
|
48 |
+
<div class="col-md-4">
|
49 |
+
<label for="inflacao" class="form-label">Inflação anual (%)</label>
|
50 |
+
<input type="number" step="0.01" min="0" max="100" name="inflacao" id="inflacao" class="form-control" required value="{{ request.form.get('inflacao', '') }}" />
|
51 |
</div>
|
52 |
|
53 |
+
<div class="col-12">
|
54 |
+
<button type="submit" class="btn btn-primary">Calcular</button>
|
55 |
</div>
|
56 |
+
</form>
|
57 |
+
|
58 |
+
{% if tabela %}
|
59 |
+
<hr />
|
60 |
+
<h2 class="mt-4">Tabela de Projeções</h2>
|
61 |
+
<div class="table-container">
|
62 |
+
{{ tabela | safe }}
|
63 |
+
</div>
|
64 |
+
{% endif %}
|
65 |
+
|
66 |
+
{% if grafico %}
|
67 |
+
<div class="grafico mt-4">
|
68 |
+
<h2>Gráfico de Projeção</h2>
|
69 |
+
<img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de Projeção" />
|
70 |
+
</div>
|
71 |
+
{% endif %}
|
72 |
+
|
73 |
+
{% if analise_final %}
|
74 |
+
<div class="analise">
|
75 |
+
<h2>Análise da IA</h2>
|
76 |
+
{{ analise_final | safe }}
|
77 |
+
</div>
|
78 |
{% endif %}
|
79 |
</div>
|
80 |
+
|
81 |
</body>
|
82 |
</html>
|