Files
ansible/roles/docker/templates/glance.yml.j2
Phil f0c4cb51b8 fix: resolve Glance template parsing conflict with Go template syntax
- Wrap Go template syntax in Jinja2 raw blocks to prevent parsing conflicts
- Fix custom-api air quality widget template rendering
- Update Glance dashboard layout with search widget and head-widgets

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 09:31:58 -06:00

154 lines
4.8 KiB
Django/Jinja

pages:
- name: Home
head-widgets:
- type: markets
hide-header: true
markets:
- symbol: SPY
name: S&P 500
- symbol: VTSAX
name: Vanguard Total Stock Market
- symbol: BAI
name: Blackrock AI
- symbol: NLR
name: VanEck Uranium+Nuclear Energy
- symbol: BITO
name: Bitcoin ETF
columns:
- size: full
widgets:
- type: search
search-engine: kagi
new-tab: true
- size: small
widgets:
- type: weather
location: Nederland, Colorado, United States
units: imperial
- type: custom-api
title: Air Quality
cache: 10m
url: https://api.waqi.info/feed/geo:39.9676367;-105.4037992/?token={{ vault_glance.air_quality_key }}
template: |
{% raw %}{{ $aqi := printf "%03s" (.JSON.String "data.aqi") }}
{{ $aqiraw := .JSON.String "data.aqi" }}
{{ $updated := .JSON.String "data.time.iso" }}
{{ $humidity := .JSON.String "data.iaqi.h.v" }}
{{ $ozone := .JSON.String "data.iaqi.o3.v" }}
{{ $pm25 := .JSON.String "data.iaqi.pm25.v" }}
{{ $pressure := .JSON.String "data.iaqi.p.v" }}
<div class="flex justify-between">
<div class="size-h5">
{{ if le $aqi "050" }}
<div class="color-positive">Good air quality</div>
{{ else if le $aqi "100" }}
<div class="color-primary">Moderate air quality</div>
{{ else }}
<div class="color-negative">Bad air quality</div>
{{ end }}
</div>
</div>
<div class="color-highlight size-h2">AQI: {{ $aqiraw }}</div>
<div style="border-bottom: 1px solid; margin-block: 10px;"></div>
<div class="margin-block-2">
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;">
<div>
<div class="size-h3 color-highlight">{{ $humidity }}%</div>
<div class="size-h6">HUMIDITY</div>
</div>
<div>
<div class="size-h3 color-highlight">{{ $ozone }} μg/m³</div>
<div class="size-h6">OZONE</div>
</div>
<div>
<div class="size-h3 color-highlight">{{ $pm25 }} μg/m³</div>
<div class="size-h6">PM2.5</div>
</div>
<div>
<div class="size-h3 color-highlight">{{ $pressure }} hPa</div>
<div class="size-h6">PRESSURE</div>
</div>
</div>
<div class="size-h6" style="margin-top: 10px;">Last Updated at {{ slice $updated 11 16 }}</div>
</div>{% endraw %}
- name: Mini Painting
columns:
- size: small
widgets:
- type: twitch-channels
channels:
- warhammer
- marcofrisoninjm
- miniac
- next_level_painting
- monument_hobbies
- visit_the_chronicler
- size: full
widgets:
- type: rss
limit: 10
collapse-after: 3
cache: 3h
feeds:
- url: https://thesatelliteoflove.com/feeds/warhammer_rss_feed.xml
title: Warhammer Community
- url: https://yenneferofexeter.wordpress.com/feed/
title: Yennefer of Exeter
- name: Self Hosting
columns:
- size: small
widgets:
- type: releases
show-source-icon: true
repositories:
- advplyr/audiobookshelf
- go-gitea/gitea
- louislam/dockge
- glanceapp/glance
- hoarder-app/hoarder
- goauthentik/authentik
- superseriousbusiness/gotosocial
- stonith404/pingvin-share
- caddyserver/caddy
- gitroomhq/postiz-app
- sabre-io/Baikal
- janeczku/calibre-web
- heyform/heyform
- paperless-ngx/paperless-ngx
- linuxserver/docker-calibre-web
- coder/code-server
- dgtlmoon/changedetection.io
- Freika/dawarich
- manyfold3d/manyfold
- caronc/apprise-api
- kieraneglin/pinchflat
- pinry/pinry
- syncthing/syncthing
- size: full
widgets:
- type: rss
limit: 10
collapse-after: 3
cache: 3h
feeds:
- url: https://selfh.st/rss/
- url: https://www.jeffgeerling.com/blog.xml
- url: https://samwho.dev/rss.xml
- url: https://awesomekling.github.io/feed.xml
- url: https://ishadeed.com/feed.xml
title: Ahmad Shadeed