new file: .env.example

new file:   .gitignore
	new file:   Dockerfile
	new file:   README.md
	new file:   app.py
	new file:   auth.py
	new file:   config.py
	new file:   db.py
	new file:   db_helpers.py
	new file:   docker-compose.yml
	new file:   requirements.txt
	new file:   routes/__init__.py
	new file:   routes/admin_routes.py
	new file:   routes/auth_routes.py
	new file:   routes/journal_routes.py
	new file:   static/css/style.css
	new file:   static/js/main.js
	new file:   templates/admin/dashboard.html
	new file:   templates/admin/users.html
	new file:   templates/base.html
	new file:   templates/day.html
	new file:   templates/future.html
	new file:   templates/index.html
	new file:   templates/login.html
	new file:   templates/week.html
This commit is contained in:
SimolZimol
2026-08-02 20:41:24 +02:00
commit 0e7efe4b74
25 changed files with 1590 additions and 0 deletions

27
static/js/main.js Normal file
View File

@@ -0,0 +1,27 @@
/* Bullet Journal kleine Frontend-Helfer */
document.addEventListener("DOMContentLoaded", function () {
// Move-Formular: wenn ein Datum gesetzt ist, Verschieben-Button nutzen
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;
}
}
if (dateInput) {
dateInput.addEventListener("change", updateBtn);
updateBtn();
}
});
// Flash-Nachrichten automatisch ausblenden
setTimeout(function () {
document.querySelectorAll(".flash").forEach(function (el) {
el.style.transition = "opacity .4s";
el.style.opacity = "0";
setTimeout(function () { el.remove(); }, 400);
});
}, 5000);
});