From a6c8355a509af5b9a0dafa54b80048cc7bf59544 Mon Sep 17 00:00:00 2001
From: Las Zenow It is possible to search for books in an specific language adding lang:code to the search string. See for example some searches:
+Advanced Search
+
There is other topics than lang that can be used: +
+ + +{{template "footer.html"}} diff --git a/trantor.go b/trantor.go index e2b6ed5..04c2d5b 100644 --- a/trantor.go +++ b/trantor.go @@ -9,17 +9,24 @@ import ( "strings" ) -type aboutData struct { +type statusData struct { S Status } func aboutHandler(w http.ResponseWriter, r *http.Request, sess *Session) { - var data aboutData + var data statusData data.S = GetStatus(w, r) data.S.About = true loadTemplate(w, "about", data) } +func helpHandler(w http.ResponseWriter, r *http.Request, sess *Session) { + var data statusData + data.S = GetStatus(w, r) + data.S.Help = true + loadTemplate(w, "help", data) +} + func logoutHandler(w http.ResponseWriter, r *http.Request, sess *Session) { sess.LogOut() sess.Notify("Log out!", "Bye bye "+sess.User, "success") @@ -168,6 +175,7 @@ func setUpRouter() { r.HandleFunc("/edit/{id:[0-9a-fA-F]+}", GatherStats(editHandler)) r.HandleFunc("/save/{id:[0-9a-fA-F]+}", GatherStats(saveHandler)).Methods("POST") r.HandleFunc("/about/", GatherStats(aboutHandler)) + r.HandleFunc("/help/", GatherStats(helpHandler)) r.HandleFunc("/download/{id:[0-9a-fA-F]+}/{epub:.*}", GatherStats(downloadHandler)) r.HandleFunc("/cover/{id:[0-9a-fA-F]+}/{size}/{img:.*}", coverHandler) r.HandleFunc("/settings/", GatherStats(settingsHandler))