diff --git a/handlers/supporters.go b/handlers/supporters.go new file mode 100644 index 0000000..6425690 --- /dev/null +++ b/handlers/supporters.go @@ -0,0 +1,14 @@ +package handlers + +import ( + "net/http" + "text/template" +) + +// SupportersHandler handles the supporters page +func SupportersHandler(w http.ResponseWriter, r *http.Request) { + t := template.Must(template.New("supporters.html").Delims("[[", "]]").ParseFiles("templates/supporters.html", "templates/footer.html")) + t.Execute(w, map[string]interface{}{ + "google_analytics_key": googleAnalyticsKey, + }) +} diff --git a/main.go b/main.go index 2fcc3b2..1a0dc0a 100644 --- a/main.go +++ b/main.go @@ -132,6 +132,7 @@ func main() { http.HandleFunc(m.instrument("/report/", makeHandler("report", handlers.ReportHandler))) http.HandleFunc(m.instrument("/badge/", makeHandler("badge", handlers.BadgeHandler))) http.HandleFunc(m.instrument("/high_scores/", handlers.HighScoresHandler)) + http.HandleFunc(m.instrument("/supporters/", handlers.SupportersHandler)) http.HandleFunc(m.instrument("/about/", handlers.AboutHandler)) http.HandleFunc(m.instrument("/", handlers.HomeHandler)) diff --git a/templates/about.html b/templates/about.html index dda4f10..84cc7f9 100644 --- a/templates/about.html +++ b/templates/about.html @@ -47,6 +47,9 @@ GitHub + + Supporters + About diff --git a/templates/high_scores.html b/templates/high_scores.html index 28be916..c581cda 100644 --- a/templates/high_scores.html +++ b/templates/high_scores.html @@ -47,6 +47,9 @@ GitHub + + Supporters + About diff --git a/templates/home.html b/templates/home.html index 2a184d1..e12bb4a 100644 --- a/templates/home.html +++ b/templates/home.html @@ -45,6 +45,9 @@ GitHub + + Supporters + About diff --git a/templates/supporters.html b/templates/supporters.html new file mode 100644 index 0000000..54fd5ea --- /dev/null +++ b/templates/supporters.html @@ -0,0 +1,68 @@ + + + + + + + Go Report Card | Go project code quality report cards + + + + + +
+
+ + + + + + + + + + + +
+ + High Scores + + + GitHub + + + Supporters + + + About + +
+
+
+
+
+

Supporters

+ +
+
+ [[ template "footer" . ]] + +