]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
manage assets through npm
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / Entry / entry.html.twig
index 3cda3949eaecd356c575f365762b1c1d06c377e0..8c06cf110c32092cc3c31aaa7d737f0574670ec2 100644 (file)
@@ -5,7 +5,7 @@
 {% block content %}
     <div id="article">
         <header class="mbm">
-            <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
+            <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
         </header>
 
         <div id="article_toolbar">
@@ -22,7 +22,7 @@
             {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %}
             {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %}
             {% 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="carrot"><span>Carrot</span></a></li>{% endif %}
-            {% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span></a></li>{% endif %}
+            {% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.print'|trans }}</span></a></li>{% endif %}
             {% if craue_setting('export_epub') %}<li><a href="?epub&amp;method=id&amp;value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %}
             {% if craue_setting('export_mobi') %}<li><a href="?mobi&amp;method=id&amp;value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
             {% if craue_setting('export_pdf') %}<li><a href="?pdf&amp;method=id&amp;value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %}
         </ul>
     </div>
         {% set nbAnnotations = entry.annotations | length %}
-        <span class="tool link mdi-communication-comment"> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
+        <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
         <aside class="tags">
             {% for tag in entry.tags %}
-                <span class="mdi-action-label-outline">{{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i>✘</i></a>
+                <span class="label-outline"><i class="material-icons">label_outline</i> {{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"class="nostyle"><i>✘</i></a>
             {% endfor %}
             <div class="input-field nav-panel-add-tag" style="display: none">
                 {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
             {{ entry.content | raw }}
         </article>
     </div>
-    <script src="{{ asset('bundles/wallabagcore/themes/_global/js/restoreScroll.js')}}"></script>
-    <script type="text/javascript">
-        $(document).ready(function() {
-
-            // toggle read property of current article
-          /*  $('#markAsRead').click(function(){
-                $("body").css("cursor", "wait");
-                $.ajax( { url: '{{ path('archive_entry', { 'id': entry.id }) }}' }).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: '{{ path('star_entry', { 'id': entry.id }) }}' }).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");
-            });*/
-
-            $(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 }}, scrollPercentRounded);
-            });
-
-            retrievePercent({{ entry.id }});
-
-            $(window).resize(function(){
-                retrievePercent({{ entry.id }});
-            });
-        });
-
-        var app = new annotator.App();
-        app.include(annotator.ui.main, {
-            element: document.querySelector('article')
-        });
-        app.include(annotator.storage.http, {
-            prefix: '',
-            urls: {
-                create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
-                update: '{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}',
-                destroy: '{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}',
-                search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
-            }
-        });
-        app
-            .start()
-            .then(function () {
-                app.annotations.load({entry: {{ entry.id }}});
-            });
+    <script id="annotationroutes" type="application/json">
+    {
+        "prefix": "",
+        "urls": {
+            "create": "{{ path('annotations_post_annotation', { 'entry': entry.id }) }}",
+            "update": "{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}",
+            "destroy": "{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}",
+            "search": "{{ path('annotations_get_annotations', { 'entry': entry.id }) }}"
+        },
+        "entryId": "{{ entry.id }}"
+    }
     </script>
-
 {% endblock %}