style the home page, get rid of nojs pages
instead of having dedicated nojs pages, i will instead just use javascript to enhance the already existing pages
This commit is contained in:
@@ -27,12 +27,16 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
pages, err := template.ParseFiles("templates/home.html", "templates/nojs/home.html")
|
||||
pages, err := template.ParseFiles("templates/home.html")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
mux := http.NewServeMux()
|
||||
fs := http.FileServer(http.Dir("static"))
|
||||
mux.Handle("GET /css/", fs)
|
||||
mux.Handle("GET /js/", fs)
|
||||
mux.Handle("GET /static/", http.StripPrefix("/static/", fs))
|
||||
mux.HandleFunc("GET /{$}", func(w http.ResponseWriter, r *http.Request) {
|
||||
data := HomePageData{
|
||||
Expiries: config.Expiries,
|
||||
|
||||
Reference in New Issue
Block a user