summaryrefslogtreecommitdiff
path: root/templates/template.html
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2022-01-11 23:39:30 +0100
committerLaria Carolin Chabowski <laria@laria.me>2022-01-11 23:40:14 +0100
commit2d73e0567c9ac6e03cfc8bfc62a8f24ef4fadebc (patch)
tree6eb596532249711e9f01f3c8f214cc8d61bc0ca5 /templates/template.html
parent67852eb58e1797a54a34df44e3444829d9031ad7 (diff)
downloadstartpage-2d73e0567c9ac6e03cfc8bfc62a8f24ef4fadebc.tar.gz
startpage-2d73e0567c9ac6e03cfc8bfc62a8f24ef4fadebc.tar.bz2
startpage-2d73e0567c9ac6e03cfc8bfc62a8f24ef4fadebc.zip
Use new met.no locationforecast 2.0 APIHEADmaster
The old XML API will be discontinued next month and is already returning errors occasionally (apparently to nudge lazy devs like me to update their code :D). We're also doing a much better job at caching now, as suggested by the API documentation. We're not yet showing a weather icon, I still have to figure out how to do this now (apparently the weather icons are a separate API / actually just a tag.gz archive that the weather API references?), but at least we're not panic()ing any more in the request handlers due to the unexpected error responses :/. See https://developer.yr.no/doc/GettingStarted/ for an intorduction to the new API.
Diffstat (limited to 'templates/template.html')
-rw-r--r--templates/template.html4
1 files changed, 1 insertions, 3 deletions
diff --git a/templates/template.html b/templates/template.html
index 4b20536..7592b50 100644
--- a/templates/template.html
+++ b/templates/template.html
@@ -80,8 +80,7 @@
<body {{ if .BgImage }} style="background-color: black; background-image: url(/bgimg);"{{ end }}>
{{ if .Weather }}
<div id="weather">
- <a href="{{ .Weather.URL }}"><img src="{{ .Weather.Icon }}" alt="" /></a>
- <span id="temp">{{ .Weather.Temp.Value }}°</span>
+ <span id="temp">{{ .Weather.Temp }}°</span>
</div>
{{ end }}
{{ if .Links }}
@@ -94,7 +93,6 @@
</div>
{{ end }}
-
<footer>
{{ if .Weather }}
<div id="yr_no_credit">Weather forecast from Yr, delivered by the Norwegian Meteorological Institute and NRK</div>