theme: rework header UX

This commit is contained in:
Sören Weber 2022-02-18 00:09:06 +01:00
parent ff06a8ad41
commit 6f35177349
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
6 changed files with 73 additions and 112 deletions
static/js

View file

@ -375,10 +375,10 @@ jQuery(function() {
// allow keyboard control for prev/next links
jQuery(function() {
jQuery('.nav-prev').click(function(){
jQuery('a.nav-prev').click(function(){
location.href = jQuery(this).attr('href');
});
jQuery('.nav-next').click(function() {
jQuery('a.nav-next').click(function() {
location.href = jQuery(this).attr('href');
});
});
@ -393,12 +393,12 @@ jQuery(function() {
jQuery(document).keydown(function(e) {
// prev links - left arrow key
if(e.which == '37') {
jQuery('.nav.nav-prev').click();
jQuery('a.nav-prev').click();
}
// next links - right arrow key
if(e.which == '39') {
jQuery('.nav.nav-next').click();
jQuery('a.nav-next').click();
}
});