mirror of
https://github.com/vale981/practical-cl-beautified
synced 2025-03-04 09:11:37 -05:00
fix nav
This commit is contained in:
parent
76ca2e68fa
commit
3fdbf78fcf
2 changed files with 8 additions and 8 deletions
|
@ -8,9 +8,9 @@ the [[http://www.gigamonkeys.com/book/][online version]] of Practical Common Lis
|
||||||
- syntax highlighting
|
- syntax highlighting
|
||||||
- table of contents
|
- table of contents
|
||||||
- quick-nav:
|
- quick-nav:
|
||||||
- =right-arrow-key= - next chapter
|
- =n= - next chapter
|
||||||
- =left-arrow-key= - previous chapter
|
- =p= - previous chapter
|
||||||
- =HOME/POS1= - index page
|
- =h= - index page
|
||||||
- footnote popvers
|
- footnote popvers
|
||||||
|
|
||||||
** TODO
|
** TODO
|
||||||
|
@ -20,3 +20,4 @@ the [[http://www.gigamonkeys.com/book/][online version]] of Practical Common Lis
|
||||||
** Credits
|
** Credits
|
||||||
- syntax highlighting: [[https://github.com/orthecreedence/highlight-lisp][highlight-lisp]]
|
- syntax highlighting: [[https://github.com/orthecreedence/highlight-lisp][highlight-lisp]]
|
||||||
- Table of Contents: [[https://tscanlin.github.io/tocbot/][Tocbot]]
|
- Table of Contents: [[https://tscanlin.github.io/tocbot/][Tocbot]]
|
||||||
|
- Tooltips: [[https://github.com/atomiks/tippyjs][Tippy]]
|
||||||
|
|
|
@ -87,14 +87,14 @@ function gotoNext() {
|
||||||
// set up the navigation shortcuts
|
// set up the navigation shortcuts
|
||||||
function setUpNav() {
|
function setUpNav() {
|
||||||
document.addEventListener('keypress', (event) => {
|
document.addEventListener('keypress', (event) => {
|
||||||
switch(event.keyCode) {
|
switch(event.key) {
|
||||||
case 37:
|
case 'p':
|
||||||
goToPrevious();
|
goToPrevious();
|
||||||
break;
|
break;
|
||||||
case 39:
|
case 'n':
|
||||||
gotoNext();
|
gotoNext();
|
||||||
break;
|
break;
|
||||||
case 36:
|
case 'h':
|
||||||
document.location.href = 'index.html';
|
document.location.href = 'index.html';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,6 @@ function linkFootnotes() {
|
||||||
|
|
||||||
// Let's apply that stuff.
|
// Let's apply that stuff.
|
||||||
loadChapters().then(newChapters => {
|
loadChapters().then(newChapters => {
|
||||||
console.log(newChapters);
|
|
||||||
chapters = newChapters;
|
chapters = newChapters;
|
||||||
setUpNumbering();
|
setUpNumbering();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue