moved tandoor widget
This commit is contained in:
@@ -627,71 +627,6 @@ data:
|
|||||||
url: https://pihole.dooplex.hu/admin
|
url: https://pihole.dooplex.hu/admin
|
||||||
icon: si:pihole
|
icon: si:pihole
|
||||||
|
|
||||||
- type: custom-api
|
|
||||||
title: Meal for the Day
|
|
||||||
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
|
|
||||||
parameters:
|
|
||||||
count: 3
|
|
||||||
|
|
||||||
options:
|
|
||||||
tandoor_url: https://tandoor.dooplex.hu
|
|
||||||
|
|
||||||
template: |
|
|
||||||
<style>
|
|
||||||
.mealwrap { display:flex; flex-direction:column; gap:10px; }
|
|
||||||
.mealmeta { opacity:.65; font-size:12px; display:flex; justify-content:space-between; align-items:center; }
|
|
||||||
.mealscroller { display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; padding-bottom:6px; }
|
|
||||||
.mealslide { min-width:100%; scroll-snap-align:start; border-radius:14px; overflow:hidden; background:rgba(255,255,255,0.04); box-shadow:0 0 0 1px rgba(255,255,255,0.06) inset; }
|
|
||||||
.mealimg { height:150px; background:rgba(0,0,0,0.15); display:flex; align-items:center; justify-content:center; overflow:hidden; }
|
|
||||||
.mealimg img { width:100%; height:100%; object-fit:cover; display:block; }
|
|
||||||
.mealnoimg { opacity:.55; font-size:12px; padding:18px; text-align:center; }
|
|
||||||
.mealname { padding:10px 12px 8px; font-weight:700; opacity:.95; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
|
||||||
.mealactions { padding:0 12px 12px; display:flex; gap:10px; opacity:.8; font-size:12px; }
|
|
||||||
.mealactions a { text-decoration:none; }
|
|
||||||
.meallink { display:block; color:inherit; text-decoration:none; }
|
|
||||||
</style>
|
|
||||||
|
|
||||||
{{ $tandoor := .Options.StringOr "tandoor_url" "https://tandoor.dooplex.hu" }}
|
|
||||||
{{ $items := .JSON.Array "items" }}
|
|
||||||
{{ $total := .JSON.Int "total_recipes" }}
|
|
||||||
{{ $date := .JSON.String "date" }}
|
|
||||||
|
|
||||||
<div class="mealwrap">
|
|
||||||
<div class="mealmeta">
|
|
||||||
<span>Today’s picks ({{ $total }} total)</span>
|
|
||||||
<a href="{{ $tandoor }}" target="_blank" rel="noreferrer">Open Tandoor</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ if lt (len $items) 1 }}
|
|
||||||
<div class="color-negative">No recipes returned.</div>
|
|
||||||
{{ else }}
|
|
||||||
<div class="mealscroller">
|
|
||||||
{{ range $i, $r := $items }}
|
|
||||||
{{ $name := $r.String "name" }}
|
|
||||||
{{ $img := $r.String "image" }}
|
|
||||||
{{ $url := $r.String "url" }}
|
|
||||||
{{ $cook := $r.String "cook_url" }}
|
|
||||||
|
|
||||||
<div class="mealslide">
|
|
||||||
<a class="meallink" href="{{ $url }}" target="_blank" rel="noreferrer">
|
|
||||||
<div class="mealimg">
|
|
||||||
{{ if $img }}<img src="{{ $img }}" alt="" />{{ else }}<div class="mealnoimg">No image</div>{{ end }}
|
|
||||||
</div>
|
|
||||||
<div class="mealname">{{ $name }}</div>
|
|
||||||
</a>
|
|
||||||
<div class="mealactions">
|
|
||||||
<a href="{{ $url }}" target="_blank" rel="noreferrer">Open</a>
|
|
||||||
<a href="{{ $cook }}" target="_blank" rel="noreferrer">Cooked today ✓</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
# ---------- CENTER COLUMN ----------
|
# ---------- CENTER COLUMN ----------
|
||||||
- size: full
|
- size: full
|
||||||
widgets:
|
widgets:
|
||||||
@@ -804,6 +739,71 @@ data:
|
|||||||
# ---------- RIGHT COLUMN ----------
|
# ---------- RIGHT COLUMN ----------
|
||||||
- size: small
|
- size: small
|
||||||
widgets:
|
widgets:
|
||||||
|
- type: custom-api
|
||||||
|
title: Meal for the Day
|
||||||
|
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
|
||||||
|
parameters:
|
||||||
|
count: 3
|
||||||
|
|
||||||
|
options:
|
||||||
|
tandoor_url: https://tandoor.dooplex.hu
|
||||||
|
|
||||||
|
template: |
|
||||||
|
<style>
|
||||||
|
.mealwrap { display:flex; flex-direction:column; gap:10px; }
|
||||||
|
.mealmeta { opacity:.65; font-size:12px; display:flex; justify-content:space-between; align-items:center; }
|
||||||
|
.mealscroller { display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; padding-bottom:6px; }
|
||||||
|
.mealslide { min-width:100%; scroll-snap-align:start; border-radius:14px; overflow:hidden; background:rgba(255,255,255,0.04); box-shadow:0 0 0 1px rgba(255,255,255,0.06) inset; }
|
||||||
|
.mealimg { height:150px; background:rgba(0,0,0,0.15); display:flex; align-items:center; justify-content:center; overflow:hidden; }
|
||||||
|
.mealimg img { width:100%; height:100%; object-fit:cover; display:block; }
|
||||||
|
.mealnoimg { opacity:.55; font-size:12px; padding:18px; text-align:center; }
|
||||||
|
.mealname { padding:10px 12px 8px; font-weight:700; opacity:.95; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||||
|
.mealactions { padding:0 12px 12px; display:flex; gap:10px; opacity:.8; font-size:12px; }
|
||||||
|
.mealactions a { text-decoration:none; }
|
||||||
|
.meallink { display:block; color:inherit; text-decoration:none; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
{{ $tandoor := .Options.StringOr "tandoor_url" "https://tandoor.dooplex.hu" }}
|
||||||
|
{{ $items := .JSON.Array "items" }}
|
||||||
|
{{ $total := .JSON.Int "total_recipes" }}
|
||||||
|
{{ $date := .JSON.String "date" }}
|
||||||
|
|
||||||
|
<div class="mealwrap">
|
||||||
|
<div class="mealmeta">
|
||||||
|
<span>Today’s picks ({{ $total }} total)</span>
|
||||||
|
<a href="{{ $tandoor }}" target="_blank" rel="noreferrer">Open Tandoor</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if lt (len $items) 1 }}
|
||||||
|
<div class="color-negative">No recipes returned.</div>
|
||||||
|
{{ else }}
|
||||||
|
<div class="mealscroller">
|
||||||
|
{{ range $i, $r := $items }}
|
||||||
|
{{ $name := $r.String "name" }}
|
||||||
|
{{ $img := $r.String "image" }}
|
||||||
|
{{ $url := $r.String "url" }}
|
||||||
|
{{ $cook := $r.String "cook_url" }}
|
||||||
|
|
||||||
|
<div class="mealslide">
|
||||||
|
<a class="meallink" href="{{ $url }}" target="_blank" rel="noreferrer">
|
||||||
|
<div class="mealimg">
|
||||||
|
{{ if $img }}<img src="{{ $img }}" alt="" />{{ else }}<div class="mealnoimg">No image</div>{{ end }}
|
||||||
|
</div>
|
||||||
|
<div class="mealname">{{ $name }}</div>
|
||||||
|
</a>
|
||||||
|
<div class="mealactions">
|
||||||
|
<a href="{{ $url }}" target="_blank" rel="noreferrer">Open</a>
|
||||||
|
<a href="{{ $cook }}" target="_blank" rel="noreferrer">Cooked today ✓</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
- type: bookmarks
|
- type: bookmarks
|
||||||
title: Useful Bookmarks
|
title: Useful Bookmarks
|
||||||
groups:
|
groups:
|
||||||
|
|||||||
Reference in New Issue
Block a user