diff options
Diffstat (limited to 'themes')
-rwxr-xr-x | themes/baggy/css/main.css | 3 | ||||
-rwxr-xr-x | themes/baggy/css/print.css | 14 | ||||
-rw-r--r--[-rwxr-xr-x] | themes/baggy/fonts/icomoon.eot | bin | 3724 -> 3896 bytes | |||
-rw-r--r--[-rwxr-xr-x] | themes/baggy/fonts/icomoon.svg | 17 | ||||
-rw-r--r--[-rwxr-xr-x] | themes/baggy/fonts/icomoon.ttf | bin | 3560 -> 3732 bytes | |||
-rw-r--r--[-rwxr-xr-x] | themes/baggy/fonts/icomoon.woff | bin | 3528 -> 3664 bytes | |||
-rwxr-xr-x | themes/baggy/view.twig | 49 | ||||
-rwxr-xr-x[-rw-r--r--] | themes/default/css/style-default.css | 4 | ||||
-rwxr-xr-x | themes/default/css/style.css | 13 | ||||
-rwxr-xr-x | themes/default/img/default/print.png | bin | 0 -> 321 bytes | |||
-rwxr-xr-x | themes/default/view.twig | 64 |
11 files changed, 158 insertions, 6 deletions
diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index 0991dbed..52d8ecaa 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css | |||
@@ -746,6 +746,9 @@ margin-top:1em; | |||
746 | .icon-rss:before { | 746 | .icon-rss:before { |
747 | content: "\e808"; | 747 | content: "\e808"; |
748 | } | 748 | } |
749 | .icon-print:before { | ||
750 | content: "\e80d"; | ||
751 | } | ||
749 | 752 | ||
750 | /* ========================================================================== | 753 | /* ========================================================================== |
751 | Icon selected | 754 | Icon selected |
diff --git a/themes/baggy/css/print.css b/themes/baggy/css/print.css index 9aefa779..9dd6d295 100755 --- a/themes/baggy/css/print.css +++ b/themes/baggy/css/print.css | |||
@@ -17,6 +17,7 @@ img { | |||
17 | 17 | ||
18 | /* Hide useless blocks */ | 18 | /* Hide useless blocks */ |
19 | body > header, | 19 | body > header, |
20 | #article_toolbar, | ||
20 | #links, | 21 | #links, |
21 | #sort, | 22 | #sort, |
22 | body > footer, | 23 | body > footer, |
@@ -46,3 +47,16 @@ abbr[title]:after { | |||
46 | .pagination span.current { | 47 | .pagination span.current { |
47 | border-style: dashed; | 48 | border-style: dashed; |
48 | } | 49 | } |
50 | |||
51 | #main { | ||
52 | width: 100%; | ||
53 | padding: 0; | ||
54 | margin: 0; | ||
55 | margin-left: 0; | ||
56 | padding-right: 0; | ||
57 | padding-bottom: 0; | ||
58 | } | ||
59 | |||
60 | #article { | ||
61 | width: 100%; | ||
62 | } | ||
diff --git a/themes/baggy/fonts/icomoon.eot b/themes/baggy/fonts/icomoon.eot index 02f53b36..56323516 100755..100644 --- a/themes/baggy/fonts/icomoon.eot +++ b/themes/baggy/fonts/icomoon.eot | |||
Binary files differ | |||
diff --git a/themes/baggy/fonts/icomoon.svg b/themes/baggy/fonts/icomoon.svg index d9c35b98..b4586136 100755..100644 --- a/themes/baggy/fonts/icomoon.svg +++ b/themes/baggy/fonts/icomoon.svg | |||
@@ -1,7 +1,21 @@ | |||
1 | <?xml version="1.0" standalone="no"?> | 1 | <?xml version="1.0" standalone="no"?> |
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
3 | <svg xmlns="http://www.w3.org/2000/svg"> | 3 | <svg xmlns="http://www.w3.org/2000/svg"> |
4 | <metadata>Generated by IcoMoon</metadata> | 4 | <metadata> |
5 | <json> | ||
6 | { | ||
7 | "fontFamily": "icomoon", | ||
8 | "majorVersion": 1, | ||
9 | "minorVersion": 0, | ||
10 | "version": "Version 1.0", | ||
11 | "fontId": "icomoon", | ||
12 | "psName": "icomoon", | ||
13 | "subFamily": "Regular", | ||
14 | "fullName": "icomoon", | ||
15 | "description": "Generated by IcoMoon" | ||
16 | } | ||
17 | </json> | ||
18 | </metadata> | ||
5 | <defs> | 19 | <defs> |
6 | <font id="icomoon" horiz-adv-x="512"> | 20 | <font id="icomoon" horiz-adv-x="512"> |
7 | <font-face units-per-em="512" ascent="480" descent="-32" /> | 21 | <font-face units-per-em="512" ascent="480" descent="-32" /> |
@@ -23,4 +37,5 @@ | |||
23 | <glyph unicode="" d="M475.648 50.432v219.136q-9.216-10.24-19.968-18.944-76.288-58.368-121.856-96.256-14.336-12.288-23.552-19.456t-24.576-13.824-29.184-6.656h-1.024q-13.312 0-29.184 6.656t-24.576 13.824-23.552 19.456q-45.056 37.888-121.856 96.256-10.752 8.704-19.968 18.944v-219.136q0-4.096 3.072-6.656t6.144-2.56h420.864q3.584 0 6.144 2.56t3.072 6.656zM475.648 350.464v7.168t-0.512 3.584-0.512 3.584-1.536 2.56-2.56 2.048-4.096 1.024h-420.864q-3.584 0-6.144-3.072t-3.072-6.144q0-48.128 41.984-81.408 55.296-43.52 114.688-90.624 2.048-1.024 10.24-8.192t12.8-10.752 12.8-9.216 14.336-7.68 12.288-2.56h1.024q5.632 0 12.288 2.56t14.336 7.68 12.8 9.216 12.8 10.752 10.24 8.192q59.392 47.104 114.688 90.624 15.36 12.288 28.672 33.28t13.312 37.376zM512 361.216v-310.784q0-18.944-13.312-32.256t-32.256-13.824h-420.864q-18.432 0-32.256 13.824t-13.312 32.256v310.784q0 18.944 13.312 32.256t32.256 13.312h420.864q18.944 0 32.256-13.312t13.312-32.256z" /> | 37 | <glyph unicode="" d="M475.648 50.432v219.136q-9.216-10.24-19.968-18.944-76.288-58.368-121.856-96.256-14.336-12.288-23.552-19.456t-24.576-13.824-29.184-6.656h-1.024q-13.312 0-29.184 6.656t-24.576 13.824-23.552 19.456q-45.056 37.888-121.856 96.256-10.752 8.704-19.968 18.944v-219.136q0-4.096 3.072-6.656t6.144-2.56h420.864q3.584 0 6.144 2.56t3.072 6.656zM475.648 350.464v7.168t-0.512 3.584-0.512 3.584-1.536 2.56-2.56 2.048-4.096 1.024h-420.864q-3.584 0-6.144-3.072t-3.072-6.144q0-48.128 41.984-81.408 55.296-43.52 114.688-90.624 2.048-1.024 10.24-8.192t12.8-10.752 12.8-9.216 14.336-7.68 12.288-2.56h1.024q5.632 0 12.288 2.56t14.336 7.68 12.8 9.216 12.8 10.752 10.24 8.192q59.392 47.104 114.688 90.624 15.36 12.288 28.672 33.28t13.312 37.376zM512 361.216v-310.784q0-18.944-13.312-32.256t-32.256-13.824h-420.864q-18.432 0-32.256 13.824t-13.312 32.256v310.784q0 18.944 13.312 32.256t32.256 13.312h420.864q18.944 0 32.256-13.312t13.312-32.256z" /> |
24 | <glyph unicode="" d="M0 133.888l256 256 256-256-75.776-75.776-180.224 179.712-180.224-179.712z" /> | 38 | <glyph unicode="" d="M0 133.888l256 256 256-256-75.776-75.776-180.224 179.712-180.224-179.712z" /> |
25 | <glyph unicode="" d="M25.6 279.296q62.464-35.84 168.96-35.84t168.96 35.84l-27.648-248.832q-1.024-7.168-17.92-18.432t-51.2-22.016-72.192-10.752-71.68 10.752-51.2 22.016-18.432 18.432zM275.456 432.896q48.128-9.216 80.896-28.16t32.768-36.352v-5.12q0-29.696-57.344-50.688t-137.216-20.992-137.216 20.992-57.344 50.688v5.12q0 17.408 32.768 36.352t80.896 28.16l21.504 24.576q11.264 13.312 35.84 13.312h47.104q26.624 0 35.84-13.312zM247.808 375.552h43.008q-47.104 56.32-53.248 64.512-7.168 8.192-16.384 8.192h-52.224q-11.264 0-16.384-8.192l-54.272-64.512h43.008l32.768 33.792h41.984z" horiz-adv-x="389" /> | 39 | <glyph unicode="" d="M25.6 279.296q62.464-35.84 168.96-35.84t168.96 35.84l-27.648-248.832q-1.024-7.168-17.92-18.432t-51.2-22.016-72.192-10.752-71.68 10.752-51.2 22.016-18.432 18.432zM275.456 432.896q48.128-9.216 80.896-28.16t32.768-36.352v-5.12q0-29.696-57.344-50.688t-137.216-20.992-137.216 20.992-57.344 50.688v5.12q0 17.408 32.768 36.352t80.896 28.16l21.504 24.576q11.264 13.312 35.84 13.312h47.104q26.624 0 35.84-13.312zM247.808 375.552h43.008q-47.104 56.32-53.248 64.512-7.168 8.192-16.384 8.192h-52.224q-11.264 0-16.384-8.192l-54.272-64.512h43.008l32.768 33.792h41.984z" horiz-adv-x="389" /> |
40 | <glyph unicode="" d="M128 448h256v-64h-256zM480 352h-448c-17.6 0-32-14.4-32-32v-160c0-17.6 14.398-32 32-32h96v-128h256v128h96c17.6 0 32 14.4 32 32v160c0 17.6-14.4 32-32 32zM352 32h-192v160h192v-160zM487.2 304c0-12.813-10.387-23.2-23.199-23.2-12.813 0-23.201 10.387-23.201 23.2s10.388 23.2 23.201 23.2c12.813 0 23.199-10.387 23.199-23.2z" /> | ||
26 | </font></defs></svg> \ No newline at end of file | 41 | </font></defs></svg> \ No newline at end of file |
diff --git a/themes/baggy/fonts/icomoon.ttf b/themes/baggy/fonts/icomoon.ttf index 3860dd04..bb1f21f8 100755..100644 --- a/themes/baggy/fonts/icomoon.ttf +++ b/themes/baggy/fonts/icomoon.ttf | |||
Binary files differ | |||
diff --git a/themes/baggy/fonts/icomoon.woff b/themes/baggy/fonts/icomoon.woff index c3a91ed7..bab13779 100755..100644 --- a/themes/baggy/fonts/icomoon.woff +++ b/themes/baggy/fonts/icomoon.woff | |||
Binary files differ | |||
diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig index ffb512a3..62af2516 100755 --- a/themes/baggy/view.twig +++ b/themes/baggy/view.twig | |||
@@ -8,13 +8,14 @@ | |||
8 | <ul class="links"> | 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> | 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> | 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> |
11 | <li><a title="{% trans "Mark as read" %}" class="tool icon icon-check {% 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> | 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="./?action=toggle_fav&id={{ entry.id|e }}"><span>{% trans "Toggle favorite" %}</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> |
13 | <li><a title="{% trans "Delete" %}" class="tool delete icon icon-trash" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> | 13 | <li><a title="{% trans "Delete" %}" class="tool delete icon icon-trash" href="./?action=delete&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 %} | 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 }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} | 15 | {% if constant('SHARE_MAIL') == 1 %}<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" %}"><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 }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %} | 16 | {% 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 %} |
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 %} | 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 %} |
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 %} | ||
18 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&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> | 19 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&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> |
19 | </ul> | 20 | </ul> |
20 | </div> | 21 | </div> |
@@ -32,6 +33,50 @@ | |||
32 | <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script> | 33 | <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script> |
33 | <script type="text/javascript"> | 34 | <script type="text/javascript"> |
34 | $(document).ready(function() { | 35 | $(document).ready(function() { |
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 | }); | ||
35 | 80 | ||
36 | $(window).scroll(function(e){ | 81 | $(window).scroll(function(e){ |
37 | var scrollTop = $(window).scrollTop(); | 82 | var scrollTop = $(window).scrollTop(); |
diff --git a/themes/default/css/style-default.css b/themes/default/css/style-default.css index 9dc7c0b0..889a9f5c 100644..100755 --- a/themes/default/css/style-default.css +++ b/themes/default/css/style-default.css | |||
@@ -52,4 +52,8 @@ a.link span { | |||
52 | 52 | ||
53 | a.bad-display span { | 53 | a.bad-display span { |
54 | background-image: url('../img/default/bad-display.png'); | 54 | background-image: url('../img/default/bad-display.png'); |
55 | } | ||
56 | |||
57 | a.print span { | ||
58 | background-image: url('../img/default/print.png'); | ||
55 | } \ No newline at end of file | 59 | } \ No newline at end of file |
diff --git a/themes/default/css/style.css b/themes/default/css/style.css index e536ac6b..11a8ea1c 100755 --- a/themes/default/css/style.css +++ b/themes/default/css/style.css | |||
@@ -331,7 +331,8 @@ a.email span, | |||
331 | a.delete span, | 331 | a.delete span, |
332 | a.link span, | 332 | a.link span, |
333 | a.bad-display span, | 333 | a.bad-display span, |
334 | a.reading-time span { | 334 | a.reading-time span, |
335 | a.print span { | ||
335 | background-repeat: no-repeat; | 336 | background-repeat: no-repeat; |
336 | } | 337 | } |
337 | 338 | ||
@@ -402,3 +403,13 @@ a#bagit-form-close { | |||
402 | .opacity03 { | 403 | .opacity03 { |
403 | /*opacity: 0.3;*/ | 404 | /*opacity: 0.3;*/ |
404 | } | 405 | } |
406 | |||
407 | #readLeftPercent { | ||
408 | display: inline-block; | ||
409 | /* Show textual content */ | ||
410 | overflow: visible; | ||
411 | text-align: left; | ||
412 | text-indent: 0; | ||
413 | color: black; | ||
414 | width: 50px; | ||
415 | } \ No newline at end of file | ||
diff --git a/themes/default/img/default/print.png b/themes/default/img/default/print.png new file mode 100755 index 00000000..83d6445b --- /dev/null +++ b/themes/default/img/default/print.png | |||
Binary files differ | |||
diff --git a/themes/default/view.twig b/themes/default/view.twig index cc491c77..983cc1cd 100755 --- a/themes/default/view.twig +++ b/themes/default/view.twig | |||
@@ -7,14 +7,16 @@ | |||
7 | <li><a href="./" title="{% trans "Return home" %}" class="tool back"><span>{% trans "Return home" %}</span></a></li> | 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> | 8 | <li><a href="#top" title="{% trans "Back to top" %}" class="tool top"><span>{% trans "Back to top" %}</span></a></li> |
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> | 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> |
10 | <li><a title="{% trans "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 "Mark as read" %}" class="tool {% 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> |
11 | <li><a title="{% trans "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 "Favorite" %}" class="tool {% if entry.is_fav == 0 %}fav-off{% else %}fav{% endif %}" href="javascript: void(null);" id="setFav"><span>{% trans "Toggle favorite" %}</span></a></li> |
12 | <li><a title="{% trans "Delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> | 12 | <li><a title="{% trans "Delete" %}" class="tool delete" href="./?action=delete&id={{ entry.id|e }}"><span>{% trans "Delete" %}</span></a></li> |
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 %} | 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 }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} | 14 | {% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %} |
15 | {% 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('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 %} |
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 %} | 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 %} |
17 | {% if constant('SHOW_PRINTLINK') == 1 %}<li><a title="{% trans "Print" %}" class="tool print" href="javascript: window.print();"><span>{% trans "Print" %}</span></a></li>{% endif %} | ||
17 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&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> | 18 | <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&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> |
19 | {% if constant('SHOW_READPERCENT') == 1 %}<li><div id="readLeftPercent">0%</div></li>{% endif %} | ||
18 | </ul> | 20 | </ul> |
19 | </div> | 21 | </div> |
20 | <div id="article"> | 22 | <div id="article"> |
@@ -34,6 +36,60 @@ | |||
34 | <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script> | 36 | <script src="{{ poche_url }}themes/{{theme}}/js/restoreScroll.js"></script> |
35 | <script type="text/javascript"> | 37 | <script type="text/javascript"> |
36 | $(document).ready(function() { | 38 | $(document).ready(function() { |
39 | |||
40 | // toggle read property of current article | ||
41 | $('#markAsRead').click(function(){ | ||
42 | $("body").css("cursor", "wait"); | ||
43 | $.ajax( { url: './?action=toggle_archive&id={{ entry.id|e }}' }).done( | ||
44 | function( data ) { | ||
45 | if ( data == '1' ) { | ||
46 | if ( $('#markAsRead').hasClass("archive-off") ) { | ||
47 | $('#markAsRead').removeClass("archive-off"); | ||
48 | $('#markAsRead').addClass("archive"); | ||
49 | } | ||
50 | else { | ||
51 | $('#markAsRead').removeClass("archive"); | ||
52 | $('#markAsRead').addClass("archive-off"); | ||
53 | } | ||
54 | } | ||
55 | else { | ||
56 | alert('Error! Pls check if you are logged in.'); | ||
57 | } | ||
58 | }); | ||
59 | $("body").css("cursor", "auto"); | ||
60 | }); | ||
61 | |||
62 | // toggle favorite property of current article | ||
63 | $('#setFav').click(function(){ | ||
64 | $("body").css("cursor", "wait"); | ||
65 | $.ajax( { url: './?action=toggle_fav&id={{ entry.id|e }}' }).done( | ||
66 | function( data ) { | ||
67 | if ( data == '1' ) { | ||
68 | if ( $('#setFav').hasClass("fav-off") ) { | ||
69 | $('#setFav').removeClass("fav-off"); | ||
70 | $('#setFav').addClass("fav"); | ||
71 | } | ||
72 | else { | ||
73 | $('#setFav').removeClass("fav"); | ||
74 | $('#setFav').addClass("fav-off"); | ||
75 | } | ||
76 | } | ||
77 | else { | ||
78 | alert('Error! Pls check if you are logged in.'); | ||
79 | } | ||
80 | }); | ||
81 | $("body").css("cursor", "auto"); | ||
82 | }); | ||
83 | |||
84 | // set percent of read on startup | ||
85 | if ( $(document).height() <= $(window).innerHeight() ) { | ||
86 | pp = 100; | ||
87 | } | ||
88 | else { | ||
89 | pp = 0; | ||
90 | } | ||
91 | $('#readLeftPercent').text( pp + '%' ); | ||
92 | |||
37 | 93 | ||
38 | $(window).scroll(function(e){ | 94 | $(window).scroll(function(e){ |
39 | var scrollTop = $(window).scrollTop(); | 95 | var scrollTop = $(window).scrollTop(); |
@@ -41,6 +97,10 @@ | |||
41 | var scrollPercent = (scrollTop) / (docHeight); | 97 | var scrollPercent = (scrollTop) / (docHeight); |
42 | var scrollPercentRounded = Math.round(scrollPercent*100)/100; | 98 | var scrollPercentRounded = Math.round(scrollPercent*100)/100; |
43 | savePercent({{ entry.id|e }}, scrollPercentRounded); | 99 | savePercent({{ entry.id|e }}, scrollPercentRounded); |
100 | |||
101 | // change percent of read on scroll | ||
102 | pp = Math.round(scrollTop * 100 / ( docHeight - $(window).innerHeight() )); | ||
103 | $('#readLeftPercent').text( pp + '%' ); | ||
44 | }); | 104 | }); |
45 | 105 | ||
46 | retrievePercent({{ entry.id|e }}); | 106 | retrievePercent({{ entry.id|e }}); |