feat(widgets): Widget-System mit Notes, Checklisten und Notebook-Sidebar

Neues modulares Widget-System als Ersatz für die alte Sticky Note.
Widget-Manager (Drag, Resize, Z-Index, Persistierung), Freitext-Notes
mit Zeichenzähler, Checklisten mit Toggle/Add/Remove, Notebook-Sidebar
mit 5 Slots, Widget-Toolbar am rechten Rand.
This commit is contained in:
2026-03-21 19:40:26 +01:00
parent ed11827321
commit 7a16462358
4 changed files with 1272 additions and 32 deletions
+307 -21
View File
@@ -904,62 +904,149 @@ body.show-desc .bm-desc { display: block; }
.search-submit:hover { color: var(--accent); }
/* ============================================
STICKY NOTE
WIDGET SYSTEM
============================================ */
.sticky-note {
.widget {
position: fixed;
bottom: 24px; right: 24px;
z-index: 50;
width: 240px;
z-index: 51;
min-width: 200px; min-height: 150px;
background: var(--bg-board);
border: 1px solid var(--border-accent);
border-radius: var(--radius);
backdrop-filter: blur(20px);
box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--accent-dim);
display: flex; flex-direction: column;
transition: opacity 0.25s, transform 0.25s, border-color 0.5s;
transition: border-color 0.5s;
}
.widget.widget-minimized {
opacity: 0; transform: translateY(8px) scale(0.97);
pointer-events: none;
}
.sticky-note.visible {
opacity: 1; transform: translateY(0) scale(1);
pointer-events: all;
transition: opacity 0.25s, transform 0.25s;
}
.sticky-note-header {
.widget-header {
display: flex; align-items: center; justify-content: space-between;
padding: 7px 10px 6px;
border-bottom: 1px solid var(--border);
cursor: move;
cursor: grab;
user-select: none;
}
.sticky-note-title {
.widget-header:active { cursor: grabbing; }
.widget-title {
display: flex; align-items: center; gap: 5px;
font-family: var(--font-display); font-size: 11px; font-weight: 600;
letter-spacing: 1.5px; text-transform: uppercase;
color: var(--accent);
max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sticky-note-close {
.widget-title[contenteditable="true"] {
outline: 1px solid var(--border-accent);
border-radius: 2px;
padding: 0 3px;
cursor: text;
}
.widget-actions {
display: flex; align-items: center; gap: 2px;
}
.widget-btn {
background: none; border: none;
color: var(--text-muted); font-size: 11px;
cursor: pointer; padding: 1px 4px; border-radius: 3px;
transition: all 0.15s;
line-height: 1;
}
.sticky-note-close:hover { background: rgba(255,255,255,0.07); color: var(--text-primary); }
.widget-btn:hover { background: rgba(255,255,255,0.07); color: var(--text-primary); }
.sticky-note-body {
.widget-body {
flex: 1;
display: flex; flex-direction: column;
overflow: hidden;
position: relative;
}
/* Widget Textarea (Freitext-Note) */
.widget-textarea {
flex: 1;
padding: 10px;
background: none; border: none; outline: none; resize: none;
color: var(--text-primary);
font-family: var(--font-body); font-size: 12px; line-height: 1.6;
min-height: 120px; max-height: 300px;
scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.sticky-note-body::placeholder { color: var(--text-muted); }
.widget-textarea::placeholder { color: var(--text-muted); }
.widget-char-count {
position: absolute; bottom: 4px; right: 8px;
font-family: var(--font-body); font-size: 10px;
color: var(--text-muted); pointer-events: none;
}
.widget-char-count.limit { color: var(--danger); }
/* Resize-handle unten rechts */
.sticky-note::after {
/* Widget Checkliste */
.widget-checklist {
flex: 1;
list-style: none; margin: 0; padding: 6px 10px;
overflow-y: auto;
scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.checklist-item {
display: flex; align-items: center; gap: 8px;
padding: 4px 0;
font-family: var(--font-body); font-size: 12px;
color: var(--text-primary);
border-bottom: 1px solid rgba(255,255,255,0.03);
}
.checklist-item.checked .checklist-text {
text-decoration: line-through;
color: var(--text-muted);
}
.checklist-checkbox {
width: 14px; height: 14px;
border: 1px solid var(--border-accent);
border-radius: 3px;
background: rgba(255,255,255,0.03);
cursor: pointer; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
color: var(--accent); font-size: 10px;
transition: all 0.15s;
}
.checklist-checkbox:hover { border-color: var(--accent); }
.checklist-item.checked .checklist-checkbox {
background: var(--accent-dim);
border-color: var(--accent);
}
.checklist-text {
flex: 1; min-width: 0;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.checklist-remove {
background: none; border: none;
color: var(--text-muted); font-size: 10px;
cursor: pointer; padding: 0 2px;
opacity: 0; transition: opacity 0.15s;
}
.checklist-item:hover .checklist-remove { opacity: 1; }
.checklist-remove:hover { color: var(--danger); }
.checklist-add {
display: flex; align-items: center; gap: 6px;
padding: 6px 10px;
border-top: 1px solid var(--border);
}
.checklist-add-input {
flex: 1;
background: none; border: none; outline: none;
color: var(--text-primary);
font-family: var(--font-body); font-size: 12px;
}
.checklist-add-input::placeholder { color: var(--text-muted); }
/* Widget Resize Handle */
.widget-resize-handle {
position: absolute; bottom: 0; right: 0;
width: 14px; height: 14px;
cursor: nwse-resize;
}
.widget-resize-handle::after {
content: '';
position: absolute; bottom: 4px; right: 4px;
width: 8px; height: 8px;
@@ -968,6 +1055,198 @@ body.show-desc .bm-desc { display: block; }
border-radius: 0 0 2px 0;
opacity: 0.5;
}
/* ============================================
WIDGET TOOLBAR
============================================ */
.widget-toolbar {
position: fixed;
right: 16px;
top: 50%;
transform: translateY(-50%);
z-index: 90;
display: flex;
flex-direction: column;
gap: 8px;
padding: 10px 6px;
background: var(--bg-board);
backdrop-filter: blur(20px);
border: 1px solid var(--border-accent);
border-radius: var(--radius);
box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.toolbar-left .widget-toolbar {
right: auto;
left: 16px;
}
.widget-toolbar-btn {
width: 36px; height: 36px;
background: rgba(255,255,255,0.04);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-secondary);
cursor: pointer;
transition: all 0.15s;
display: flex; align-items: center; justify-content: center;
padding: 0;
}
.widget-toolbar-btn:hover {
background: var(--accent-dim);
border-color: var(--border-accent);
color: var(--accent);
}
/* ============================================
NOTEBOOK SIDEBAR
============================================ */
.notebook-overlay {
position: fixed; inset: 0; z-index: 200;
background: rgba(0,0,0,0.5);
opacity: 0; pointer-events: none;
transition: opacity 0.25s;
}
.notebook-overlay.active {
opacity: 1; pointer-events: all;
}
.notebook-panel {
position: fixed; top: 0; right: -360px;
width: 340px; height: 100vh; z-index: 201;
background: rgba(8,8,16,0.96);
border-left: 1px solid var(--border);
backdrop-filter: blur(28px);
transition: right 0.3s ease;
display: flex; flex-direction: column;
overflow: hidden;
}
.notebook-overlay.active + .notebook-panel,
.notebook-panel.open {
right: 0;
}
.toolbar-left .notebook-panel {
right: auto; left: -360px;
border-left: none;
border-right: 1px solid var(--border);
}
.toolbar-left .notebook-overlay.active + .notebook-panel,
.toolbar-left .notebook-panel.open {
left: 0;
}
.notebook-header {
display: flex; align-items: center; justify-content: space-between;
padding: 14px 16px 12px;
border-bottom: 1px solid var(--border);
}
.notebook-header-title {
font-family: var(--font-display); font-size: 14px; font-weight: 600;
letter-spacing: 1.5px; text-transform: uppercase;
color: var(--text-primary);
display: flex; align-items: center; gap: 8px;
}
.notebook-count {
font-size: 11px; color: var(--text-muted);
font-weight: 400; letter-spacing: 0;
}
.notebook-slots {
flex: 1; overflow-y: auto; padding: 12px;
display: flex; flex-direction: column; gap: 10px;
scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
/* Belegter Slot */
.notebook-slot {
background: rgba(255,255,255,0.03);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 10px 12px;
cursor: pointer;
transition: all 0.15s;
}
.notebook-slot:hover {
border-color: var(--border-accent);
background: var(--accent-dim);
}
.notebook-slot-header {
display: flex; align-items: center; justify-content: space-between;
margin-bottom: 4px;
}
.notebook-slot-title {
font-family: var(--font-display); font-size: 12px; font-weight: 600;
letter-spacing: 1px; text-transform: uppercase;
color: var(--accent);
display: flex; align-items: center; gap: 5px;
}
.notebook-slot-type {
font-size: 12px;
}
.notebook-slot-preview {
font-family: var(--font-body); font-size: 11px;
color: var(--text-muted);
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
margin-bottom: 6px;
}
.notebook-slot-actions {
display: flex; gap: 6px; justify-content: flex-end;
}
.notebook-slot-btn {
background: rgba(255,255,255,0.04);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-secondary);
font-family: var(--font-body); font-size: 10px;
padding: 3px 8px;
cursor: pointer;
transition: all 0.15s;
}
.notebook-slot-btn:hover {
border-color: var(--border-accent);
color: var(--accent);
}
.notebook-slot-btn.danger:hover {
border-color: var(--danger);
color: var(--danger);
}
/* Leerer Slot */
.notebook-slot-empty {
border: 1px dashed var(--border);
border-radius: var(--radius);
padding: 14px 12px;
text-align: center;
cursor: pointer;
transition: all 0.15s;
color: var(--text-muted);
font-family: var(--font-body); font-size: 12px;
}
.notebook-slot-empty:hover {
border-color: var(--border-accent);
color: var(--text-secondary);
background: var(--accent-dim);
}
/* Typ-Auswahl im leeren Slot */
.notebook-type-chooser {
display: flex; gap: 8px; justify-content: center;
padding-top: 8px;
}
.notebook-type-btn {
background: rgba(255,255,255,0.04);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-secondary);
font-family: var(--font-body); font-size: 11px;
padding: 6px 12px;
cursor: pointer;
transition: all 0.15s;
display: flex; align-items: center; gap: 5px;
}
.notebook-type-btn:hover {
border-color: var(--border-accent);
color: var(--accent);
background: var(--accent-dim);
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
@@ -1211,6 +1490,8 @@ body.show-desc .bm-desc { display: block; }
.theme-modal { max-width: 400px; }
.search-bar { max-width: 400px; }
.widget-toolbar-btn { width: 32px; height: 32px; }
.notebook-panel { width: 320px; }
}
/* Smartphone (max 480px) */
@@ -1242,7 +1523,12 @@ body.show-desc .bm-desc { display: block; }
.search-bar { max-width: 100%; }
.search-input { font-size: 13px; padding: 8px 10px; }
.sticky-note { width: 200px; bottom: 12px; right: 12px; }
.widget { min-width: 180px; }
.widget-toolbar { bottom: 12px; top: auto; right: 50%; transform: translateX(50%); flex-direction: row; }
.toolbar-left .widget-toolbar { left: 50%; right: auto; transform: translateX(-50%); }
.widget-toolbar-btn { width: 32px; height: 32px; }
.notebook-panel { width: 100%; right: -100%; }
.toolbar-left .notebook-panel { left: -100%; }
.modal { width: calc(100vw - 32px); }
}