]>
Commit | Line | Data |
---|---|---|
ad4d1caa | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
bd9f0815 | 2 | |
784bb4c3 | 3 | {% block title %}{{ entry.title|raw }} ({{ entry.domainName|removeWww }}){% endblock %} |
bd9f0815 | 4 | |
bd9f0815 | 5 | {% block content %} |
56349e47 TC |
6 | <div id="article"> |
7 | <header class="mbm"> | |
a8d5f897 | 8 | <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{% trans %}Edit title{% endtrans %}">✎</a></h1> |
56349e47 TC |
9 | </header> |
10 | ||
11 | <div id="article_toolbar"> | |
bd9f0815 NL |
12 | <ul class="links"> |
13 | <li class="topPosF"><a href="#top" title="{% trans %}Back to top{% endtrans %}" class="tool top icon icon-arrow-up-thick"><span>{% trans %}Back to top{% endtrans %}</span></a></li> | |
784bb4c3 | 14 | <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.domainName|removeWww }}</span></a></li> |
0cf434c0 | 15 | <li><a title="{% trans %}Reload content{% endtrans %}" class="tool icon icon-reload" href="{{ path('reload_entry', { 'id': entry.id }) }}"><span>{% trans %}Reload content{% endtrans %}</span></a></li> |
6c9bad13 | 16 | <li><a title="{% if entry.isArchived == 0 %}{% trans %}Mark as read{% endtrans %}{% else %}{% trans %}Mark as unread{% endtrans %}{% endif %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% if entry.isArchived == 0 %}{% trans %}Mark as read{% endtrans %}{% else %}{% trans %}Mark as unread{% endtrans %}{% endif %}</span></a></li> |
905ae369 | 17 | <li><a title="{% trans %}Favorite{% endtrans %}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle favorite{% endtrans %}</span></a></li> |
56349e47 | 18 | <li><a id="nav-btn-add-tag" title="{% trans %}Add a tag{% endtrans %}"><span>{% trans %}Tag{% endtrans %}</span></a></li> |
163eae0b | 19 | <li><a title="{% trans %}Delete{% endtrans %}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}Delete{% endtrans %}</span></a></li> |
63e40f2d JB |
20 | {% if craue_setting('share_twitter') %}<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{% endtrans %}"><span>{% trans %}Tweet{% endtrans %}</span></a></li>{% endif %} |
21 | {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans %}Email{% endtrans %}"><span>{% trans %}Email{% endtrans %}</span></a></li>{% endif %} | |
22 | {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans %}shaarli{% endtrans %}"><span>{% trans %}shaarli{% endtrans %}</span></a></li>{% endif %} | |
23 | {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('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{% endtrans %}"><span>{% trans %}diaspora{% endtrans %}</span></a></li>{% endif %} | |
24 | {% if craue_setting('carrot') %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="{% trans %}carrot{% endtrans %}"><span>Carrot</span></a></li>{% endif %} | |
25 | {% if craue_setting('show_printlink') %}<li><a title="{% trans %}Print{% endtrans %}" class="tool icon icon-print" href="javascript: window.print();"><span>{% trans %}Print{% endtrans %}</span></a></li>{% endif %} | |
26 | {% if craue_setting('export_epub') %}<li><a href="?epub&method=id&value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %} | |
27 | {% if craue_setting('export_mobi') %}<li><a href="?mobi&method=id&value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %} | |
28 | {% if craue_setting('export_pdf') %}<li><a href="?pdf&method=id&value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %} | |
bd9f0815 NL |
29 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans %}Does this article appear wrong?{% endtrans %}" class="tool bad-display icon icon-delete"><span>{% trans %}Does this article appear wrong?{% endtrans %}</span></a></li> |
30 | </ul> | |
31 | </div> | |
56349e47 | 32 | |
bd9f0815 | 33 | <aside class="tags"> |
56349e47 | 34 | {% for tag in entry.tags %} |
a8d5f897 TC |
35 | <span class="mdi-action-label-outline">{{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i>✘</i></a> |
36 | {% endfor %} | |
56349e47 TC |
37 | <div class="input-field nav-panel-add-tag" style="display: none"> |
38 | {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} | |
39 | </div> | |
bd9f0815 | 40 | </aside> |
b026d3b1 NL |
41 | {% if entry.previewPicture is not null %} |
42 | <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div> | |
43 | {% endif %} | |
bd9f0815 NL |
44 | <article> |
45 | {{ entry.content | raw }} | |
46 | </article> | |
47 | </div> | |
30d81a47 | 48 | <script src="{{ asset('bundles/wallabagcore/themes/_global/js/restoreScroll.js')}}"></script> |
bd9f0815 NL |
49 | <script type="text/javascript"> |
50 | $(document).ready(function() { | |
51 | ||
52 | // toggle read property of current article | |
163eae0b | 53 | /* $('#markAsRead').click(function(){ |
bd9f0815 | 54 | $("body").css("cursor", "wait"); |
163eae0b | 55 | $.ajax( { url: '{{ path('archive_entry', { 'id': entry.id }) }}' }).done( |
bd9f0815 NL |
56 | function( data ) { |
57 | if ( data == '1' ) { | |
58 | if ( $('#markAsRead').hasClass("archive-off") ) { | |
59 | $('#markAsRead').removeClass("archive-off"); | |
60 | $('#markAsRead').addClass("archive"); | |
61 | } | |
62 | else { | |
63 | $('#markAsRead').removeClass("archive"); | |
64 | $('#markAsRead').addClass("archive-off"); | |
65 | } | |
66 | } | |
67 | else { | |
68 | alert('Error! Pls check if you are logged in.'); | |
69 | } | |
70 | }); | |
71 | $("body").css("cursor", "auto"); | |
163eae0b | 72 | });*/ |
bd9f0815 NL |
73 | |
74 | // toggle favorite property of current article | |
163eae0b | 75 | /* $('#setFav').click(function(){ |
bd9f0815 | 76 | $("body").css("cursor", "wait"); |
163eae0b | 77 | $.ajax( { url: '{{ path('star_entry', { 'id': entry.id }) }}' }).done( |
bd9f0815 NL |
78 | function( data ) { |
79 | if ( data == '1' ) { | |
80 | if ( $('#setFav').hasClass("fav-off") ) { | |
81 | $('#setFav').removeClass("fav-off"); | |
82 | $('#setFav').addClass("fav"); | |
83 | } | |
84 | else { | |
85 | $('#setFav').removeClass("fav"); | |
86 | $('#setFav').addClass("fav-off"); | |
87 | } | |
88 | } | |
89 | else { | |
90 | alert('Error! Pls check if you are logged in.'); | |
91 | } | |
92 | }); | |
93 | $("body").css("cursor", "auto"); | |
163eae0b | 94 | });*/ |
bd9f0815 NL |
95 | |
96 | $(window).scroll(function(e){ | |
97 | var scrollTop = $(window).scrollTop(); | |
98 | var docHeight = $(document).height(); | |
99 | var scrollPercent = (scrollTop) / (docHeight); | |
100 | var scrollPercentRounded = Math.round(scrollPercent*100)/100; | |
82d6d9cb | 101 | savePercent({{ entry.id }}, scrollPercentRounded); |
bd9f0815 NL |
102 | }); |
103 | ||
82d6d9cb | 104 | retrievePercent({{ entry.id }}); |
bd9f0815 NL |
105 | |
106 | $(window).resize(function(){ | |
82d6d9cb | 107 | retrievePercent({{ entry.id }}); |
bd9f0815 NL |
108 | }); |
109 | }); | |
110 | </script> | |
7df80cb3 | 111 | {% endblock %} |