diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-03 13:21:11 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-03 13:21:11 +0200 |
commit | c766284d522206578e7ec154961e0fce456f70c8 (patch) | |
tree | a5246151bf8278a0e8053b9dd1ce9d770073c50b /themes/baggy/view.twig | |
parent | c0cb52c07439c974075c302a190a034a8cce4f92 (diff) | |
parent | e968ec6c2244aee600358b3c87648b2409c97945 (diff) | |
download | wallabag-c766284d522206578e7ec154961e0fce456f70c8.tar.gz wallabag-c766284d522206578e7ec154961e0fce456f70c8.tar.zst wallabag-c766284d522206578e7ec154961e0fce456f70c8.zip |
Merge pull request #1267 from wallabag/dev1.9.1
1.9.1
Diffstat (limited to 'themes/baggy/view.twig')
-rwxr-xr-x | themes/baggy/view.twig | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index 7320057f..9ee64fc0 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig | |||
@@ -5,16 +5,19 @@ | |||
5 | {% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %} | 5 | {% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %} |
6 | {% block content %} | 6 | {% block content %} |
7 | {% include '_highlight.twig' %} | 7 | {% include '_highlight.twig' %} |
8 | {% block toolbar %} | ||
8 | <div id="article_toolbar"> | 9 | <div id="article_toolbar"> |
9 | <ul class="links"> | 10 | <ul class="links"> |
10 | <li class="topPosF"><a href="#top" title="{% trans "Back to top" %}" class="tool top icon icon-arrow-up-thick"><span>{% trans "Back to top" %}</span></a></li> | 11 | <li class="topPosF"><a href="#top" title="{% trans "Back to top" %}" class="tool top icon icon-arrow-up-thick"><span>{% trans "Back to top" %}</span></a></li> |
12 | {% if navigate.next %}<li class="leftPosF"><a href="./?view=view&id={{ navigate.nextid|e }}" class="top tool icon icon-previous"><span>{% trans "Next Article" %}</span></a></li>{% endif %} | ||
11 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | getDomain }}</span></a></li> | 13 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | getDomain }}</span></a></li> |
12 | <li><a title="{% trans "Mark as read" %}" class="tool icon icon-check {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="javascript: void(null);" id="markAsRead"><span>{% trans "Toggle mark as read" %}</span></a></li> | 14 | <li><a title="{% trans "Mark as read" %}" class="tool icon icon-check {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="javascript: void(null);" id="markAsRead"><span>{% trans "Toggle mark as read" %}</span></a></li> |
15 | {% if navigate.previous %}<li><a title="{% trans "Mark as read and go to next article" %}" class="tool icon icon-archiveandnext" href="./?action=archive_and_next&id={{ entry.id|e }}" id="markAsReadAndNext"><span>{% trans "Toggle mark as read and go to next article" %}</span></a></li>{% endif %} | ||
13 | <li><a title="{% trans "Favorite" %}" class="tool icon icon-star {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="javascript: void(null);" id="setFav"><span>{% trans "Toggle favorite" %}</span></a></li> | 16 | <li><a title="{% trans "Favorite" %}" class="tool icon icon-star {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="javascript: void(null);" id="setFav"><span>{% trans "Toggle favorite" %}</span></a></li> |
14 | <li><a title="{% trans "Delete" %}" class="tool delete icon icon-trash" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> | 17 | <li><a title="{% trans "Delete" %}" class="tool delete icon icon-trash" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> |
15 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %} | 18 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %} |
16 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title }}&body={{ content|striptags|slice(0, 700) }}%2E%2E%2E%0A%0A{% trans "Read the rest at" %} {{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} | 19 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title }}&body={{ content|striptags|slice(0, 700) }}%2E%2E%2E%0A%0A{% trans "Read the rest at" %} {{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} |
17 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} | 20 | {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli icon-image icon-image--shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} |
18 | {% if constant('SHARE_EVERNOTE') == 1 %}<li><a href="https://www.evernote.com/clip.action?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool evernote icon icon-evernote" title="{% trans "evernote" %}"><span>{% trans "evernote" %}</span></a></li>{% endif %} | 21 | {% if constant('SHARE_EVERNOTE') == 1 %}<li><a href="https://www.evernote.com/clip.action?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool evernote icon icon-evernote" title="{% trans "evernote" %}"><span>{% trans "evernote" %}</span></a></li>{% endif %} |
19 | {% if constant('SHARE_DIASPORA') == 1 %}<li><a href="{{ constant('DIASPORA_URL') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}¬es=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="{% trans "diaspora" %}"><span>{% trans "diaspora" %}</span></a></li>{% endif %} | 22 | {% if constant('SHARE_DIASPORA') == 1 %}<li><a href="{{ constant('DIASPORA_URL') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}¬es=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="{% trans "diaspora" %}"><span>{% trans "diaspora" %}</span></a></li>{% endif %} |
20 | {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numFlattrs }})</a></li>{% endif %}{% endif %} | 23 | {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numFlattrs }})</a></li>{% endif %}{% endif %} |
@@ -25,8 +28,11 @@ | |||
25 | {% if constant('MOBI') == 1 %}<li><a href="./?mobi&method=id&value={{ entry.id|e }}" title="Generate Mobi file">MOBI</a></li>{% endif %} | 28 | {% if constant('MOBI') == 1 %}<li><a href="./?mobi&method=id&value={{ entry.id|e }}" title="Generate Mobi file">MOBI</a></li>{% endif %} |
26 | {% if constant('PDF') == 1 %}<li><a href="./?pdf&method=id&value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %} | 29 | {% if constant('PDF') == 1 %}<li><a href="./?pdf&method=id&value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %} |
27 | <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 icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li> | 30 | <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 icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li> |
31 | {% if navigate.previous %}<li class="rightPosF"><a href="./?view=view&id={{ navigate.previousid|e }}" class="tool icon icon-next"><span>{% trans "Previous Article" %}</span></a></li>{% endif %} | ||
28 | </ul> | 32 | </ul> |
29 | </div> | 33 | </div> |
34 | {% endblock %} | ||
35 | |||
30 | <div id="article"> | 36 | <div id="article"> |
31 | <header class="mbm"> | 37 | <header class="mbm"> |
32 | <h1>{{ entry.title|raw }}</h1> | 38 | <h1>{{ entry.title|raw }}</h1> |
@@ -38,6 +44,7 @@ | |||
38 | {{ content | raw }} | 44 | {{ content | raw }} |
39 | </article> | 45 | </article> |
40 | </div> | 46 | </div> |
47 | {{ block('toolbar') }} | ||
41 | <script src="{{ poche_url }}themes/_global/js/restoreScroll.js"></script> | 48 | <script src="{{ poche_url }}themes/_global/js/restoreScroll.js"></script> |
42 | <script type="text/javascript"> | 49 | <script type="text/javascript"> |
43 | $(document).ready(function() { | 50 | $(document).ready(function() { |
@@ -100,5 +107,20 @@ | |||
100 | retrievePercent({{ entry.id|e }}); | 107 | retrievePercent({{ entry.id|e }}); |
101 | }); | 108 | }); |
102 | }); | 109 | }); |
110 | |||
111 | // Use left and right arrow to navigate on with keyboard | ||
112 | navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}'); | ||
113 | |||
114 | // use keyboard to do actions | ||
115 | actionArticle('{{ entry.id|e }}'); | ||
116 | |||
117 | // swipe to right or left on mobile to navigate | ||
118 | $('article').on("swiperight", function(){ | ||
119 | goLeft('?view=view&id={{ navigate.nextid|e }}'); | ||
120 | }); | ||
121 | $('article').on("swipeleft", function(){ | ||
122 | goRight('?view=view&id={{ navigate.previousid|e }}'); | ||
123 | }); | ||
124 | |||
103 | </script> | 125 | </script> |
104 | {% endblock %} | 126 | {% endblock %} |