diff --git a/lib/template.go b/lib/template.go index a36084b..8b73d3d 100644 --- a/lib/template.go +++ b/lib/template.go @@ -19,6 +19,7 @@ import ( type Status struct { BaseURL string FullURL string + IsOnion bool Title string Search string User string @@ -42,6 +43,7 @@ func GetStatus(h handler) Status { s.BaseURL = "http://" + host } s.FullURL = s.BaseURL + h.r.RequestURI + s.IsOnion = strings.HasSuffix(host, ".onion") s.Title = "Imperial Library of Trantor" s.User = h.sess.User s.Role = h.sess.Role diff --git a/templates/404.html b/templates/404.html index 45c4838..692ac6c 100644 --- a/templates/404.html +++ b/templates/404.html @@ -9,4 +9,4 @@ -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/about.html b/templates/about.html index 0142999..5728de3 100644 --- a/templates/about.html +++ b/templates/about.html @@ -4,10 +4,6 @@

You can upload your books. And one of our librarians will take care to store them on our vast bookshelfs and make it available for the rest of the galaxy.

-

Status

- -

The Imperial Library of Trantor it's in beta-status. We are working to provide a good user experience, but it's still in early development.

-

Any help is welcome. You can write us comments to our email address (zenow@riseup.net), upload your epubs, download our source code hack it and send us patches, ...

Copyright

@@ -35,4 +31,4 @@ uid Las Zenow (Imperial Library of Trantor) <zenow sub 4096R/0x2CCC1C70C3E0C73E 2013-08-16 -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/book.html b/templates/book.html index b5fd8a4..c1b7fca 100644 --- a/templates/book.html +++ b/templates/book.html @@ -111,4 +111,4 @@ function delBook(){ {{end}} -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/dashboard.html b/templates/dashboard.html index adeab78..5882de3 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -34,4 +34,4 @@ {{end}} -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/edit.html b/templates/edit.html index 90c934a..eef6a58 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -87,4 +87,4 @@ $('#tags').tokenfield(); -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/edit_news.html b/templates/edit_news.html index 1f0c5e6..c7ea887 100644 --- a/templates/edit_news.html +++ b/templates/edit_news.html @@ -6,4 +6,4 @@ -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/footer.html b/templates/footer.html index e37dc3a..c2c8fd6 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -1,8 +1,18 @@ diff --git a/templates/help.html b/templates/help.html index 93df750..a541f3b 100644 --- a/templates/help.html +++ b/templates/help.html @@ -45,4 +45,4 @@ $ hummin

You can add ?fmt=json to almost any page on trantor and you'll get a json of the contents of the page. I'll love to hear if you do something cool with it, please tell me by email.

-{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/index.html b/templates/index.html index 2d2f743..51dc5b5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -75,4 +75,4 @@

{{range .Tags}}{{.}} {{end}}

-{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/list.html b/templates/list.html index ce65409..40bbf44 100644 --- a/templates/list.html +++ b/templates/list.html @@ -19,4 +19,4 @@ {{template "book_list.html" .List.Books}} -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/list_edit.html b/templates/list_edit.html index b2027de..77f63a7 100644 --- a/templates/list_edit.html +++ b/templates/list_edit.html @@ -52,4 +52,4 @@ {{end}} -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/login.html b/templates/login.html index 50123a6..3ade8c7 100644 --- a/templates/login.html +++ b/templates/login.html @@ -63,4 +63,4 @@ function checkPasswordMatch() { -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/news.html b/templates/news.html index 74a63db..bb445af 100644 --- a/templates/news.html +++ b/templates/news.html @@ -13,4 +13,4 @@ {{end}} -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/read.html b/templates/read.html index 0175f3a..1be4e8d 100644 --- a/templates/read.html +++ b/templates/read.html @@ -69,4 +69,4 @@ function resizeIframe() { -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/search.html b/templates/search.html index 2487811..69bea21 100644 --- a/templates/search.html +++ b/templates/search.html @@ -42,4 +42,4 @@ {{end}} -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/settings.html b/templates/settings.html index cca8941..e1c92c2 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -49,4 +49,4 @@ function checkPasswordMatch() { -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/submission.html b/templates/submission.html index 2951adf..d3e646c 100644 --- a/templates/submission.html +++ b/templates/submission.html @@ -76,4 +76,4 @@ {{end}} {{end}} -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/submission_moderate.html b/templates/submission_moderate.html index 993dc9f..1efc99d 100644 --- a/templates/submission_moderate.html +++ b/templates/submission_moderate.html @@ -87,4 +87,4 @@ {{end}} -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/submissions.html b/templates/submissions.html index cd1dcb6..ef354e1 100644 --- a/templates/submissions.html +++ b/templates/submissions.html @@ -74,4 +74,4 @@ {{end}} {{end}} -{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/upload.html b/templates/upload.html index e93991c..974f2c3 100644 --- a/templates/upload.html +++ b/templates/upload.html @@ -9,4 +9,4 @@

The uploaded books will be reviewed by the librarians and included if they comply our quality standards.

-{{template "footer.html"}} +{{template "footer.html" .S}} diff --git a/templates/user_admin.html b/templates/user_admin.html index 61c37e7..fed66e0 100644 --- a/templates/user_admin.html +++ b/templates/user_admin.html @@ -59,4 +59,4 @@ -{{template "footer.html"}} +{{template "footer.html" .S}}