Update templates/index.html
Browse files- templates/index.html +52 -50
templates/index.html
CHANGED
|
@@ -5,78 +5,80 @@
|
|
| 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/bootstrap@5.3.0/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 |
-
|
| 19 |
-
<
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
<
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
| 33 |
</div>
|
| 34 |
|
| 35 |
-
<div class="
|
| 36 |
-
<
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
<
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
</div>
|
| 47 |
|
| 48 |
-
<div class="
|
| 49 |
-
<label for="inflacao" class="form-label">Inflação
|
| 50 |
-
<input type="number" step="0.01" min="0" max="100"
|
|
|
|
| 51 |
</div>
|
| 52 |
|
| 53 |
-
<div class="
|
| 54 |
<button type="submit" class="btn btn-primary">Calcular</button>
|
|
|
|
| 55 |
</div>
|
| 56 |
</form>
|
| 57 |
|
| 58 |
{% if tabela %}
|
| 59 |
-
<
|
| 60 |
-
<
|
| 61 |
-
<div class="table-container">
|
| 62 |
-
{{ tabela | safe }}
|
| 63 |
-
</div>
|
| 64 |
{% endif %}
|
| 65 |
|
| 66 |
{% if grafico %}
|
| 67 |
-
<
|
| 68 |
-
|
| 69 |
-
<img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de
|
| 70 |
</div>
|
| 71 |
{% endif %}
|
| 72 |
|
| 73 |
{% if analise_final %}
|
| 74 |
-
<
|
| 75 |
-
|
| 76 |
-
{{ analise_final
|
| 77 |
</div>
|
| 78 |
{% endif %}
|
| 79 |
</div>
|
| 80 |
|
|
|
|
| 81 |
</body>
|
| 82 |
</html>
|
|
|
|
|
|
| 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/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
</head>
|
| 9 |
+
<body class="bg-light">
|
| 10 |
+
<div class="container py-4">
|
| 11 |
+
<h1 class="mb-4 text-center">Simulador de Investimentos</h1>
|
| 12 |
+
<form method="post" action="/">
|
| 13 |
+
<div class="row g-3 mb-3">
|
| 14 |
+
<div class="col-md-4">
|
| 15 |
+
<label for="capital" class="form-label">Capital Inicial (R$)</label>
|
| 16 |
+
<input type="number" step="0.01" min="0" class="form-control" id="capital" name="capital" required
|
| 17 |
+
value="{{ capital if capital else '' }}">
|
| 18 |
+
</div>
|
| 19 |
+
<div class="col-md-4">
|
| 20 |
+
<label for="studio_ret" class="form-label">Retorno Mensal Studio (%)</label>
|
| 21 |
+
<input type="number" step="0.01" min="0" max="100" class="form-control" id="studio_ret" name="studio_ret" required
|
| 22 |
+
value="{{ request.form.get('studio_ret', '') }}">
|
| 23 |
+
</div>
|
| 24 |
+
<div class="col-md-4">
|
| 25 |
+
<label for="valorizacao" class="form-label">Valorização Anual Studio (%)</label>
|
| 26 |
+
<input type="number" step="0.01" min="0" max="100" class="form-control" id="valorizacao" name="valorizacao" required
|
| 27 |
+
value="{{ request.form.get('valorizacao', '') }}">
|
| 28 |
+
</div>
|
| 29 |
</div>
|
| 30 |
|
| 31 |
+
<div class="row g-3 mb-3">
|
| 32 |
+
<div class="col-md-4">
|
| 33 |
+
<label for="franquia_ret" class="form-label">Retorno Anual Franquia (R$)</label>
|
| 34 |
+
<input type="number" step="0.01" min="0" class="form-control" id="franquia_ret" name="franquia_ret" required
|
| 35 |
+
value="{{ request.form.get('franquia_ret', '') }}">
|
| 36 |
+
</div>
|
| 37 |
+
<div class="col-md-4">
|
| 38 |
+
<label for="acoes_ret" class="form-label">Retorno Anual Ações (%)</label>
|
| 39 |
+
<input type="number" step="0.01" min="0" max="100" class="form-control" id="acoes_ret" name="acoes_ret" required
|
| 40 |
+
value="{{ request.form.get('acoes_ret', '') }}">
|
| 41 |
+
</div>
|
| 42 |
+
<div class="col-md-4">
|
| 43 |
+
<label for="renda_fixa" class="form-label">Retorno Anual Renda Fixa (%)</label>
|
| 44 |
+
<input type="number" step="0.01" min="0" max="100" class="form-control" id="renda_fixa" name="renda_fixa" required
|
| 45 |
+
value="{{ request.form.get('renda_fixa', '') }}">
|
| 46 |
+
</div>
|
| 47 |
</div>
|
| 48 |
|
| 49 |
+
<div class="mb-4">
|
| 50 |
+
<label for="inflacao" class="form-label">Inflação Anual (%)</label>
|
| 51 |
+
<input type="number" step="0.01" min="0" max="100" class="form-control" id="inflacao" name="inflacao" required
|
| 52 |
+
value="{{ request.form.get('inflacao', '') }}">
|
| 53 |
</div>
|
| 54 |
|
| 55 |
+
<div class="d-flex gap-2 mb-5">
|
| 56 |
<button type="submit" class="btn btn-primary">Calcular</button>
|
| 57 |
+
<button type="submit" formaction="/relatorio" formmethod="post" class="btn btn-outline-secondary">Gerar PDF</button>
|
| 58 |
</div>
|
| 59 |
</form>
|
| 60 |
|
| 61 |
{% if tabela %}
|
| 62 |
+
<h2 class="mb-3">Tabela de Projeções</h2>
|
| 63 |
+
<div class="table-responsive">{{ tabela|safe }}</div>
|
|
|
|
|
|
|
|
|
|
| 64 |
{% endif %}
|
| 65 |
|
| 66 |
{% if grafico %}
|
| 67 |
+
<h2 class="mb-3 mt-5">Gráfico de Projeções</h2>
|
| 68 |
+
<div class="text-center mb-5">
|
| 69 |
+
<img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de investimentos" class="img-fluid" style="max-height:400px;" />
|
| 70 |
</div>
|
| 71 |
{% endif %}
|
| 72 |
|
| 73 |
{% if analise_final %}
|
| 74 |
+
<h2 class="mb-3">Análise Final</h2>
|
| 75 |
+
<div class="border rounded p-3 bg-white">
|
| 76 |
+
{{ analise_final|safe }}
|
| 77 |
</div>
|
| 78 |
{% endif %}
|
| 79 |
</div>
|
| 80 |
|
| 81 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
| 82 |
</body>
|
| 83 |
</html>
|
| 84 |
+
|