From 728d1bac34c91b80833b935330e4e48218df6649 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Thu, 22 Jan 2026 21:07:39 +0100 Subject: [PATCH] reorganized pages --- glance-system/glance-orsi.yaml | 218 +++++++++++++++++++++++++++++++-- 1 file changed, 207 insertions(+), 11 deletions(-) diff --git a/glance-system/glance-orsi.yaml b/glance-system/glance-orsi.yaml index bf34a5b..09855cd 100644 --- a/glance-system/glance-orsi.yaml +++ b/glance-system/glance-orsi.yaml @@ -133,17 +133,90 @@ data: # ---------- CENTER COLUMN ---------- - size: full widgets: - # Cal.com Booking iframe - - type: iframe - source: https://booking.dooplex.hu/bookings/upcoming - height: 350 - title: Upcoming Bookings + - type: split-column + max-columns: 3 + widgets: + # Weather Widget (Időkép) + - type: custom-api + title: "Időkép – Budapest VII." + url: "http://idokep-scraper.glance-system.svc.cluster.local:8000/api?v=2" + cache: 30s + template: | + {{ $loc := .JSON.String "location.name" }} + {{ if eq $loc "" }}{{ $loc = .JSON.String "place" }}{{ end }} + {{ $curTemp := .JSON.Float "current.temp_c" }} + {{ $curIcon := .JSON.String "current.icon_url" }} + {{ $daily := .JSON.Array "daily" }} + {{ $hourly := .JSON.Array "hourly" }} - # Google Calendar iframe - - type: iframe - source: https://calendar.google.com/calendar/embed?src=b2884faf3db792ac082a6206057552c79080716efd5f966e169a41fc500e1c1c%40group.calendar.google.com&ctz=Europe%2FBudapest - height: 400 - title: Calendar +
+
+
+ {{ if $curIcon }}{{ end }} +
{{ printf "%.0f" $curTemp }}°C
+
+
+
{{ $loc }}
+
Forrás: Időkép
+
+
+ + {{ if gt (len $hourly) 0 }} +
+ {{ range $i, $h := $hourly }} +
+
{{ $h.String "time" }}
+ {{ if $h.String "icon_url" }}{{ $h.String {{ end }} +
{{ printf "%.0f" ($h.Float "temp_c") }}°
+
+ {{ end }} +
+ {{ end }} + + {{ if gt (len $daily) 0 }} +
+ {{ range $daily }} +
+
+ {{ .String "dow" }} + {{ .String "daynum" }} +
+
+ {{ if .String "icon_url" }}{{ .String {{ end }} +
+
{{ printf "%.0f" (.Float "tmin_c") }}°
+ +
+
+ + {{/* We construct the style manually to bypass Go security sanitization */}} +
+
+
+
+ +
{{ printf "%.0f" (.Float "tmax_c") }}°
+
+ {{ end }} +
+ {{ end }} +
+ # Calendar Widget + - type: calendar + first-day-of-week: monday + # To-Do List + - type: to-do + title: Tasks # Outline Notes iframe - type: iframe @@ -228,7 +301,7 @@ data: {{ end }} - + - type: to-do title: Tasks # RSS Feeds - Add your favorite feeds here @@ -256,6 +329,43 @@ data: title: youarenotsosmart.com limit: 3 + # ==================== TEACHING/LEARNING PAGE ==================== + - name: Teaching & Learning + slug: teaching + width: wide + columns: + - size: small + widgets: + - type: bookmarks + title: Links for Teaching + groups: + - links: + - title: Plex + url: https://plex.dooplex.hu + icon: si:plex + - type: bookmarks + title: Links for Learning + groups: + - links: + - title: Plex + url: https://plex.dooplex.hu + icon: si:plex + + # ---------- CENTER COLUMN ---------- + - size: full + widgets: + # Cal.com Booking iframe + - type: iframe + source: https://booking.dooplex.hu/bookings/upcoming + height: 500 + title: Upcoming Bookings + + # Google Calendar iframe + - type: iframe + source: https://calendar.google.com/calendar/embed?src=b2884faf3db792ac082a6206057552c79080716efd5f966e169a41fc500e1c1c%40group.calendar.google.com&ctz=Europe%2FBudapest + height: 500 + title: Calendar + # ==================== MEDIA PAGE ==================== - name: Media slug: media @@ -705,7 +815,93 @@ data: content: none !important; display: none !important; } + /* ========================================================================= + Időkép custom-api widget + ========================================================================= */ + .idokep { display: flex; flex-direction: column; gap: 10px; } + .idokep-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; } + .idokep-top-left { display: flex; align-items: center; gap: 10px; } + .idokep-icon { width: 42px; height: 42px; opacity: 0.95; } + .idokep-temp { font-size: 42px; font-weight: 700; letter-spacing: 0.5px; line-height: 1; } + + .idokep-top-right { text-align: right; } + .idokep-loc { opacity: 0.85; font-weight: 600; } + .idokep-src { opacity: 0.6; font-size: 12px; margin-top: 2px; } + .idokep-src a { opacity: 0.9; } + + .idokep-hourly { display: flex; gap: 10px; padding-top: 4px; } + .idokep-hour { width: 54px; display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0.9; } + .idokep-hour-time { font-size: 12px; opacity: 0.65; } + .idokep-hour-icon { width: 26px; height: 26px; } + .idokep-hour-temp { font-weight: 700; } + + .idokep-muted { opacity: 0.6; font-size: 12px; padding: 4px 0; } + + .idokep-daily { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; } + .idokep-row { + display: grid; + grid-template-columns: 44px 26px 36px 1fr 36px; /* day+date, icon, min, bar, max */ + gap: 10px; + align-items: center; + } + .idokep-dow { opacity: 0.7; font-weight: 700; } + .idokep-dayicon img { width: 22px; height: 22px; opacity: 0.95; } + .idokep-min, .idokep-max { text-align: right; font-weight: 700; opacity: 0.8; } + .idokep-dow { + display: grid; + grid-template-columns: 22px 1fr; /* dow then daynum */ + column-gap: 6px; + align-items: center; + opacity: 0.8; + font-weight: 700; + } + .idokep-daynum { + text-align: right; + opacity: 0.75; + font-variant-numeric: tabular-nums; + } + .idokep-bar { + position: relative; + height: 10px; + } + .idokep-bar-track { + position: absolute; + inset: 0; + border-radius: 999px; + background: rgba(255,255,255,0.10); + } + .idokep-bar-fill { + position: absolute; + top: 0; + bottom: 0; + border-radius: 999px; + overflow: hidden; + box-shadow: 0 0 0 1px rgba(0,0,0,0.08) inset; + + /* Position controlled by Python variables */ + left: var(--l, 0%); + width: var(--w, 0%); + } + /* This element holds the gradient */ + .idokep-bar-gradient { + position: absolute; + top: 0; + bottom: 0; + + /* Compensation geometry controlled by Python variables */ + width: var(--gw, 100%); + margin-left: var(--ml, 0%); + + /* The Dynamic Gradient */ + background: linear-gradient(90deg, + #ffffff var(--s-wht), + #60a5fa var(--s-blu), + #a78bfa var(--s-pur), + #fb7185 var(--s-pnk), + #ef4444 var(--s-red) + ); + } --- apiVersion: apps/v1 kind: Deployment