100 lines
3.5 KiB
HTML
100 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Administration - Öffnungszeiten</title>
|
|
<style>
|
|
body { font-family: sans-serif; padding: 40px; line-height: 1.6; }
|
|
.btn {
|
|
display: inline-block;
|
|
background: #ff4757;
|
|
color: white;
|
|
padding: 10px 20px;
|
|
text-decoration: none;
|
|
border-radius: 5px;
|
|
border: none;
|
|
cursor: pointer;
|
|
}
|
|
.card { border: 1px solid #ddd; padding: 20px; margin-bottom: 20px; border-radius: 8px; }
|
|
|
|
/* Flex-Container für die Linksbündigkeit (Standard) */
|
|
.input-row {
|
|
margin-top: 15px;
|
|
display: flex;
|
|
justify-content: flex-start; /* Alles nach links */
|
|
align-items: center;
|
|
gap: 25px; /* Abstand zwischen den Paaren (Tage / Zeilen) */
|
|
}
|
|
|
|
/* Gruppiert Label und Input eng zusammen */
|
|
.input-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.hint { text-align: left; font-size: 13px; color: #666; margin-top: 10px; }
|
|
.action-row { text-align: left; margin-top: 20px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Administration</h1>
|
|
|
|
<div class="card">
|
|
<h3>Google Sheets Links</h3>
|
|
<p><a href="{{ links.times_edit }}" target="_blank">➔ Tabelle: Öffnungszeiten bearbeiten</a></p>
|
|
<p><a href="{{ links.remarks_edit }}" target="_blank">➔ Tabelle: Bemerkungen bearbeiten</a></p>
|
|
|
|
<div class="input-row">
|
|
<div class="input-group">
|
|
<label for="days_input" style="font-size: 14px;">Tage:</label>
|
|
<input type="number" id="days_input" value="0" min="0" style="width: 55px; padding: 4px;">
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
<label for="lines_input" style="font-size: 14px;">Zeilen:</label>
|
|
<input type="number" id="lines_input" value="0" min="0" style="width: 55px; padding: 4px;">
|
|
</div>
|
|
</div>
|
|
|
|
<p class="hint">
|
|
Zeilen hat Vorrang vor Tagen. Wenn beide Werte 0 sind, werden die Standard-Tage aus der Config genutzt (aktuell: {{ config_days }}).
|
|
</p>
|
|
|
|
<div class="action-row">
|
|
<a id="preview_link" href="/zeiten?test=1" target="_blank" class="btn" style="background: #2ed573;">➔ Vorschau mit Test-Hintergrund</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>Cache Management</h3>
|
|
<p>Der Cache wird automatisch alle 60 Minuten aktualisiert. Nach manuellen Änderungen in Google Sheets können Sie ihn hier sofort leeren.</p>
|
|
<a href="/cache-clear" class="btn">Cache jetzt löschen</a>
|
|
</div>
|
|
|
|
<p><a href="/zeiten">← Zurück zur Ansicht</a></p>
|
|
|
|
<script>
|
|
const daysInput = document.getElementById('days_input');
|
|
const linesInput = document.getElementById('lines_input');
|
|
const previewLink = document.getElementById('preview_link');
|
|
|
|
function updateUrl() {
|
|
const days = parseInt(daysInput.value) || 0;
|
|
const lines = parseInt(linesInput.value) || 0;
|
|
|
|
let url = "/zeiten?test=1";
|
|
|
|
if (lines > 0) {
|
|
url += `&lines=${lines}`;
|
|
} else if (days > 0) {
|
|
url += `&days=${days}`;
|
|
}
|
|
|
|
previewLink.href = url;
|
|
}
|
|
|
|
daysInput.addEventListener('input', updateUrl);
|
|
linesInput.addEventListener('input', updateUrl);
|
|
</script>
|
|
</body>
|
|
</html> |