mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-22 12:01:15 -04:00
Add a "Home" in the bottom bar, to start a new search
Fix the "top" button in the bottom bar : on a device, it did not work because it was too close to the scrollbar and triggered a "page down" Fixes #36
This commit is contained in:
parent
5cd5a80551
commit
2c2f45b2be
12
index.html
12
index.html
@ -130,9 +130,15 @@
|
||||
</article>
|
||||
<footer>
|
||||
<div id="navigationButtons" class="btn-toolbar">
|
||||
<a class="btn btn-large" id="btnBack" title="Back"><span class="glyphicon glyphicon-circle-arrow-left"></span></a>
|
||||
<a class="btn btn-large" id="btnForward" title="Forward"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
|
||||
<a class="btn btn-large pull-right" id="btnTop" title="Top" href="#top"><span class="glyphicon glyphicon-arrow-up"></span></a>
|
||||
<!-- We need to restrict the size of this navbar,
|
||||
to avoid the top button to be in the scrollbar area :
|
||||
on a device, it can trigger a "page down" of the scrollbar -->
|
||||
<div style="max-width: 80%; margin-left: auto; margin-right: auto;">
|
||||
<a class="btn btn-large pull-left" id="btnHomeBottom" title="Home"><span class="glyphicon glyphicon-home"></span></a>
|
||||
<a class="btn btn-large" id="btnBack" title="Back"><span class="glyphicon glyphicon-circle-arrow-left"></span></a>
|
||||
<a class="btn btn-large" id="btnForward" title="Forward"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
|
||||
<a class="btn btn-large pull-right" id="btnTop" title="Top" href="#top"><span class="glyphicon glyphicon-arrow-up"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</section>
|
||||
|
@ -25,6 +25,7 @@ define(function(require) {
|
||||
$('#prefix').on('keyup', function(e) {
|
||||
onKeyUpPrefix(e);
|
||||
});
|
||||
// Bottome bar :
|
||||
$('#btnBack').on('click', function(e) {
|
||||
history.back();
|
||||
return false;
|
||||
@ -33,7 +34,11 @@ define(function(require) {
|
||||
history.forward();
|
||||
return false;
|
||||
});
|
||||
// Navigation bar :
|
||||
$('#btnHomeBottom').on('click', function(e) {
|
||||
$('#btnHome').click();
|
||||
return false;
|
||||
});
|
||||
// Top menu :
|
||||
$('#btnHome').on('click', function(e) {
|
||||
// Highlight the selected section in the navbar
|
||||
$('#liHomeNav').attr("class","active");
|
||||
|
Loading…
x
Reference in New Issue
Block a user