Browse Source

Fixed glitch on /modules/ in module-list

Nathan Schneider 4 years ago
parent
commit
f7d235ef9b
2 changed files with 26 additions and 22 deletions
  1. 2 0
      _layouts/rule.html
  2. 24 22
      _modules/index.html

+ 2 - 0
_layouts/rule.html

@@ -600,6 +600,7 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
 
         {% assign modules_array = site.modules | sort: "type" | reverse %}
 		{% for module in modules_array %}
+        {% if module.layout == "module" %}
 		<span class="module" id="module-{{ module.title | slugify }}"
 			  draggable="true" ondragstart="drag(event)">
 		  <span id="module-title" title="{{ module.summary }}">
@@ -619,6 +620,7 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
 			 style="display:none">
 			<img src="{% link assets/tabler_icons/x.svg %}" /></a>
 		</span>
+        {% endif %}
         {% endfor %}
       </div>
       

+ 24 - 22
_modules/index.html

@@ -5,25 +5,27 @@ url: /modules/
 ---
 
 
-    {% assign modules_array = site.modules | sort: "type" | reverse %}
-    {% for module in modules_array %}
-        <span class="module" id="module-{{ module.title | slugify }}"
-    draggable="true" ondragstart="drag(event)">
-<span id="module-title" title="{{ module.summary }}">
-            {{ module.title }}</span>
-          <a target="_blank" href="{{ module.url }}">
-            <img title="{{ module.type }} (press for info)" draggable="false" class="module-logo"
-                 {% if module.type == "structure" %}
-                 src="{% link assets/tabler_icons/building.svg %}" {% endif %}
-                 {% if module.type == "process" %}
-                 src="{% link assets/tabler_icons/rotate.svg %}" {% endif %}
-                 {% if module.type == "decision" %}
-                 src="{% link assets/tabler_icons/thumb-up.svg %}" {% endif %}
-                 {% if module.type == "culture" %}
-                 src="{% link assets/tabler_icons/palette.svg %}" {% endif %}
-                 /></a>
-		  <a onclick="this.parentNode.remove()" class="delete-module"
-			 style="display:none">
-			<img src="{% link assets/tabler_icons/x.svg %}" /></a>
-		</span>
-        {% endfor %}
+{% assign modules_array = site.modules | sort: "type" | reverse %}
+{% for module in modules_array %}
+{% if module.layout == "module" %}
+<span class="module" id="module-{{ module.title | slugify }}"
+      draggable="true" ondragstart="drag(event)">
+  <span id="module-title" title="{{ module.summary }}">
+    {{ module.title }}</span>
+  <a target="_blank" href="{{ module.url }}">
+    <img title="{{ module.type }} (press for info)" draggable="false" class="module-logo"
+         {% if module.type == "structure" %}
+         src="{% link assets/tabler_icons/building.svg %}" {% endif %}
+         {% if module.type == "process" %}
+         src="{% link assets/tabler_icons/rotate.svg %}" {% endif %}
+         {% if module.type == "decision" %}
+         src="{% link assets/tabler_icons/thumb-up.svg %}" {% endif %}
+         {% if module.type == "culture" %}
+         src="{% link assets/tabler_icons/palette.svg %}" {% endif %}
+         /></a>
+  <a onclick="this.parentNode.remove()" class="delete-module"
+	 style="display:none">
+	<img src="{% link assets/tabler_icons/x.svg %}" /></a>
+</span>
+{% endif %}
+{% endfor %}