updated widget for line wrapping

This commit is contained in:
2026-01-22 17:45:28 +01:00
parent a3b06f5e5e
commit 0dfaee6cc7
+6 -10
View File
@@ -779,11 +779,10 @@ data:
title: Meal for the Day title: Meal for the Day
cache: 5m cache: 5m
# Served by glance-helper: stable picks for the day + "cooked" support
url: http://glance-helper.glance-system.svc.cluster.local:8000/tandoor/daily url: http://glance-helper.glance-system.svc.cluster.local:8000/tandoor/daily
parameters: parameters:
count: 3 count: 3
cooldown: 14 # Optional: override default cooldown days cooldown: 14
options: options:
tandoor_url: https://tandoor.dooplex.hu tandoor_url: https://tandoor.dooplex.hu
@@ -797,27 +796,24 @@ data:
<style> <style>
.mw { display:flex; flex-direction:column; gap:6px; } .mw { display:flex; flex-direction:column; gap:6px; }
.mw-meta { opacity:.65; font-size:12px; display:flex; justify-content:space-between; align-items:center; } .mw-meta { opacity:.65; font-size:12px; display:flex; justify-content:space-between; align-items:center; }
.mw-box { position:relative; border-radius:14px; background:rgba(255,255,255,0.04); box-shadow:0 0 0 1px rgba(255,255,255,0.06) inset; overflow:hidden; } .mw-box { position:relative; border-radius:14px; background:rgba(255,255,255,0.04); box-shadow:0 0 0 1px rgba(255,255,255,0.06) inset; overflow:hidden; width:100%; }
.mw-box input { display:none; } .mw-box input { display:none; }
.mw-track { display:flex; } .mw-track { display:flex; transition:transform 0.3s ease; }
.mw-s { min-width:100%; flex-shrink:0; } .mw-s { min-width:100%; width:100%; flex-shrink:0; box-sizing:border-box; }
.mw-img { height:150px; background:rgba(0,0,0,0.15); overflow:hidden; } .mw-img { height:150px; background:rgba(0,0,0,0.15); overflow:hidden; }
.mw-img img { width:100%; height:100%; object-fit:cover; } .mw-img img { width:100%; height:100%; object-fit:cover; display:block; }
.mw-noimg { height:150px; display:flex; align-items:center; justify-content:center; opacity:.5; font-size:12px; } .mw-noimg { height:150px; display:flex; align-items:center; justify-content:center; opacity:.5; font-size:12px; }
.mw-name { padding:10px 12px 4px; font-weight:700; opacity:.95; line-height:1.3; } .mw-name { padding:10px 12px 4px; font-weight:700; opacity:.95; line-height:1.3; overflow-wrap:break-word; word-break:break-word; }
.mw-stats { padding:0 12px 6px; font-size:11px; opacity:.5; } .mw-stats { padding:0 12px 6px; font-size:11px; opacity:.5; }
.mw-acts { padding:0 12px 10px; display:flex; gap:10px; opacity:.8; font-size:12px; } .mw-acts { padding:0 12px 10px; display:flex; gap:10px; opacity:.8; font-size:12px; }
.mw-acts a, .mw-link { text-decoration:none; color:inherit; display:block; } .mw-acts a, .mw-link { text-decoration:none; color:inherit; display:block; }
/* Arrows */
.mw-p, .mw-n { position:absolute; top:75px; transform:translateY(-50%); width:26px; height:26px; border-radius:50%; background:rgba(0,0,0,0.6); color:#fff; align-items:center; justify-content:center; font-size:11px; cursor:pointer; z-index:5; display:none; } .mw-p, .mw-n { position:absolute; top:75px; transform:translateY(-50%); width:26px; height:26px; border-radius:50%; background:rgba(0,0,0,0.6); color:#fff; align-items:center; justify-content:center; font-size:11px; cursor:pointer; z-index:5; display:none; }
.mw-p { left:6px; } .mw-p { left:6px; }
.mw-n { right:6px; } .mw-n { right:6px; }
.mw-p:hover, .mw-n:hover { background:rgba(0,0,0,0.85); } .mw-p:hover, .mw-n:hover { background:rgba(0,0,0,0.85); }
/* Dots */
.mw-dots { display:flex; justify-content:center; gap:5px; padding:3px 0 1px; } .mw-dots { display:flex; justify-content:center; gap:5px; padding:3px 0 1px; }
.mw-dot { width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,0.2); cursor:pointer; } .mw-dot { width:6px; height:6px; border-radius:50%; background:rgba(255,255,255,0.2); cursor:pointer; }
.mw-dot:hover { background:rgba(255,255,255,0.4); } .mw-dot:hover { background:rgba(255,255,255,0.4); }
/* Dynamic styles per slide */
{{ range $i, $_ := $items }} {{ range $i, $_ := $items }}
#mr{{ $i }}:checked ~ .mw-track { transform:translateX(-{{ mul $i 100 }}%); } #mr{{ $i }}:checked ~ .mw-track { transform:translateX(-{{ mul $i 100 }}%); }
#mr{{ $i }}:checked ~ .mw-dots .mw-dot:nth-child({{ add $i 1 }}) { background:rgba(255,255,255,0.85); } #mr{{ $i }}:checked ~ .mw-dots .mw-dot:nth-child({{ add $i 1 }}) { background:rgba(255,255,255,0.85); }