2025-02-08 20:28:01 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="cs">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Přehled Financí 2024</title>
|
|
|
|
<link rel="stylesheet" href="styly.css">
|
2025-02-09 17:36:20 +01:00
|
|
|
|
2025-02-08 20:28:01 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
2025-02-09 11:16:10 +01:00
|
|
|
<h2 class="archive-title">Přehled Financí za rok 2024</h2>
|
2025-02-09 17:36:20 +01:00
|
|
|
<div class="export-button-container">
|
|
|
|
<a href="finance_2024.csv" download="finance_2024.csv" class="btn btn-primary">📂 Stáhnout CSV</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2025-02-09 11:37:27 +01:00
|
|
|
<!-- Obalíme tabulku do kontejneru pro centrování -->
|
|
|
|
<div class="archive-table-container">
|
|
|
|
<table id="finance-table" class="table table-striped mb-3 archive-table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Datum</th>
|
|
|
|
<th>Popis</th>
|
|
|
|
<th>Částka</th>
|
|
|
|
<th>Měna</th>
|
|
|
|
<th>Typ</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2025-02-08 20:28:01 +01:00
|
|
|
|
|
|
|
<script>
|
|
|
|
fetch('finance_2024.csv')
|
|
|
|
.then(response => response.text())
|
|
|
|
.then(data => {
|
|
|
|
let rows = data.split("\n").slice(1);
|
|
|
|
let tableBody = document.querySelector("#finance-table tbody");
|
|
|
|
rows.forEach(row => {
|
|
|
|
let columns = row.split(",");
|
|
|
|
if (columns.length >= 5) {
|
|
|
|
let tr = document.createElement("tr");
|
|
|
|
columns.forEach(column => {
|
|
|
|
let td = document.createElement("td");
|
|
|
|
td.textContent = column.trim();
|
|
|
|
tr.appendChild(td);
|
|
|
|
});
|
|
|
|
tableBody.appendChild(tr);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(error => console.error("Chyba při načítání CSV:", error));
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|