diff --git a/htmlpage/public-reports/page.go b/htmlpage/public-reports/page.go index 5fb1b0d5..4ce4e388 100644 --- a/htmlpage/public-reports/page.go +++ b/htmlpage/public-reports/page.go @@ -15,12 +15,14 @@ var EmbeddedStaticFS embed.FS type ContextNuisance struct{} type ContextPool struct{} +type ContextQuick struct{} type ContextRoot struct{} type ContextStatus struct{} var ( Nuisance = buildTemplate("nuisance", "base") Pool = buildTemplate("pool", "base") + Quick = buildTemplate("quick", "base") Root = buildTemplate("root", "base") Status = buildTemplate("status", "base") ) diff --git a/htmlpage/public-reports/template/quick.html b/htmlpage/public-reports/template/quick.html new file mode 100644 index 00000000..bbd5711c --- /dev/null +++ b/htmlpage/public-reports/template/quick.html @@ -0,0 +1,127 @@ +{{template "base.html" .}} + +{{define "title"}}Dash{{end}} +{{define "extraheader"}} + +{{end}} +{{define "content"}} + +
+
+
+
+
+

Quick Mosquito Report

+ + +
+ +
+ + + + + Your location and current time will be automatically collected with your report. +
+ + +
+ +
+ + + + +
+ + +
+ Take pictures of the mosquito problem area + + +
+ + Preview +
+
+
+ + +
+ + +
+ + + +
+
+
+ + + +
+
+
+ +{{end}} diff --git a/report/endpoint.go b/report/endpoint.go index 383b02fb..be2d6683 100644 --- a/report/endpoint.go +++ b/report/endpoint.go @@ -13,6 +13,7 @@ func Router() chi.Router { r.Get("/", getRoot) r.Get("/nuisance", getNuisance) r.Get("/pool", getPool) + r.Get("/quick", getQuick) r.Get("/status", getStatus) localFS := http.Dir("./static") htmlpage.FileServer(r, "/static", localFS, publicreports.EmbeddedStaticFS, "static") @@ -41,6 +42,13 @@ func getPool(w http.ResponseWriter, r *http.Request) { publicreports.ContextPool{}, ) } +func getQuick(w http.ResponseWriter, r *http.Request) { + htmlpage.RenderOrError( + w, + publicreports.Quick, + publicreports.ContextQuick{}, + ) +} func getStatus(w http.ResponseWriter, r *http.Request) { htmlpage.RenderOrError( w,