]> 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 5a80033232251c122b8c70fbbaa264698335f98a..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">
         </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 %}