aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorctucx <leah@antifa.jetzt>2020-06-17 01:32:13 +0200
committerctucx <leah@antifa.jetzt>2020-06-17 01:32:13 +0200
commit82ff34e40b7c393dd59f281e937ad835995a5ad8 (patch)
treef768cf969b781c3f1c9282e0f98f25ba22831880
parenta4f17414c016977282398d0b358f4e7901ea98dc (diff)
downloadgallery-82ff34e40b7c393dd59f281e937ad835995a5ad8.tar.gz
gallery-82ff34e40b7c393dd59f281e937ad835995a5ad8.tar.bz2
gallery-82ff34e40b7c393dd59f281e937ad835995a5ad8.zip
foo
-rw-r--r--src/assets/picture.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/assets/picture.html b/src/assets/picture.html
index e8b1bc9..53d77f8 100644
--- a/src/assets/picture.html
+++ b/src/assets/picture.html
@@ -164,8 +164,23 @@
window.onload=getExif;
window.onkeyup = function(e) {
if (e.keyCode == 27) window.location = "./";
+
+ {{#hasNext}}
if (e.keyCode == 39) window.location = "./{{next_name}}.html";
+ {{/hasNext}}
+
+ {{^hasNext}}
+ if (e.keyCode == 39) window.location = "./index.html";
+ {{/hasNext}}
+
+ {{#hasPrev}}
if (e.keyCode == 37) window.location = "./{{prev_name}}.html";
+ {{/hasPrev}}
+
+ {{^hasPrev}}
+ if (e.keyCode == 37) window.location = "./index.html";
+ {{/hasPrev}}
+
if (e.keyCode == 32) document.getElementById("toggle").checked = true;
}