Make district logo a link to their website
This commit is contained in:
parent
2baad02a0c
commit
c42beaca66
2 changed files with 14 additions and 10 deletions
10
rmo/mock.go
10
rmo/mock.go
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue