diff --git a/main.go b/main.go index 8c48164..9a67aed 100644 --- a/main.go +++ b/main.go @@ -45,8 +45,9 @@ type pageTemplate struct { // summaryTemplateData stores template data for summary.html type summaryTemplateData struct { - Summary string - Location string + Summary string + Location string + LocationName string } // updateSubscription is the request body for creating/updating registration @@ -368,7 +369,8 @@ func handleHTTPRequest(state *state) http.HandlerFunc { summary, ok := state.summaries.Load(path) if ok { - state.template.summary.Execute(writer, summaryTemplateData{summary.(string), path}) + loc := supportedLocations[path] + state.template.summary.Execute(writer, summaryTemplateData{summary.(string), path, loc.displayName}) } else { f, err := webDir.ReadFile("web/" + path) if err != nil { diff --git a/web/hero.png b/web/hero.png new file mode 100644 index 0000000..aece8e2 Binary files /dev/null and b/web/hero.png differ diff --git a/web/index.html b/web/index.html index dea9157..c17e912 100644 --- a/web/index.html +++ b/web/index.html @@ -2,7 +2,12 @@ - 7am Weather + 7am - Daily weather summary + + + + + @@ -19,7 +24,7 @@

7am

-

Daily weather updates delivered to you at 7am.

+

Daily weather summary delivered to you at 7am.

diff --git a/web/summary.html b/web/summary.html index 796d2f4..af0a79a 100644 --- a/web/summary.html +++ b/web/summary.html @@ -2,7 +2,12 @@ - 7am Weather + 7am weather for {{.LocationName}} + + + + + @@ -20,7 +25,7 @@
<- All locations

{{.Summary}}

- +