123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- ---
- layout: default
- ---
- <style type="text/css">
- #rulename {
- font-size: 1.2em;
- }
- </style>
- <script>
- function printLibrary() {
- const store = new SteinStore(
- "https://api.steinhq.com/v1/storages/5e8b937ab88d3d04ae0816a5"
- );
- var rules = "";
- store.read("rules", { limit: 0, offset: 0 }).then(data => {
- console.log(data);
- rules = data.reverse();
- libHTML = "";
- for (var i = 0; i < rules.length; i++) {
- var title = rules[i]["communityname"]
- if (title == null) { title = "Untitled"; }
- libHTML += "<h2 id='rulename'>" +
- "<a href='/create/?r=" + rules[i]["ruleID"] + "'>" +
- title + "</a></h2>\n";
- libHTML += "<p>" + rules[i]["structure"] + "</p>\n\n";
- }
- document.getElementById("libraryList").innerHTML = libHTML;
- });
- }
- window.onload = function() {
- printLibrary();
- }
- </script>
- <article class="post">
- <header class="post-header">
- <h1 class="post-title">{{ page.title }}</h1>
- </header>
- <div class="post-content">
- {{ content }}
- <hr /><br />
-
- <div id="libraryList">
- </div>
- </div>
- </article>
|