From 059a3380341c439e1debb4921bbf023a3b424a4b Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 2 Mar 2015 00:15:49 +0100 Subject: implement #1123 --- themes/baggy/view.twig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'themes/baggy/view.twig') diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index 7320057f..ae02ce48 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig @@ -8,8 +8,10 @@
-- cgit v1.2.3 From 00dc7622fbb25458f82b8d81dffae6f843dadece Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 7 Mar 2015 22:52:03 +0100 Subject: change system for #1123 and keyboard arrows shortcuts --- themes/baggy/view.twig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'themes/baggy/view.twig') diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index ae02ce48..68af03f5 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig @@ -8,7 +8,7 @@
@@ -103,5 +103,6 @@ retrievePercent({{ entry.id|e }}); }); }); + navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}'); {% endblock %} -- cgit v1.2.3 From c34a8956e1cd07498457f3211898e8de6d794de3 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 7 Mar 2015 23:59:27 +0100 Subject: implement swipe gestures on mobile to go to next and previous articles --- themes/baggy/view.twig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'themes/baggy/view.twig') 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 @@ retrievePercent({{ entry.id|e }}); }); }); + + // Use left and right arrow to navigate on with keyboard navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}'); + + // swipe to right or left on mobile to navigate + $('article').on("swiperight", function(){ + goLeft('?view=view&id={{ navigate.nextid|e }}'); + }); + $('article').on("swipeleft", function(){ + goRight('?view=view&id={{ navigate.previousid|e }}'); + }); + {% endblock %} -- cgit v1.2.3 From e139258bb1039175827c8debce6101ff0c9a5b86 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 8 Mar 2015 00:15:10 +0100 Subject: added toolbar at the bottom too, let's give it a try --- themes/baggy/view.twig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'themes/baggy/view.twig') diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index a6da85d5..12024cdc 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig @@ -5,6 +5,7 @@ {% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %} {% block content %} {% include '_highlight.twig' %} + {% block toolbar %}
+ {% endblock %} +

{{ entry.title|raw }}

@@ -41,6 +44,7 @@ {{ content | raw }}
+ {{ block('toolbar') }}