aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/baggy/view.twig
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-03-07 23:59:27 +0100
committerThomas Citharel <tcit@tcit.fr>2015-03-07 23:59:27 +0100
commitc34a8956e1cd07498457f3211898e8de6d794de3 (patch)
treeb53b0e16f39657af447294bb4b96a2d4f4cc22b1 /themes/baggy/view.twig
parent00dc7622fbb25458f82b8d81dffae6f843dadece (diff)
downloadwallabag-c34a8956e1cd07498457f3211898e8de6d794de3.tar.gz
wallabag-c34a8956e1cd07498457f3211898e8de6d794de3.tar.zst
wallabag-c34a8956e1cd07498457f3211898e8de6d794de3.zip
implement swipe gestures on mobile to go to next and previous articles
Diffstat (limited to 'themes/baggy/view.twig')
-rwxr-xr-xthemes/baggy/view.twig11
1 files changed, 11 insertions, 0 deletions
diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig
index 68af03f5..a6da85d5 100755
--- a/themes/baggy/view.twig
+++ b/themes/baggy/view.twig
@@ -103,6 +103,17 @@
103 retrievePercent({{ entry.id|e }}); 103 retrievePercent({{ entry.id|e }});
104 }); 104 });
105 }); 105 });
106
107 // Use left and right arrow to navigate on with keyboard
106 navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}'); 108 navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}');
109
110 // swipe to right or left on mobile to navigate
111 $('article').on("swiperight", function(){
112 goLeft('?view=view&id={{ navigate.nextid|e }}');
113 });
114 $('article').on("swipeleft", function(){
115 goRight('?view=view&id={{ navigate.previousid|e }}');
116 });
117
107 </script> 118 </script>
108{% endblock %} 119{% endblock %}