Some checks failed
secrets-guard / encrypted (push) Successful in 24s
shell-lint / shellcheck (push) Successful in 26s
Deploy frontend to LAN dev server / build (push) Successful in 2m11s
Build + push frontend image (Forgejo registry) / build-push (push) Successful in 2m20s
Build + push backend image (Forgejo registry) / build-push (push) Successful in 2m28s
Deploy backend to LAN dev server / build (push) Successful in 2m45s
PR build (required check) / changes (pull_request) Successful in 16s
secrets-guard / encrypted (pull_request) Successful in 16s
shell-lint / shellcheck (pull_request) Successful in 15s
PR build (required check) / build-frontend (pull_request) Has been skipped
PR build (required check) / validate-observability (pull_request) Has been skipped
Deploy frontend to LAN dev server / deploy (push) Successful in 39s
PR build (required check) / build-backend (pull_request) Successful in 1m21s
PR build (required check) / gate (pull_request) Successful in 3s
Deploy backend to LAN dev server / deploy (push) Failing after 2m31s
60 lines
No EOL
3 KiB
Cheetah
60 lines
No EOL
3 KiB
Cheetah
{{/* Ported from templates/month.html.j2. Extra data (all display values are
|
||
pre-formatted by the handler inside the city's unit scope, as in Python):
|
||
.Breadcrumb; .City (needs .Slug); .Display/.Name/.MonthName string;
|
||
.YearRange [2]int; .AvgHigh/.AvgLow template.HTML (temp spans);
|
||
.AvgHighCls/.AvgLowCls string (temp_class names);
|
||
.Stats []{Label string; Value template.HTML};
|
||
.Records []{Label, HighTag, LowTag string; High, Low template.HTML;
|
||
HighDate, LowDate string};
|
||
.ToolHref string — the full "{base}/#{lat:.5f},{lon:.5f}" href, built by
|
||
the handler: composed inline (Jinja's {{ base }}/#{{ tool_hash }}) the
|
||
fragment would hit html/template's urlEscaper and %-escape the comma;
|
||
.CompareURL string; .Prev/.Next {Slug, Name string}. */}}{{template "base_head_start" .}}{{template "base_head_end" .}}{{template "base_body_start" .}}{{template "breadcrumb" .}}
|
||
<article class="climate-page">
|
||
<h1>Weather in {{.Display}} in {{.MonthName}}</h1>
|
||
<p class="lede">In an average {{.MonthName}}, {{.Name}} sees a daily high around
|
||
<b class="t-inline t-{{.AvgHighCls}}">{{.AvgHigh}}</b> and a low around
|
||
<b class="t-inline t-{{.AvgLowCls}}">{{.AvgLow}}</b>, based on
|
||
{{index .YearRange 0}}–{{index .YearRange 1}} of local climate records.</p>
|
||
|
||
<table class="normals-table" style="max-width:520px">
|
||
<tbody>
|
||
{{range .Stats}} <tr><th style="width:55%">{{.Label}}</th><td>{{.Value}}</td></tr>
|
||
{{end}} </tbody>
|
||
</table>
|
||
|
||
{{if .Records}} <h2>{{.MonthName}} records</h2>
|
||
<p class="muted">The most extreme {{.MonthName}} on record for each metric, across
|
||
{{index .YearRange 0}}–{{index .YearRange 1}}. For rainfall, the wettest and driest are by
|
||
total {{.MonthName}} accumulation.</p>
|
||
<div class="records-grid">
|
||
{{range .Records}} <div class="record-card">
|
||
<h3 class="rc-metric">{{.Label}}</h3>
|
||
<div class="rc-row rc-high">
|
||
<span class="rc-tag">{{.HighTag}}</span>
|
||
<span class="rc-val">{{.High}}</span>
|
||
<span class="rc-date">{{.HighDate}}</span>
|
||
</div>
|
||
<div class="rc-row rc-low">
|
||
<span class="rc-tag">{{.LowTag}}</span>
|
||
<span class="rc-val">{{.Low}}</span>
|
||
<span class="rc-date">{{.LowDate}}</span>
|
||
</div>
|
||
</div>
|
||
{{end}} </div>
|
||
{{end}}
|
||
<p><a class="cta" href="{{.ToolHref}}">See {{.Name}}'s live weather grade →</a></p>
|
||
|
||
<div class="travel-note">
|
||
<p>Visiting <b>{{.Name}}</b> in {{.MonthName}}? See how its comfort stacks up against
|
||
where you live.</p>
|
||
<a class="cta" href="{{.CompareURL}}">Compare {{.Name}} with your city →</a>
|
||
</div>
|
||
|
||
<p class="climate-foot muted">
|
||
<a href="{{.Base}}/climate/{{.City.Slug}}/{{.Prev.Slug}}">‹ {{.Prev.Name}}</a> ·
|
||
<a href="{{.Base}}/climate/{{.City.Slug}}">{{.Name}} climate overview</a> ·
|
||
<a href="{{.Base}}/climate/{{.City.Slug}}/{{.Next.Slug}}">{{.Next.Name}} ›</a>
|
||
</p>
|
||
</article>
|
||
{{template "base_body_end" .}}{{template "base_scripts_default" .}}{{template "base_tail" .}} |