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

@@ -102,7 +102,6 @@ input:focus, select:focus { outline: 2px solid var(--accent); }
.note-form-row label { flex: 0 1 auto; }
.checkbox-label { flex-direction: row; align-items: center; gap: .4rem; }
.inline { display: inline-flex; gap: .4rem; align-items: center; }
.inline .btn { }
/* Wöchentliche Übersicht (Dashboard) */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .6rem; }
@@ -128,10 +127,8 @@ input:focus, select:focus { outline: 2px solid var(--accent); }
}
.note-item:last-child { border-bottom: none; }
.bullet { font-weight: 700; width: 1.4rem; text-align: center; font-size: 1.05rem; }
.bullet-\\. { color: var(--ink); }
.bullet-x { color: var(--red); }
.bullet-- { color: var(--blue); }
.bullet-\\? { color: var(--accent-dark); }
.note-text { flex: 1; }
.note-date { color: var(--muted); font-size: .8rem; }
.note-item.is-done .note-text { text-decoration: line-through; color: var(--muted); }
@@ -190,3 +187,73 @@ input:focus, select:focus { outline: 2px solid var(--accent); }
.notes-row .priority-badge, .notes-row .actions { grid-column: 2; }
.stat-grid { grid-template-columns: 1fr; }
}
/* --- Monatsübersicht --- */
.page-actions { display: flex; gap: .5rem; }
.month-grid { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.month-grid-head, .month-grid-row {
display: grid; grid-template-columns: repeat(7, 1fr);
}
.month-grid-head span {
padding: .5rem; text-align: center; font-size: .75rem; font-weight: 600;
color: var(--muted); background: #faf7ef; border-bottom: 1px solid var(--line);
}
.month-grid-row:not(:last-child) { border-bottom: 1px solid var(--line); }
.month-cell {
min-height: 92px; padding: .4rem; border-right: 1px solid var(--line);
cursor: pointer; background: var(--paper);
}
.month-cell:nth-child(7) { border-right: none; }
.month-cell.outside { background: #f6f3ec; opacity: .6; }
.month-cell.today { outline: 2px solid var(--accent); }
.month-cell:hover { background: #fffaf0; }
.month-daynum { display: inline-block; font-weight: 700; font-size: .85rem; margin-bottom: .3rem; }
.month-note {
display: flex; align-items: center; gap: .25rem; font-size: .72rem;
margin-bottom: .15rem; white-space: nowrap; overflow: hidden;
}
.month-note.is-done .month-note-text { text-decoration: line-through; color: var(--muted); }
.month-note-text { overflow: hidden; text-overflow: ellipsis; }
.month-more { font-size: .7rem; color: var(--muted); }
/* --- Verweise (refs) --- */
.refs { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.ref {
display: inline-flex; align-items: center; gap: .2rem;
background: #eef3fb; color: var(--blue); border: 1px solid #cfddf2;
border-radius: 16px; padding: .05rem .5rem; font-size: .72rem;
text-decoration: none;
}
.ref:hover { background: #e3ebf9; }
.ref-hint { font-size: .75rem; align-self: center; }
/* --- Wochenübersicht Mini-Einträge --- */
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.day-head h2 { margin-bottom: 0; }
.day-head-stats { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.pill.moved { background: #ede7f6; color: #6a1b9a; }
.mini-notes { margin-top: .6rem; }
.mini-note {
display: grid; grid-template-columns: 30px 1fr 90px auto; gap: .6rem;
align-items: center; padding: .45rem 0; border-bottom: 1px dashed var(--line);
}
.mini-note:last-child { border-bottom: none; }
.mini-note.is-done .mini-note-text { text-decoration: line-through; color: var(--muted); }
.mini-note-text { word-break: break-word; }
.mini-note .refs { margin-top: 0; }
.moved-hint { font-size: .72rem; color: #6a1b9a; }
.mini-actions { display: flex; gap: .4rem; align-items: center; }
/* --- Move-Steuerung (Tag) --- */
.move-ctrl { display: inline-flex; gap: .3rem; align-items: center; }
.move-btn:disabled { opacity: .5; cursor: not-allowed; }
/* --- Drucken / PDF --- */
@media print {
.topbar, .footer, .no-print, .page-actions, .mini-actions,
.move-ctrl, .actions, .flash, .nav { display: none !important; }
body { background: #fff; color: #000; }
.container { max-width: 100%; }
.card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
.month-cell { min-height: 70px; }
}

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;