]> git.immae.eu Git - github/wallabag/wallabag.git/blame - themes/baggy/view.twig
print view fixed in baggy; print link added; read percent added in default theme...
[github/wallabag/wallabag.git] / themes / baggy / view.twig
CommitLineData
943ac3c7
NL
1{% extends "layout.twig" %}
2{% block menu %}
3{% include '_menu.twig' %}
4{% endblock %}
5{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %}
6{% block content %}
7 <div id="article_toolbar">
8 <ul class="links">
9 <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>
10 <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>
c2cf7075
MR
11 <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>
12 <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>
943ac3c7
NL
13 <li><a title="{% trans "Delete" %}" class="tool delete icon icon-trash" href="./?action=delete&amp;id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li>
14 {% 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 %}
15 {% 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 icon icon-mail" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %}
16 {% 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 %}
d4293058 17 {% 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 %}
c2cf7075 18 {% if constant('SHOW_PRINTLINK') == 1 %}<li><a title="{% trans "Print" %}" class="tool icon icon-print" href="javascript: window.print();"><span>{% trans "Print" %}</span></a></li>{% endif %}
943ac3c7
NL
19 <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 icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li>
20 </ul>
21 </div>
22 <div id="article">
23 <header class="mbm">
24 <h1>{{ entry.title|raw }}</h1>
25 </header>
26 <aside class="tags">
27 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>
28 </aside>
29 <article>
30 {{ content | raw }}
31 </article>
32 </div>
08718c01 33 <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script>
25114854
NL
34 <script type="text/javascript">
35 $(document).ready(function() {
c2cf7075
MR
36
37 // toggle read property of current article
38 $('#markAsRead').click(function(){
39 $("body").css("cursor", "wait");
40 $.ajax( { url: './?action=toggle_archive&id={{ entry.id|e }}' }).done(
41 function( data ) {
42 if ( data == '1' ) {
43 if ( $('#markAsRead').hasClass("archive-off") ) {
44 $('#markAsRead').removeClass("archive-off");
45 $('#markAsRead').addClass("archive");
46 }
47 else {
48 $('#markAsRead').removeClass("archive");
49 $('#markAsRead').addClass("archive-off");
50 }
51 }
52 else {
53 alert('Error! Pls check if you are logged in.');
54 }
55 });
56 $("body").css("cursor", "auto");
57 });
58
59 // toggle favorite property of current article
60 $('#setFav').click(function(){
61 $("body").css("cursor", "wait");
62 $.ajax( { url: './?action=toggle_fav&id={{ entry.id|e }}' }).done(
63 function( data ) {
64 if ( data == '1' ) {
65 if ( $('#setFav').hasClass("fav-off") ) {
66 $('#setFav').removeClass("fav-off");
67 $('#setFav').addClass("fav");
68 }
69 else {
70 $('#setFav').removeClass("fav");
71 $('#setFav').addClass("fav-off");
72 }
73 }
74 else {
75 alert('Error! Pls check if you are logged in.');
76 }
77 });
78 $("body").css("cursor", "auto");
79 });
25114854
NL
80
81 $(window).scroll(function(e){
82 var scrollTop = $(window).scrollTop();
83 var docHeight = $(document).height();
84 var scrollPercent = (scrollTop) / (docHeight);
85 var scrollPercentRounded = Math.round(scrollPercent*100)/100;
86 savePercent({{ entry.id|e }}, scrollPercentRounded);
87 });
88
89 retrievePercent({{ entry.id|e }});
90
91 $(window).resize(function(){
92 retrievePercent({{ entry.id|e }});
93 });
94 });
95 </script>
943ac3c7 96{% endblock %}