diff options
Diffstat (limited to 'themes/default')
-rwxr-xr-x | themes/default/_head.twig | 2 | ||||
-rwxr-xr-x | themes/default/view.twig | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/themes/default/_head.twig b/themes/default/_head.twig index 91a555cb..ce1bbdcc 100755 --- a/themes/default/_head.twig +++ b/themes/default/_head.twig | |||
@@ -30,7 +30,9 @@ | |||
30 | <link rel="stylesheet" href="{{ poche_url }}themes/default/css/messages.css" media="all"> | 30 | <link rel="stylesheet" href="{{ poche_url }}themes/default/css/messages.css" media="all"> |
31 | <link rel="stylesheet" href="{{ poche_url }}themes/default/css/print.css" media="print"> | 31 | <link rel="stylesheet" href="{{ poche_url }}themes/default/css/print.css" media="print"> |
32 | <script src="{{ poche_url }}themes/_global/js/jquery-2.1.3.min.js"></script> | 32 | <script src="{{ poche_url }}themes/_global/js/jquery-2.1.3.min.js"></script> |
33 | <script src="{{ poche_url }}themes/_global/js/jquery.mobile.events.touch.min.js"></script> | ||
33 | <script src="{{ poche_url }}themes/_global/js/autoClose.js"></script> | 34 | <script src="{{ poche_url }}themes/_global/js/autoClose.js"></script> |
34 | <script src="{{ poche_url }}themes/default/js/closeMessage.js"></script> | 35 | <script src="{{ poche_url }}themes/default/js/closeMessage.js"></script> |
35 | <script src="{{ poche_url }}themes/_global/js/saveLink.js"></script> | 36 | <script src="{{ poche_url }}themes/_global/js/saveLink.js"></script> |
37 | <script src="{{ poche_url }}themes/_global/js/keyboard.js"></script> | ||
36 | <script src="{{ poche_url }}themes/_global/js/popupForm.js"></script> | 38 | <script src="{{ poche_url }}themes/_global/js/popupForm.js"></script> |
diff --git a/themes/default/view.twig b/themes/default/view.twig index 0d4ec174..57d25965 100755 --- a/themes/default/view.twig +++ b/themes/default/view.twig | |||
@@ -5,7 +5,7 @@ | |||
5 | {% include '_pocheit-form.twig' %} | 5 | {% include '_pocheit-form.twig' %} |
6 | <div id="article_toolbar"> | 6 | <div id="article_toolbar"> |
7 | <ul> | 7 | <ul> |
8 | {% if navigate.previous %}<li><a href="./?view=view&id={{ navigate.previousid|e }}" class="tool previous"><span>{% trans "Previous Article" %}</span></a></li>{% endif %} | 8 | {% if navigate.next %}<li><a href="./?view=view&id={{ navigate.nextid|e }}" class="tool previous"><span>{% trans "Next Article" %}</span></a></li>{% endif %} |
9 | <li><a href="./" title="{% trans "Return home" %}" class="tool back"><span>{% trans "Return home" %}</span></a></li> | 9 | <li><a href="./" title="{% trans "Return home" %}" class="tool back"><span>{% trans "Return home" %}</span></a></li> |
10 | <li><a href="#top" title="{% trans "Back to top" %}" class="tool top"><span>{% trans "Back to top" %}</span></a></li> | 10 | <li><a href="#top" title="{% trans "Back to top" %}" class="tool top"><span>{% trans "Back to top" %}</span></a></li> |
11 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.url | e | getDomain }}</span></a></li> | 11 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.url | e | getDomain }}</span></a></li> |
@@ -27,7 +27,7 @@ | |||
27 | {% if constant('PDF') == 1 %}<li><a href="./?pdf&method=id&value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %} | 27 | {% if constant('PDF') == 1 %}<li><a href="./?pdf&method=id&value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %} |
28 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display"><span>{% trans "Does this article appear wrong?" %}</span></a></li> | 28 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display"><span>{% trans "Does this article appear wrong?" %}</span></a></li> |
29 | {% if constant('SHOW_READPERCENT') == 1 %}<li><div id="readLeftPercent">0%</div></li>{% endif %} | 29 | {% if constant('SHOW_READPERCENT') == 1 %}<li><div id="readLeftPercent">0%</div></li>{% endif %} |
30 | {% if navigate.next %}<li><a href="./?view=view&id={{ navigate.nextid|e }}" class="tool next"><span>{% trans "Next Article" %}</span></a></li>{% endif %} | 30 | {% if navigate.previous %}<li><a href="./?view=view&id={{ navigate.previousid|e }}" class="tool next"><span>{% trans "Previous Article" %}</span></a></li>{% endif %} |
31 | </ul> | 31 | </ul> |
32 | </div> | 32 | </div> |
33 | <div id="article"> | 33 | <div id="article"> |
@@ -125,5 +125,17 @@ | |||
125 | $('#article_toolbar .tool.top').parent().hide(); | 125 | $('#article_toolbar .tool.top').parent().hide(); |
126 | } | 126 | } |
127 | }); | 127 | }); |
128 | |||
129 | // Use left and right arrow to navigate on with keyboard | ||
130 | navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}'); | ||
131 | |||
132 | // swipe to right or left on mobile to navigate | ||
133 | $('article').on("swiperight", function(){ | ||
134 | goLeft('?view=view&id={{ navigate.nextid|e }}'); | ||
135 | }); | ||
136 | $('article').on("swipeleft", function(){ | ||
137 | goRight('?view=view&id={{ navigate.previousid|e }}'); | ||
138 | }); | ||
139 | |||
128 | </script> | 140 | </script> |
129 | {% endblock %} | 141 | {% endblock %} |