OSDN Git Service

fix comment tree indentation
authorhylom <hylom@users.sourceforge.jp>
Tue, 5 Mar 2019 14:45:09 +0000 (23:45 +0900)
committerhylom <hylom@users.sourceforge.jp>
Tue, 5 Mar 2019 14:45:09 +0000 (23:45 +0900)
src/newslash_web/css/newslash/comment.less
src/newslash_web/templates/common/comment/comments.html.tt2 [deleted file]
src/newslash_web/templates/common/components/comment_tree.html.tt2

index 03c4042..abd4149 100644 (file)
             li { margin-left: 0; };
         }
     }
-    ol {
+    ol.comment-tree {
        margin: 0;
        padding: 0;
         margin-left: 16px;
         @media @mobile { margin-left: 8px; }
        list-style-type: none;
     }
+    ol.comment-tree > li {
+        margin-left: 0;
+    }
 }
 
 #comment-header {
diff --git a/src/newslash_web/templates/common/comment/comments.html.tt2 b/src/newslash_web/templates/common/comment/comments.html.tt2
deleted file mode 100644 (file)
index 88bbb16..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-[%# this file is deprecated... %]
-<div id="comments">
-  [%- INCLUDE common/comment/comment_header -%]
-  [%- helpers.ad_code("comment-header-bottom") %]
-  <ol>
-    <li v-for="comment in comments" v-if="comment.pid == 0">
-      <comment :comment="comment"></comment>
-      <comment-node :parent="comment"></comment-node>
-    </li>
-    <comment-form :reply="rootReply" v-if="commentAllowed"></comment-form>
-  </ol>
-</div>
-
-<script type="text/x-template" id="comment-template">
-  [%- INCLUDE common/comment/comment comment={}  x_template=1 -%]
-</script>
-
-<script type="text/x-template" id="comment-form-template">
-  <div class="comment-form">
-    [%- INCLUDE common/comment/comment_form -%]
-  </div>
-</script>
-
-<script type="text/x-template" id="comment-node-template">
-  <ol>
-    <li><comment-form :reply="parent.reply"></comment-form></li>
-    <li v-for="comment in parent.children">
-      <comment :comment="comment"></comment>
-      <comment-node :parent="comment"></comment-node>
-    </li>
-  </ol>
-</script>
-
-[% helpers.load_js("comments.js") %]
-[%# <script src="/js/comments.js" ></script> %]
-
-[%
-IF discussion.discussion_id; discussion_id = discussion.discussion_id;
-ELSE; discussion_id = 0;
-END;
-IF discussion.type == 'open'; archived = 0;
-ELSE; archived = 1;
-END
-%]
-
-<script>
-  comments.run({ el: "#comments",
-  userConfig: userConfig,
-  user: user,
-  type: "[% discussion.kind %]",
-  discussion_id: [% discussion_id %],
-  archived: [% archived %],
-  modReasons: modReasons,
-  });
-</script>
index 6b07a5f..077a64e 100644 (file)
@@ -86,7 +86,7 @@
       <comment-header></comment-header>
     </div>
     <div class="comment-tree-body">
-      <ol>
+      <ol class="comment-tree">
         <li v-for="comment in comments" v-if="!comment.pid || comment.pid == rootId">
           <comment :comment="comment"></comment>
         </li>
@@ -99,7 +99,7 @@
 <script type="text/x-template" id="comment-template">
   <div class="comment-wrap">
     [%- INCLUDE common/comment/comment comment={}  x_template=1 -%]
-    <ol>
+    <ol class="comment-tree">
       <li v-if="isFormVisible">
         <comment-form :reply-to="comment" v-on:finish-edit="hideReplyForm()"></comment-form>
       </li>