modified: app.py

modified:   db.py
	modified:   routes/journal_routes.py
	modified:   static/css/style.css
	modified:   static/js/main.js
	modified:   templates/base.html
	modified:   templates/day.html
	modified:   templates/future.html
	modified:   templates/index.html
	new file:   templates/monat.html
	modified:   templates/week.html
This commit is contained in:
SimolZimol
2026-08-02 21:12:17 +02:00
parent 9ab350ac02
commit 428dccc5b0
11 changed files with 632 additions and 106 deletions

View File

@@ -1,10 +1,26 @@
/* Bullet Journal kleine Frontend-Helfer */
document.addEventListener("DOMContentLoaded", function () {
// Move-Formular: wenn ein Datum gesetzt ist, Verschieben-Button nutzen
// Tag-Ansicht: Datums-Eingabe synchronisiert verstecktes Feld + aktiviert Button
document.querySelectorAll(".move-ctrl").forEach(function (ctrl) {
var dateInput = ctrl.querySelector(".move-date");
var hidden = ctrl.querySelector("input[name='target_date']");
var btn = ctrl.querySelector("button[name='target'][value='date']");
function update() {
if (hidden && btn) {
hidden.value = dateInput ? dateInput.value : "";
btn.disabled = !dateInput || !dateInput.value;
}
}
if (dateInput) {
dateInput.addEventListener("change", update);
update();
}
});
// Wochen-/Monatsansicht: klassisches move-form-Datum
document.querySelectorAll(".move-form").forEach(function (form) {
var dateInput = form.querySelector("input[name='target_date']");
var dateBtn = form.querySelector("button[name='target'][value='date']");
// Deaktiviere den Datums-Button, solange kein Datum gewählt wurde
function updateBtn() {
if (dateBtn) {
dateBtn.disabled = !dateInput || !dateInput.value;