Add a mirror notice in the footer
This commit is contained in:
parent
383214ee19
commit
6684e1b96a
22 changed files with 34 additions and 26 deletions
|
@ -19,6 +19,7 @@ import (
|
||||||
type Status struct {
|
type Status struct {
|
||||||
BaseURL string
|
BaseURL string
|
||||||
FullURL string
|
FullURL string
|
||||||
|
IsOnion bool
|
||||||
Title string
|
Title string
|
||||||
Search string
|
Search string
|
||||||
User string
|
User string
|
||||||
|
@ -42,6 +43,7 @@ func GetStatus(h handler) Status {
|
||||||
s.BaseURL = "http://" + host
|
s.BaseURL = "http://" + host
|
||||||
}
|
}
|
||||||
s.FullURL = s.BaseURL + h.r.RequestURI
|
s.FullURL = s.BaseURL + h.r.RequestURI
|
||||||
|
s.IsOnion = strings.HasSuffix(host, ".onion")
|
||||||
s.Title = "Imperial Library of Trantor"
|
s.Title = "Imperial Library of Trantor"
|
||||||
s.User = h.sess.User
|
s.User = h.sess.User
|
||||||
s.Role = h.sess.Role
|
s.Role = h.sess.Role
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
|
|
||||||
<p>You can <a href="/upload/">upload</a> 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.</p>
|
<p>You can <a href="/upload/">upload</a> 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.</p>
|
||||||
|
|
||||||
<h4>Status</h4>
|
|
||||||
|
|
||||||
<p>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.</p>
|
|
||||||
|
|
||||||
<p><b>Any help is welcome</b>. You can write us comments to our email address (zenow@riseup.net), upload your epubs, download our <a href="https://gitlab.com/trantor">source code</a> hack it and send us patches, ...</p>
|
<p><b>Any help is welcome</b>. You can write us comments to our email address (zenow@riseup.net), upload your epubs, download our <a href="https://gitlab.com/trantor">source code</a> hack it and send us patches, ...</p>
|
||||||
|
|
||||||
<h4>Copyright</h4>
|
<h4>Copyright</h4>
|
||||||
|
@ -35,4 +31,4 @@ uid Las Zenow (Imperial Library of Trantor) <zenow
|
||||||
sub 4096R/0x2CCC1C70C3E0C73E 2013-08-16
|
sub 4096R/0x2CCC1C70C3E0C73E 2013-08-16
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -111,4 +111,4 @@ function delBook(){
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -34,4 +34,4 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -87,4 +87,4 @@
|
||||||
$('#tags').tokenfield();
|
$('#tags').tokenfield();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
<button type="submit" class="btn">Add</button>
|
<button type="submit" class="btn">Add</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
</div> <!-- container open in index.html -->
|
</div> <!-- container open in index.html -->
|
||||||
<footer class="container footer">
|
<footer class="container footer">
|
||||||
<hr />
|
<hr />
|
||||||
<p><small>Chief Librarian: Las Zenow <zenow@riseup.net><br />
|
<div class="row">
|
||||||
Fork the source code from <a href="https://gitlab.com/trantor">gitlab</a></small>.</p>
|
<div class="span6">
|
||||||
|
<p><small>Chief Librarian: Las Zenow <zenow@riseup.net><br />
|
||||||
|
Fork the source code from <a href="https://gitlab.com/trantor">gitlab</a></small>.</p>
|
||||||
|
</div>
|
||||||
|
{{if not .IsOnion}}
|
||||||
|
<div class="span6">
|
||||||
|
<p class="pull-right"><small>This is a mirror of the tor onion service:<br />
|
||||||
|
<a href="http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion/">http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion</a></small></p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
|
|
|
@ -45,4 +45,4 @@ $ hummin
|
||||||
|
|
||||||
<p>You can add <code>?fmt=json</code> 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.</p>
|
<p>You can add <code>?fmt=json</code> 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.</p>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -75,4 +75,4 @@
|
||||||
<p class="centered">{{range .Tags}}<a class="label" href="/search/?q=tag:{{.}}">{{.}}</a> {{end}}</p>
|
<p class="centered">{{range .Tags}}<a class="label" href="/search/?q=tag:{{.}}">{{.}}</a> {{end}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -19,4 +19,4 @@
|
||||||
|
|
||||||
{{template "book_list.html" .List.Books}}
|
{{template "book_list.html" .List.Books}}
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -52,4 +52,4 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -63,4 +63,4 @@ function checkPasswordMatch() {
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -13,4 +13,4 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -69,4 +69,4 @@ function resizeIframe() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -42,4 +42,4 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -49,4 +49,4 @@ function checkPasswordMatch() {
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -76,4 +76,4 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -87,4 +87,4 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -74,4 +74,4 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
|
|
||||||
<p>The uploaded books will be reviewed by the librarians and included if they comply our quality standards.</p>
|
<p>The uploaded books will be reviewed by the librarians and included if they comply our quality standards.</p>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
|
@ -59,4 +59,4 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{{template "footer.html"}}
|
{{template "footer.html" .S}}
|
||||||
|
|
Reference in a new issue