瀏覽代碼

Added shields.io badge to .md and Display output

Nathan Schneider 5 年之前
父節點
當前提交
c8e78b3611
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. 11 1
      _layouts/rule.html

+ 11 - 1
_layouts/rule.html

@@ -167,7 +167,7 @@ layout: default
               content += elements[i].innerHTML + '\n\n';
           }
       }
-      content += '---\n\nCreated with [CommunityRule](http://communityrule.info) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/4.0/).';
+      content += document.getElementById('attributionMD').innerHTML;
       content = content.replace(/(<([^>]+)>)/ig,''); // strips stray tags
       // Starting here, see https://stackoverflow.com/a/33542499
       var blob = new Blob([content], {type: 'text/plain'});
@@ -329,9 +329,19 @@ layout: default
 
   <div id="attribution" style="display:none;">
     <br />
+    <p><a href="http://communityrule.info">
+        <img src="https://img.shields.io/badge/CommunityRule-derived-000000" alt="CommunityRule derived"></a></p>
     <p>Created with <a href="http://communityrule.info">CommunityRule</a><br />
         <a href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons BY-SA</a></p>
   </div>
+  <div id="attributionMD" style="display:none;">
+---
+
+[![CommunityRule](https://img.shields.io/badge/CommunityRule-derived-000000)](http://communityrule.info)
+
+Created with [CommunityRule](http://communityrule.info)
+[Creative Commons BY-SA](http://creativecommons.org/licenses/by-sa/4.0/).
+  </div>
   
   </div><!--#rulebox-->