diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2014-01-08 11:28:46 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2014-01-08 11:28:46 +0100 |
commit | 5ed8050791ef562ff4351ede3a077ab1e8b0d916 (patch) | |
tree | 8e0a6bb5cc584b0710fb01048dc08bc26189d71e /themes/courgette/view.twig | |
parent | 8905191413f20e7fba1d635a06cf5ec2ff86cbb3 (diff) | |
download | wallabag-5ed8050791ef562ff4351ede3a077ab1e8b0d916.tar.gz wallabag-5ed8050791ef562ff4351ede3a077ab1e8b0d916.tar.zst wallabag-5ed8050791ef562ff4351ede3a077ab1e8b0d916.zip |
[add] courgette theme
Diffstat (limited to 'themes/courgette/view.twig')
-rwxr-xr-x | themes/courgette/view.twig | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/themes/courgette/view.twig b/themes/courgette/view.twig new file mode 100755 index 00000000..e8d32442 --- /dev/null +++ b/themes/courgette/view.twig | |||
@@ -0,0 +1,45 @@ | |||
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="{{ entry.url|e }}" target="_blank" title="{% trans "original" %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.url | e | getDomain }}</span></a></li> | ||
8 | <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> | ||
9 | <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> | ||
10 | <li><a title="{% trans "delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "delete" %}</span></a></li> | ||
11 | {% 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 %} | ||
12 | {% 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 %} | ||
13 | {% 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 %} | ||
14 | {% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li class="flattrli"><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 %} | ||
15 | <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> | ||
16 | </ul> | ||
17 | </div> | ||
18 | <div id="article"> | ||
19 | <header class="mbm"> | ||
20 | <h1>{{ entry.title|raw }}</h1> | ||
21 | </header> | ||
22 | <article> | ||
23 | {{ content | raw }} | ||
24 | </article> | ||
25 | </div> | ||
26 | <script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/restoreScroll.js"></script> | ||
27 | <script type="text/javascript"> | ||
28 | $(document).ready(function() { | ||
29 | |||
30 | $(window).scroll(function(e){ | ||
31 | var scrollTop = $(window).scrollTop(); | ||
32 | var docHeight = $(document).height(); | ||
33 | var scrollPercent = (scrollTop) / (docHeight); | ||
34 | var scrollPercentRounded = Math.round(scrollPercent*100)/100; | ||
35 | savePercent({{ entry.id|e }}, scrollPercentRounded); | ||
36 | }); | ||
37 | |||
38 | retrievePercent({{ entry.id|e }}); | ||
39 | |||
40 | $(window).resize(function(){ | ||
41 | retrievePercent({{ entry.id|e }}); | ||
42 | }); | ||
43 | }); | ||
44 | </script> | ||
45 | {% endblock %} \ No newline at end of file | ||