1
0
Fork 0

Improve text/plain formatting

main
Ambrose Chua 2020-11-22 11:27:26 +08:00
parent 3e32c6f6e4
commit 8b4062e3af
2 changed files with 9 additions and 8 deletions

View File

@ -13,10 +13,9 @@
<main id="app">
{{$app := .App}}
{{$t := .Req.Time}}
{{range .Req.Zones}}
<d-zone zone="{{.}}">
{{$zoneName := .}}
{{with resolveZone $app .}}
{{range $zoneName := .Req.Zones}}
<d-zone zone="{{$zoneName}}">
{{with resolveZone $app $zoneName}}
{{if .Error}}
<d-zoneerror>
Unable to load zone "{{$zoneName}}". The zone could be invalid

View File

@ -1,13 +1,15 @@
{{- $app := .App -}}
{{- $t := .Req.Time -}}
{{- range .Req.Zones -}}
{{- $zoneName := . -}}
{{with resolveZone $app .}}
{{- range $index, $zoneName := .Req.Zones -}}
{{- with resolveZone $app $zoneName -}}
{{- if .Error}}
Unable to load zone "{{$zoneName | thisIsSafe}}". The zone could be invalid
{{/* */}}
{{- else -}}
{{- $zt := $t.In .Location}}
{{- $zt := $t.In .Location -}}
{{- if ne $index 0}}
{{/* */}}
{{- end -}}
{{.Name | thisIsSafe}}
{{- if not .IsOffset }} {{.TimeOffset $t | formatOffset | thisIsSafe}}
{{- end}}