visual update 2

This commit is contained in:
2026-02-02 08:29:48 +01:00
parent b9d22f5dfa
commit cf15a82ce1
+35 -27
View File
@@ -562,6 +562,22 @@ data:
if (!modal || !listEl || !gearBtn) return;
// Move gear button to widget header
try {
const widgetEl = widget.closest('.widget');
if (widgetEl) {
const header = widgetEl.querySelector('.widget-header');
if (header) {
header.style.position = 'relative';
gearBtn.style.position = 'absolute';
gearBtn.style.right = '0';
gearBtn.style.top = '50%';
gearBtn.style.transform = 'translateY(-50%)';
header.appendChild(gearBtn);
}
}
} catch(e) { console.log('Could not move gear to header'); }
let quotes = [];
function apiUrl(path) {
@@ -1154,37 +1170,30 @@ data:
{{ $todos := .JSON.Array "todos" }}
<style>
.todo-widget { display: flex; flex-direction: column; gap: 10px; padding-top: 0 !important; margin-top: -0.5rem; }
.todo-add {
display: flex; gap: 8px; align-items: center;
background: rgba(255,255,255,0.06); border-radius: 8px;
padding: 4px 4px 4px 8px;
}
.todo-widget { display: flex; flex-direction: column; gap: 6px; padding-top: 0 !important; margin-top: -0.5rem; }
.todo-add { display: flex; gap: 6px; align-items: center; }
.todo-add-btn {
background: none; border: none; color: inherit; opacity: 0.7;
cursor: pointer; font-size: 18px; padding: 4px;
background: none; border: none; color: inherit; opacity: 0.5;
cursor: pointer; font-size: 16px; padding: 2px 4px;
transition: opacity 0.15s;
}
.todo-add-btn:hover { opacity: 1; }
.todo-add-input {
flex: 1; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
border-radius: 6px; padding: 10px 12px; color: inherit; font-size: 13px;
outline: none; transition: border-color 0.15s, background 0.15s;
flex: 1; background: transparent; border: none;
padding: 6px 0; color: inherit; font-size: 13px;
outline: none;
}
.todo-add-input:focus {
background: rgba(255,255,255,0.12); border-color: rgba(96, 165, 250, 0.5);
}
.todo-add-input::placeholder { opacity: 0.5; }
.todo-list { display: flex; flex-direction: column; gap: 2px; }
.todo-add-input::placeholder { opacity: 0.4; }
.todo-list { display: flex; flex-direction: column; gap: 1px; }
.todo-item {
display: flex; align-items: center; gap: 8px; padding: 8px 10px;
border-radius: 8px; background: rgba(255,255,255,0.04);
display: flex; align-items: center; gap: 6px; padding: 6px 8px;
border-radius: 6px; background: rgba(255,255,255,0.04);
transition: background 0.15s;
}
.todo-item:hover { background: rgba(255,255,255,0.08); }
.todo-checkbox {
width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4);
border-radius: 4px; cursor: pointer; display: flex; align-items: center;
width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.4);
border-radius: 3px; cursor: pointer; display: flex; align-items: center;
justify-content: center; flex-shrink: 0; transition: all 0.15s;
background: transparent;
}
@@ -1192,17 +1201,17 @@ data:
.todo-checkbox.done {
background: transparent; border-color: rgba(96, 165, 250, 0.8);
}
.todo-checkbox.done::after { content: "✓"; font-size: 11px; color: rgba(96, 165, 250, 1); font-weight: bold; }
.todo-text { flex: 1; font-size: 13px; opacity: 0.95; line-height: 1.3; }
.todo-checkbox.done::after { content: "✓"; font-size: 10px; color: rgba(96, 165, 250, 1); font-weight: bold; }
.todo-text { flex: 1; font-size: 13px; opacity: 0.9; line-height: 1.2; }
.todo-text.done { text-decoration: line-through; opacity: 0.5; }
.todo-delete {
opacity: 0; background: none; border: none; color: inherit;
cursor: pointer; padding: 4px 6px; font-size: 14px;
cursor: pointer; padding: 2px 4px; font-size: 12px;
transition: opacity 0.15s, color 0.15s;
}
.todo-item:hover .todo-delete { opacity: 0.5; }
.todo-delete:hover { opacity: 1 !important; color: #ef4444; }
.todo-empty { opacity: 0.5; font-size: 13px; padding: 8px 0; text-align: center; }
.todo-empty { opacity: 0.4; font-size: 13px; padding: 6px 0; text-align: center; }
</style>
<div class="todo-widget" data-api="{{ $apiBase }}" data-user="{{ $user }}" data-key="{{ $apiKey }}">
@@ -1325,11 +1334,10 @@ data:
<style>
.motiv-widget { position: relative; }
.motiv-quote {
font-size: 15px; line-height: 1.6; opacity: 0.85;
font-style: italic; padding: 4px 0;
font-size: 18px; line-height: 1.6; opacity: 0.85;
font-style: italic; padding: 8px 0; text-align: center;
}
.motiv-gear {
position: absolute; top: -2.2rem; right: 0;
cursor: pointer; padding: 4px 6px; border-radius: 4px;
border: none; background: none; color: inherit;
font-size: 12px; opacity: 0.4; transition: opacity 0.15s;