]> git.immae.eu Git - github/wallabag/wallabag.git/blame - themes/default/view.twig
Merge pull request #595 from wallabag/dev
[github/wallabag/wallabag.git] / themes / default / view.twig
CommitLineData
4cc3c2ac
NL
1{% extends "layout.twig" %}
2{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %}
3{% block content %}
e68348f6 4 {% include '_pocheit-form.twig' %}
4cc3c2ac
NL
5 <div id="article_toolbar">
6 <ul>
43c1115e
WT
7 <li><a href="./" title="{% trans "Return home" %}" class="tool back"><span>{% trans "Return home" %}</span></a></li>
8 <li><a href="#top" title="{% trans "Back to top" %}" class="tool top"><span>{% trans "Back to top" %}</span></a></li>
4cc3c2ac 9 <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>
43c1115e
WT
10 <li><a title="{% trans "Mark as read" %}" class="tool {% if entry.is_read == 0 %}archive-off{% else %}archive{% endif %}" href="./?action=toggle_archive&amp;id={{ entry.id|e }}"><span>{% trans "Toggle mark as read" %}</span></a></li>
11 <li><a title="{% trans "Favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="./?action=toggle_fav&amp;id={{ entry.id|e }}"><span>{% trans "Toggle favorite" %}</span></a></li>
12 <li><a title="{% trans "Delete" %}" class="tool delete" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li>
b8fdd2d8
NL
13 {% 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" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %}
14 {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %}
4cc3c2ac
NL
15 {% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
16 {% 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 %}
3e0e7e12 17 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;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>
4cc3c2ac
NL
18 </ul>
19 </div>
20 <div id="article">
21 <header class="mbm">
22 <h1>{{ entry.title|raw }}</h1>
23 </header>
032e0ca1
MR
24 {% block tags %}
25 <aside class="tags">
26 {% trans "tags:" %} {% for tag in tags %}<a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> {% endfor %}<a href="./?view=edit-tags&amp;id={{ entry.id|e }}" title="{% trans "Edit tags" %}">✎</a>
27 </aside>
28 {% endblock %}
4cc3c2ac
NL
29 <article>
30 {{ content | raw }}
31 </article>
032e0ca1 32 {{ block('tags') }}
4cc3c2ac 33 </div>
3345c9dc 34 <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script>
4cc3c2ac
NL
35 <script type="text/javascript">
36 $(document).ready(function() {
37
38 $(window).scroll(function(e){
39 var scrollTop = $(window).scrollTop();
40 var docHeight = $(document).height();
41 var scrollPercent = (scrollTop) / (docHeight);
42 var scrollPercentRounded = Math.round(scrollPercent*100)/100;
43 savePercent({{ entry.id|e }}, scrollPercentRounded);
44 });
45
46 retrievePercent({{ entry.id|e }});
47
48 $(window).resize(function(){
49 retrievePercent({{ entry.id|e }});
50 });
51
52 // Hide useless "back to top" link when there is no scrollbar
53 if ($("body").height() <= $(window).height()) {
54 $('#article_toolbar .tool.top').parent().hide();
55 }
56 });
032e0ca1 57 </script>
43c1115e 58{% endblock %}
e68348f6 59