1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- ---
- 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";
- var structure = rules[i]["structure"];
- if (structure != null) {
- libHTML += "<p>" + structure;
- var author = rules[i]["author-text"];
- if (author != null) {
- libHTML += " (" + author + ")";
- }
- libHTML += "</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>
|