diff --git a/public-report/mock.go b/public-report/mock.go index fb4d0017..d9746194 100644 --- a/public-report/mock.go +++ b/public-report/mock.go @@ -9,23 +9,38 @@ import ( ) var ( - mockRootT = buildTemplate("mock/root", "base") mockDistrictRootT = buildTemplate("mock/district-root", "base") + mockNuisanceT = buildTemplate("mock/nuisance", "base") + mockRootT = buildTemplate("mock/root", "base") ) type ContentDistrict struct { - LogoURL string Name string + URLLogo string +} +type ContentURL struct { + Nuisance string } type ContentMock struct { District ContentDistrict + URL ContentURL } func addMockRoutes(r chi.Router) { r.Get("/", renderMock(mockRootT)) + r.Get("/nuisance", renderMock(mockNuisanceT)) r.Get("/district/{slug}", renderMock(mockDistrictRootT)) } +func makeContentURL() ContentURL { + return ContentURL{ + Nuisance: makeURLMock("nuisance"), + } +} + +func makeURLMock(p string) string { + return config.MakeURLReport("/mock/%s", p) +} func renderMock(t *htmlpage.BuiltTemplate) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, r *http.Request) { slug := chi.URLParam(r, "slug") @@ -34,9 +49,10 @@ func renderMock(t *htmlpage.BuiltTemplate) func(http.ResponseWriter, *http.Reque t, ContentMock{ District: ContentDistrict{ - LogoURL: config.MakeURLNidus("/api/district/%s/logo", slug), Name: "Delta MCD", + URLLogo: config.MakeURLNidus("/api/district/%s/logo", slug), }, + URL: makeContentURL(), }, ) } diff --git a/public-report/template/mock/district-root.html b/public-report/template/mock/district-root.html index 14009aa0..68a0b33e 100644 --- a/public-report/template/mock/district-root.html +++ b/public-report/template/mock/district-root.html @@ -36,7 +36,7 @@
This is the reporting page for mosquito problems in your area.
Reports submitted here are reviewed by {{.District.Name}}, which helps identify and address mosquito problems in your community.
Report areas with high adult mosquito activity causing discomfort or concern.
- Report Problem + Report Problem diff --git a/public-report/template/mock/nuisance.html b/public-report/template/mock/nuisance.html new file mode 100644 index 00000000..14643efb --- /dev/null +++ b/public-report/template/mock/nuisance.html @@ -0,0 +1,500 @@ +{{template "base.html" .}} + +{{define "title"}}Nuisance{{end}} +{{define "extraheader"}} + + +{{end}} +{{define "content"}} +Help us identify mosquito activity in your area
+When you submit this form, our team uses the information you provide along with mosquito surveillance data to identify likely mosquito production sites and plan effective control actions. This allows us to target the sources of mosquitoes and reduce mosquito populations in your neighborhood.
+