diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-10-03 14:10:44 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-10-03 14:10:44 +0200 |
commit | 4cc3c2ac1735196e4e6a18d1a1124cd0d9a0ed5c (patch) | |
tree | 3c2f2885be96c7163444a7d366767a4ac2ca87f7 /themes/default/view.twig | |
parent | 66e074b43dd4efc9f63c8fee784b99bcce51ab93 (diff) | |
download | wallabag-4cc3c2ac1735196e4e6a18d1a1124cd0d9a0ed5c.tar.gz wallabag-4cc3c2ac1735196e4e6a18d1a1124cd0d9a0ed5c.tar.zst wallabag-4cc3c2ac1735196e4e6a18d1a1124cd0d9a0ed5c.zip |
embed themes
Diffstat (limited to 'themes/default/view.twig')
-rw-r--r-- | themes/default/view.twig | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/themes/default/view.twig b/themes/default/view.twig new file mode 100644 index 00000000..1e54ae38 --- /dev/null +++ b/themes/default/view.twig | |||
@@ -0,0 +1,51 @@ | |||
1 | {% extends "layout.twig" %} | ||
2 | {% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %} | ||
3 | {% block content %} | ||
4 | <div id="article_toolbar"> | ||
5 | <ul> | ||
6 | <li><a href="./" title="{% trans "back to home" %}" class="tool back"><span>{% trans "back to home" %}</span></a></li> | ||
7 | <li><a href="#top" title="{% trans "back to top" %}" class="tool top"><span>{% trans "back to top" %}</span></a></li> | ||
8 | <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> | ||
9 | <li><a title="{% trans "toggle mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&id={{ entry.id|e }}"><span>{% trans "toggle mark as read" %}</span></a></li> | ||
10 | <li><a title="{% trans "toggle favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "toggle favorite" %}</span></a></li> | ||
11 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> | ||
12 | {% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %} | ||
13 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %} | ||
14 | {% 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 %} | ||
15 | {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool 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" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span>{{ flattr.numflattrs }}</a></li>{% endif %}{% endif %} | ||
16 | <li><a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&body={{ entry.url|url_encode }}" title="{% trans "this article appears wrong?" %}" class="tool bad-display"><span>{% trans "this article appears wrong?" %}</span></a></li> | ||
17 | </ul> | ||
18 | </div> | ||
19 | <div id="article"> | ||
20 | <header class="mbm"> | ||
21 | <h1>{{ entry.title|raw }}</h1> | ||
22 | </header> | ||
23 | <article> | ||
24 | {{ content | raw }} | ||
25 | </article> | ||
26 | </div> | ||
27 | <script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/restoreScroll.js"></script> | ||
28 | <script type="text/javascript"> | ||
29 | $(document).ready(function() { | ||
30 | |||
31 | $(window).scroll(function(e){ | ||
32 | var scrollTop = $(window).scrollTop(); | ||
33 | var docHeight = $(document).height(); | ||
34 | var scrollPercent = (scrollTop) / (docHeight); | ||
35 | var scrollPercentRounded = Math.round(scrollPercent*100)/100; | ||
36 | savePercent({{ entry.id|e }}, scrollPercentRounded); | ||
37 | }); | ||
38 | |||
39 | retrievePercent({{ entry.id|e }}); | ||
40 | |||
41 | $(window).resize(function(){ | ||
42 | retrievePercent({{ entry.id|e }}); | ||
43 | }); | ||
44 | |||
45 | // Hide useless "back to top" link when there is no scrollbar | ||
46 | if ($("body").height() <= $(window).height()) { | ||
47 | $('#article_toolbar .tool.top').parent().hide(); | ||
48 | } | ||
49 | }); | ||
50 | </script> | ||
51 | {% endblock %} \ No newline at end of file | ||