Make district logo a link to their website

This commit is contained in:
Eli Ribble 2026-01-30 15:40:28 +00:00
parent 2baad02a0c
commit c42beaca66
No known key found for this signature in database
2 changed files with 14 additions and 10 deletions

View file

@ -18,8 +18,9 @@ var (
)
type ContentDistrict struct {
Name string
URLLogo string
Name string
URLLogo string
URLWebsite string
}
type ContentURL struct {
Nuisance string
@ -71,8 +72,9 @@ func renderMock(t *htmlpage.BuiltTemplate) func(http.ResponseWriter, *http.Reque
t,
ContentMock{
District: ContentDistrict{
Name: "Delta MVCD",
URLLogo: config.MakeURLNidus("/api/district/%s/logo", slug),
Name: "Delta MVCD",
URLLogo: config.MakeURLNidus("/api/district/%s/logo", slug),
URLWebsite: "http://www.deltavcd.com/",
},
MapboxToken: config.MapboxToken,
ReportID: "abcd-1234-5678",

View file

@ -104,12 +104,14 @@
</a>
</div>
<div class="mb-4 row justify-content-center">
{{ if not (eq .District nil) }}
<p>Your report will be handled by</p>
<p><b>{{ .District.Name }}</b></p>
<img class="logo" src="{{ .District.URLLogo }}" />
{{ end }}
<div class="row">
<div class="mb-4 text-center">
{{ if not (eq .District nil) }}
<p>Your report will be handled by</p>
<p><b>{{ .District.Name }}</b></p>
<a href="{{ .District.URLWebsite }}"><img class="logo" src="{{ .District.URLLogo }}" /></a>
{{ end }}
</div>
</div>
</div>
</div>