removed useless "home" site for now

This commit is contained in:
Nils Stinnesbeck 2020-11-08 17:09:58 +01:00
parent b0f8d81254
commit 620db27468
Signed by: nils
GPG Key ID: 86D4882C6C6CA48B
3 changed files with 6 additions and 5 deletions

View File

@ -15,8 +15,9 @@ func main() {
http.Handle("/css/", http.StripPrefix("/css/", http.FileServer(http.Dir("css")))) http.Handle("/css/", http.StripPrefix("/css/", http.FileServer(http.Dir("css"))))
// when navigating to /home it should serve the home page // when navigating to /home it should serve the home page
http.HandleFunc("/", Home) // http.HandleFunc("/", Home)
http.HandleFunc("/rewards", Upload) http.HandleFunc("/", Rewards)
http.HandleFunc("/rewards", Rewards)
http.ListenAndServe(getPort(), nil) http.ListenAndServe(getPort(), nil)
} }

View File

@ -19,8 +19,8 @@ type line struct {
Reference string Reference string
} }
// Upload needs a comment // Rewards needs a comment
func Upload(w http.ResponseWriter, r *http.Request) { func Rewards(w http.ResponseWriter, r *http.Request) {
type data struct { type data struct {
Title string Title string
Uploaded bool Uploaded bool

View File

@ -19,7 +19,7 @@
<ul> <ul>
{{ if .Title}} {{ if .Title}}
<!-- set current tab active, according to title --> <!-- set current tab active, according to title -->
<li><a {{ if (eq .Title "Home") }}class="active"{{end}} href="/">Home</a></li> <!-- <li><a {{ if (eq .Title "Home") }}class="active"{{end}} href="/">Home</a></li> -->
<!-- <li><a {{ if (eq .Title "Rewards") }}class="active"{{end}} href="rewards">Monthly Rewards</a></li> --> <!-- <li><a {{ if (eq .Title "Rewards") }}class="active"{{end}} href="rewards">Monthly Rewards</a></li> -->
<!-- <li><a {{ if (eq .Title "Graphs") }}class="active"{{end}} href="graphs">Graphs</a></li> --> <!-- <li><a {{ if (eq .Title "Graphs") }}class="active"{{end}} href="graphs">Graphs</a></li> -->
<li><a {{ if (eq .Title "Monthly Rewards") }}class="active"{{end}} href="rewards">Monthly Rewards</a></li> <li><a {{ if (eq .Title "Monthly Rewards") }}class="active"{{end}} href="rewards">Monthly Rewards</a></li>