2014-02-12 15:58:40 -05:00
{% extends "layout.twig" %}
{% block menu %}
{% include '_menu.twig' %}
{% endblock %}
2014-07-10 07:17:04 -04:00
{% block title %} {{ entry .title | raw }} ( {{ entry .url | e | getDomain }} ) {% endblock %}
2014-02-12 15:58:40 -05:00
{% block content %}
<div id="article_toolbar">
<ul class="links">
<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>
2014-07-10 07:17:04 -04:00
<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>
2014-04-22 03:45:09 -04:00
<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>
<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>
2014-02-12 15:58:40 -05:00
<li><a title=" {% trans "Delete" %} " class="tool delete icon icon-trash" href="./?action=delete&id= {{ entry .id | e }} "><span> {% trans "Delete" %} </span></a></li>
{% 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 %}
{% 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 %}
{% 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 %}
2014-02-28 08:27:10 -05:00
{% 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 %}
2014-04-22 03:45:09 -04:00
{% 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 %}
2014-07-12 13:01:11 -04:00
<li><a href="./?epub&method=id&value= {{ entry .id | e }} " title="Generate epub file">EPUB</a></li>
2014-07-24 15:56:04 -04:00
<li><a href="./?mobi&method=id&value= {{ entry .id | e }} " title="Generate mobi file">MOBI</a></li>
<li><a href="./?pdf&method=id&value= {{ entry .id | e }} " title="Generate epub file">PDF</a></li>
2014-02-12 15:58:40 -05:00
<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>
</ul>
</div>
<div id="article">
<header class="mbm">
<h1> {{ entry .title | raw }} </h1>
</header>
<aside class="tags">
tags: {% for tag in tags %} <a href="./?view=tag&id= {{ tag .id }} "> {{ tag .value }} </a> {% endfor %} <a href="./?view=edit-tags&id= {{ entry .id | e }} " title=" {% trans "Edit tags" %} ">✎</a>
</aside>
<article>
{{ content | raw }}
</article>
</div>
2014-03-28 05:26:48 -04:00
<script src=" {{ poche_url }} themes/ {{ theme }} /js/restoreScroll.js"></script>
2014-03-06 12:57:04 -05:00
<script type="text/javascript">
$(document).ready(function() {
2014-04-22 03:45:09 -04:00
// toggle read property of current article
$('#markAsRead').click(function() {
$("body").css("cursor", "wait");
$.ajax( { url: './?action=toggle_archive&id= {{ entry .id | e }} ' }).done(
function( data ) {
if ( data == '1' ) {
if ( $('#markAsRead').hasClass("archive-off") ) {
$('#markAsRead').removeClass("archive-off");
$('#markAsRead').addClass("archive");
}
else {
$('#markAsRead').removeClass("archive");
$('#markAsRead').addClass("archive-off");
}
}
else {
alert('Error! Pls check if you are logged in.');
}
});
$("body").css("cursor", "auto");
});
// toggle favorite property of current article
$('#setFav').click(function() {
$("body").css("cursor", "wait");
$.ajax( { url: './?action=toggle_fav&id= {{ entry .id | e }} ' }).done(
function( data ) {
if ( data == '1' ) {
if ( $('#setFav').hasClass("fav-off") ) {
$('#setFav').removeClass("fav-off");
$('#setFav').addClass("fav");
}
else {
$('#setFav').removeClass("fav");
$('#setFav').addClass("fav-off");
}
}
else {
alert('Error! Pls check if you are logged in.');
}
});
$("body").css("cursor", "auto");
});
2014-03-06 12:57:04 -05:00
$(window).scroll(function(e) {
var scrollTop = $(window).scrollTop();
var docHeight = $(document).height();
var scrollPercent = (scrollTop) / (docHeight);
var scrollPercentRounded = Math.round(scrollPercent*100)/100;
savePercent( {{ entry .id | e }} , scrollPercentRounded);
});
retrievePercent( {{ entry .id | e }} );
$(window).resize(function() {
retrievePercent( {{ entry .id | e }} );
});
});
</script>
2014-02-12 15:58:40 -05:00
{% endblock %}