diff --git a/img/torrents/12.png b/img/torrents/12.png index 81bfb409..d5f41bd4 100644 Binary files a/img/torrents/12.png and b/img/torrents/12.png differ diff --git a/img/torrents/13.png b/img/torrents/13.png new file mode 100644 index 00000000..81bfb409 Binary files /dev/null and b/img/torrents/13.png differ diff --git a/main.go b/main.go index c15dcbfa..9d69cc98 100644 --- a/main.go +++ b/main.go @@ -103,6 +103,7 @@ func apiViewHandler(w http.ResponseWriter, r *http.Request) { func searchHandler(w http.ResponseWriter, r *http.Request) { var templates = template.Must(template.New("home").Funcs(funcMap).ParseFiles("templates/index.html", "templates/home.html")) + templates.ParseGlob("templates/_*.html") // common vars := mux.Vars(r) page := vars["page"] @@ -184,6 +185,7 @@ func safe(s string) template.URL { func faqHandler(w http.ResponseWriter, r *http.Request) { var templates = template.Must(template.New("FAQ").Funcs(funcMap).ParseFiles("templates/index.html", "templates/FAQ.html")) + templates.ParseGlob("templates/_*.html") // common err := templates.ExecuteTemplate(w, "index.html", FaqTemplateVariables{Navigation{}, NewSearchForm(), r.URL, mux.CurrentRoute(r)}) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) @@ -238,6 +240,7 @@ func rssHandler(w http.ResponseWriter, r *http.Request) { } func viewHandler(w http.ResponseWriter, r *http.Request) { var templates = template.Must(template.ParseFiles("templates/index.html", "templates/view.html")) + templates.ParseGlob("templates/_*.html") // common vars := mux.Vars(r) id := vars["id"] @@ -254,6 +257,7 @@ func viewHandler(w http.ResponseWriter, r *http.Request) { func rootHandler(w http.ResponseWriter, r *http.Request) { var templates = template.Must(template.New("home").Funcs(funcMap).ParseFiles("templates/index.html", "templates/home.html")) + templates.ParseGlob("templates/_*.html") // common vars := mux.Vars(r) page := vars["page"] diff --git a/templates/_search.html b/templates/_search.html new file mode 100644 index 00000000..dc29e66e --- /dev/null +++ b/templates/_search.html @@ -0,0 +1,72 @@ +{{define "search_common"}} + + +{{end}} +{{define "search_advanced"}} + + + +{{end}} + +{{define "search_button"}} +
+ + + + +
+{{end}} diff --git a/templates/index.html b/templates/index.html index 16ec2113..89deb750 100644 --- a/templates/index.html +++ b/templates/index.html @@ -42,45 +42,8 @@ @@ -90,70 +53,14 @@

Advanced Search

- -
+ +
{{block "content" .}}Nothing Here.{{end}}