ソースを参照

Simplified Builder list display

Nathan Schneider 4 年 前
コミット
2cba6d1d1d
2 ファイル変更16 行追加4 行削除
  1. 7 2
      _layouts/rule.html
  2. 9 2
      _sass/communityrule.scss

+ 7 - 2
_layouts/rule.html

@@ -158,7 +158,8 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
       function arrayHTML(thisArray) {
           var thisOutput = "";
           if (thisArray.length > 0) {
-              thisOutput += '<ul class="builder-list">\n';
+              thisOutput += '<div class="builder-list">\n';
+              thisOutput += '<ul>\n';
               for (var i = 0; i < thisArray.length; i++) {
                   var item = thisArray[i];
                   thisOutput += '<li><strong>' + item[0] + '</strong> ';
@@ -171,7 +172,11 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
           }
           return thisOutput
       }
-      return arrayHTML(mainArray);
+      if (mainArray.length > 0) {
+          output += '<div class="builder-list">\n';
+          output += arrayHTML(mainArray) + '\n</div>\n';
+      }
+      return output;
   }
 
   // returns Markdown version of Builder content

+ 9 - 2
_sass/communityrule.scss

@@ -92,10 +92,17 @@
 }
 
 .builder-list {
-    list-style-type: none;
-    color: gray;
     margin-bottom: 2em;
 }
+.builder-list ul {
+    //list-style-type: none;
+    //list-style-image: url('/assets/tabler_icons/caret-right.svg');
+    color: gray;
+    margin-bottom: 0px;
+}
+.builder-list li {
+    padding-bottom: .5em;
+}
 
 .field-controls {
     float: right;