diff --git a/changelog.html b/changelog.html index ecb1d43..dff02d8 100644 --- a/changelog.html +++ b/changelog.html @@ -6,19 +6,18 @@ -
- README.md - CHANGELOG.md - contact.html - docs.html - github.link - ranger.tar.gz - screenshot.png - wiki.html   + README.md + CHANGELOG.md + contact.html + docs.html + github.link + ranger.tar.gz + screenshot.png + wiki.html  
@@ -511,6 +510,15 @@

2010-06-09: Version 1.1.0

+ + +
diff --git a/contact.html b/contact.html index bb2e7e0..59e07cc 100644 --- a/contact.html +++ b/contact.html @@ -6,19 +6,18 @@ -
- README.md - CHANGELOG.md - contact.html - docs.html - github.link - ranger.tar.gz - screenshot.png - wiki.html   + README.md + CHANGELOG.md + contact.html + docs.html + github.link + ranger.tar.gz + screenshot.png + wiki.html  
@@ -65,6 +64,15 @@

Donations

  • Akin Fernandez: "Ranger is the file manager we have been waiting for. It perfects an i3 setup." (2016-06-06)
  • + + +
    diff --git a/documentation.html b/documentation.html index 8303065..4d72c69 100644 --- a/documentation.html +++ b/documentation.html @@ -6,19 +6,18 @@ -
    - README.md - CHANGELOG.md - contact.html - docs.html - github.link - ranger.tar.gz - screenshot.png - wiki.html   + README.md + CHANGELOG.md + contact.html + docs.html + github.link + ranger.tar.gz + screenshot.png + wiki.html  
    @@ -88,6 +87,15 @@

    Dependencies

    + + +
    diff --git a/download.html b/download.html index 028d107..44edb71 100644 --- a/download.html +++ b/download.html @@ -6,19 +6,18 @@ -
    - README.md - CHANGELOG.md - contact.html - docs.html - github.link - ranger.tar.gz - screenshot.png - wiki.html   + README.md + CHANGELOG.md + contact.html + docs.html + github.link + ranger.tar.gz + screenshot.png + wiki.html  
    @@ -127,6 +126,15 @@

    Package Managers

    + + +
    diff --git a/index.html b/index.html index cffd87c..f7a46ea 100644 --- a/index.html +++ b/index.html @@ -6,19 +6,18 @@ -
    - README.md - CHANGELOG.md - contact.html - docs.html - github.link - ranger.tar.gz - screenshot.png - wiki.html   + README.md + CHANGELOG.md + contact.html + docs.html + github.link + ranger.tar.gz + screenshot.png + wiki.html  
    @@ -116,6 +115,15 @@

    Relocated website

    + + + diff --git a/keyboard.js b/keyboard.js new file mode 100644 index 0000000..e2a8b4c --- /dev/null +++ b/keyboard.js @@ -0,0 +1,47 @@ +var navclass = "kbnav"; + +function kbNav(key) { + + // convert HTMLCollection to array for indexing + var navlinks = [].slice.call(document.getElementsByClassName(navclass)); + var navindex = -1; // initialize counter before the first post + + var currentfocus = document.activeElement; // get current index of focused post + + // get current post index + if ( currentfocus.className.includes(navclass) ) { + navindex = navlinks.indexOf(currentfocus); + } + + // increment post index + if ( key === 'j' && navindex < navlinks.length - 1 ) { + navindex++; + } else if (key === 'k' && navindex > 0 ) { + navindex--; + } else if (key === 'g') { + navindex = 0; + } else if (key === 'G') { + navindex = navlinks.length - 1; + } + + // move focus + navlinks[navindex].focus(); +} + +function kbLaunch() { + var currentfocus = document.activeElement; // get current index of focused post + // open focused link + if ( currentfocus.className.includes(navclass) ) { + window.location.href = currentfocus; + } + +} + +Mousetrap.bind({ + 'j': function() { kbNav('j'); }, + 'k': function() { kbNav('k'); }, + 'g g': function() { kbNav('g'); }, + 'G': function() { kbNav('G'); }, + 'l': function() { kbLaunch(); }, + 'g h': function() { window.location.href = "index.html"; } +}) diff --git a/screenshots.html b/screenshots.html index fab73ba..c3faaa4 100644 --- a/screenshots.html +++ b/screenshots.html @@ -6,19 +6,18 @@ -
    - README.md - CHANGELOG.md - contact.html - docs.html - github.link - ranger.tar.gz - screenshot.png - wiki.html   + README.md + CHANGELOG.md + contact.html + docs.html + github.link + ranger.tar.gz + screenshot.png + wiki.html  
    @@ -44,6 +43,15 @@

    Screenshots

    + + +
    diff --git a/style.css b/style.css index 64bf8b9..bc16efc 100644 --- a/style.css +++ b/style.css @@ -57,35 +57,35 @@ code { .filetype_image { color: #ffbb00; } -.filetype_image:hover { +.filetype_image:hover, .filetype_image:focus { color: black; background-color: #ffbb00; } .filetype_text { color: white; } -.filetype_text:hover { +.filetype_text:hover, .filetype_text:focus { color: black; background-color: white; } .filetype_directory { color: #66f; } -.filetype_directory:hover { +.filetype_directory:hover, .filetype_directory:focus { color: black; background-color: #66f; } .filetype_link { color: #0CC; } -.filetype_link:hover { +.filetype_link:hover, .filetype_link:focus { color: black; background-color: #0CC; } .filetype_targz { color: #c44; } -.filetype_targz:hover { +.filetype_targz:hover, .filetype_targz:focus { color: black; background-color: #c44; }