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>
This commit is contained in:
2025-07-03 09:31:58 -06:00
parent c95ca45a67
commit f0c4cb51b8

View File

@ -1,40 +1,27 @@
pages: pages:
- name: Home - name: Home
columns: head-widgets:
- size: small - type: markets
widgets: hide-header: true
- type: calendar 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
- type: server-stats columns:
servers:
- type: local
name: Services
- size: full - size: full
widgets: widgets:
- type: group - type: search
widgets: search-engine: kagi
- type: hacker-news new-tab: true
- type: rss
limit: 10
collapse-after: 3
cache: 3h
feeds:
- url: https://kill-the-newsletter.com/feeds/ij4twrnzhrwvyic13qcm.xml
- url: https://mrmoneymustache.ck.page/68f9e9826c
- type: rss
title: Gear
limit: 10
collapse-after: 3
cache: 3h
feeds:
- url: https://9to5toys.com/steals/feed
- url: https://hiro.report/rss/
- type: change-detection
instance-url: https://watcher.thesatelliteoflove.com
token: ac69ae11570548549d6706eac6dbb6a9
- type: docker-containers
hide-by-default: false
- size: small - size: small
widgets: widgets:
@ -42,24 +29,62 @@ pages:
location: Nederland, Colorado, United States location: Nederland, Colorado, United States
units: imperial units: imperial
- type: markets - type: custom-api
markets: title: Air Quality
- symbol: SPY cache: 10m
name: S&P 500 url: https://api.waqi.info/feed/geo:39.9676367;-105.4037992/?token={{ vault_glance.air_quality_key }}
- symbol: VTSAX template: |
name: Vanguard Total Stock Market {% raw %}{{ $aqi := printf "%03s" (.JSON.String "data.aqi") }}
- symbol: BAI {{ $aqiraw := .JSON.String "data.aqi" }}
name: Blackrock AI {{ $updated := .JSON.String "data.time.iso" }}
- symbol: NLR {{ $humidity := .JSON.String "data.iaqi.h.v" }}
name: VanEck Uranium+Nuclear Energy {{ $ozone := .JSON.String "data.iaqi.o3.v" }}
- symbol: BITO {{ $pm25 := .JSON.String "data.iaqi.pm25.v" }}
name: Bitcoin ETF {{ $pressure := .JSON.String "data.iaqi.p.v" }}
- symbol: GOOGL
name: Google <div class="flex justify-between">
- symbol: AMD <div class="size-h5">
name: AMD {{ if le $aqi "050" }}
- symbol: DJT <div class="color-positive">Good air quality</div>
name: Trump Media {{ 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 - name: Mini Painting
columns: columns:
- size: small - size: small