X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=tpl%2Fview.twig;h=f9405f45e8a8e89d940d6fd6e251d110488a5b14;hb=705250b93dc71ae91d3c305b51e7a20611873805;hp=d0d85f8bd352d253f3d6a3c330a0446aaeefad23;hpb=6a361945eaf86a978b82bd6fb3442fe64428d9df;p=github%2Fwallabag%2Fwallabag.git diff --git a/tpl/view.twig b/tpl/view.twig index d0d85f8b..f9405f45 100644 --- a/tpl/view.twig +++ b/tpl/view.twig @@ -1,21 +1,21 @@ {% extends "layout.twig" %} -{% block title %}{% trans "home" %}{% endblock %} +{% block title %}{{ entry.title|raw }} ({{ entry.url | e | getDomain }}){% endblock %} {% block content %}
-

{{ entry.title|e }}

+

{{ entry.title|raw }}

@@ -24,21 +24,36 @@
-

{% trans "this article appears wrong?" %} {% trans "create an issue" %} {% trans "or" %} {% trans "contact us by mail" %}

+

{% trans "this article appears wrong?" %} {% trans "create an issue" %} {% trans "or" %} {% trans "contact us by mail" %}

-{% endblock %} + + + $(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 }}); + }); + }); + {% endblock %} \ No newline at end of file