rule.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. ---
  2. layout: default
  3. # This is where most of the code for CommunityRule lives
  4. # Follow comments below in various sections for further explanation
  5. ---
  6. <style type="text/css">
  7. /* CLASSES */
  8. .editable { /* All editable fields */
  9. padding: 10px 10px 10px 10px;
  10. min-height: 1.5em;
  11. font-family: serif;
  12. border-bottom: 1px dashed gray;
  13. }
  14. .question {
  15. color: gray;
  16. }
  17. /* Tooltip for Modules
  18. https://www.w3schools.com/css/tryit.asp?filename=trycss_tooltip_right
  19. This could bear substantial improvement. */
  20. .button {
  21. position: relative;
  22. display: inline-block;
  23. float: right;
  24. border: 1px solid gray;
  25. color: gray;
  26. background-color: white;
  27. text-align: center;
  28. border-radius: 6px;
  29. padding: 0 5px 0 5px;
  30. }
  31. .button .tooltiptext {
  32. visibility: hidden;
  33. width: 250px;
  34. border: 1px solid black;
  35. background-color: white;
  36. text-align: center;
  37. border-radius: 6px;
  38. padding: 5px 0;
  39. /* Position the tooltip */
  40. position: absolute;
  41. z-index: 1;
  42. right: 100%;
  43. }
  44. .button:hover {
  45. background-color: lightgray;
  46. }
  47. .button:hover .tooltiptext {
  48. visibility: visible;
  49. }
  50. /* pushButton
  51. These are the major functional buttons*/
  52. .pushButton {
  53. border: 1px solid gray;
  54. color: gray;
  55. background-color: white;
  56. text-align: center;
  57. border-radius: 6px;
  58. padding: 5px;
  59. font-size: 1.2em;
  60. }
  61. .pushButton:hover {
  62. background-color: lightgray;
  63. }
  64. .plus { /* The maximize/minimize button */
  65. font-size: 1em;
  66. }
  67. .icons {
  68. /* icons are from https://github.com/tabler/tabler-icons */
  69. margin: 0 5px 0 0;
  70. }
  71. /* VARIOUS IDs */
  72. #rulebox {
  73. border: 1px solid lightgray;
  74. padding: 20px;
  75. margin: 20px 0 30px 0;
  76. }
  77. #rulebox h2 {
  78. font-family: serif;
  79. }
  80. #communityname {
  81. font-weight: bold;
  82. }
  83. #editToggle {
  84. float: right;
  85. clear: both;
  86. }
  87. #toggleDisplayMode {
  88. margin: 0 0 10px 0;
  89. display: none;
  90. }
  91. #publishRule {
  92. margin: 0 0 10px 0;
  93. }
  94. #structure {
  95. font-size: 1.3em;
  96. }
  97. #attribution {
  98. font-family: serif;
  99. font-size: .8em;
  100. text-align: right;
  101. }
  102. #trash {
  103. display: none;
  104. }
  105. </style>
  106. <script>
  107. // Enter JavaScript-land!
  108. // First, some functions, followed by initialization commands
  109. // toggleVisible(id)
  110. // Toggles the visibility of a given element by given ID
  111. function toggleVisible(id) {
  112. var x = document.getElementById(id);
  113. if (x.style.display === "none") {
  114. x.style.display = "block";
  115. } else {
  116. x.style.display = "none";
  117. }
  118. }
  119. // classDisplayAll(className, value)
  120. // Assigns given display value to all elements with a given className
  121. function classDisplayAll(className, value) {
  122. var elements = document.getElementsByClassName(className);
  123. for (var i = 0; i < elements.length; i++) {
  124. elements[i].style.display = value;
  125. }
  126. }
  127. // toggleEditMode()
  128. // Toggles whether editable fields are editable or not
  129. // and removes editing tools.
  130. function toggleEditMode() {
  131. if (editMode === true) {
  132. editMode = false;
  133. classDisplayAll("section","block");
  134. classDisplayAll("button","none");
  135. classDisplayAll("question","none");
  136. var editableFields = document.getElementsByClassName("editable");
  137. // de-editable-ize the editable fields
  138. for (var i = 0; i < editableFields.length; i++) {
  139. editableFields[i].contentEditable = "false";
  140. editableFields[i].style.borderStyle = "none";
  141. // Remove empty fields entirely
  142. var content = editableFields[i].innerHTML;
  143. content = content.replace(/(<([^>]+)>)/ig,''); // strips stray tags
  144. if (content === "") {
  145. editableFields[i].style.display = "none";
  146. }
  147. }
  148. // Remove headers of empty sections
  149. // Inefficient! Might be merged with the above iteration
  150. var sections = document.getElementsByClassName("section");
  151. for (var i = 0; i < sections.length; i++) {
  152. var sectionQuestions = sections[i].getElementsByClassName("editable");
  153. var blanks = 0;
  154. for (var x = 0; x < sectionQuestions.length; x++) {
  155. var content = sectionQuestions[x].innerHTML;
  156. content = content.replace(/(<([^>]+)>)/ig,''); // strips stray tags
  157. if (content == "") { blanks++; }
  158. if (blanks == sectionQuestions.length) {
  159. var headerID = "header-s" + (i + 1);
  160. document.getElementById(headerID).style.display = "none";
  161. }
  162. }
  163. }
  164. // Finally, change button name
  165. document.getElementById("editToggle").innerHTML = "Customize";
  166. } else {
  167. editMode = true;
  168. classDisplayAll("button","block");
  169. classDisplayAll("question","block");
  170. classDisplayAll("editable","block");
  171. classDisplayAll("header","block");
  172. classDisplayAll("section","none");
  173. var editableFields = document.getElementsByClassName("editable");
  174. for (var i = 0; i < editableFields.length; i++) {
  175. editableFields[i].style.borderStyle = "none none dashed none";
  176. editableFields[i].contentEditable = "true";
  177. }
  178. // Change button name
  179. document.getElementById("editToggle").innerHTML = "Preview";
  180. }
  181. }
  182. // toggleDisplayMode()
  183. // toggles full displayMode, the Rule-only display for a published Rule
  184. // first, initialize variable:
  185. var displayMode = false;
  186. function toggleDisplayMode() {
  187. if (displayMode == false) {
  188. editMode = true;
  189. toggleEditMode(); // turns off editMode
  190. classDisplayAll("site-nav","none");
  191. classDisplayAll("post-header","none");
  192. classDisplayAll("site-footer","none");
  193. document.getElementById("attribution").style.display = "block";
  194. document.getElementById("toggleDisplayMode").style.display = "inline-block";
  195. document.getElementById("publishRule").style.display = "none";
  196. document.getElementById("trash").style.display = "inline-block";
  197. document.getElementById("title").innerHTML =
  198. document.getElementById("communityname").innerHTML + " / CommunityRule";
  199. displayMode = true;
  200. } else {
  201. toggleEditMode() // turns on editMode
  202. classDisplayAll("site-nav","block");
  203. classDisplayAll("post-header","block");
  204. classDisplayAll("site-footer","block");
  205. document.getElementById("attribution").style.display = "none";
  206. document.getElementById("toggleDisplayMode").style.display = "none";
  207. document.getElementById("publishRule").style.display = "inline-block";
  208. document.getElementById("trash").style.display = "none";
  209. displayMode = false;
  210. }
  211. }
  212. // textOutput()
  213. // Produces Markdown rendition of Rule
  214. function textOutput() {
  215. var filename = 'CommunityRule.txt';
  216. var content = '# '+ document.getElementById('communityname').innerHTML + '\n\n';
  217. content = content.replace(/(<([^>]+)>)/ig,''); // strips stray tags
  218. var elements = document.getElementsByClassName('output');
  219. for (var i = 1; i < elements.length; i++) {
  220. var thisBit = elements[i].innerHTML;
  221. thisBit = thisBit.replace(/(<([^>]+)>)/ig,''); // strips stray tags
  222. if (thisBit != "") {
  223. if (elements[i].classList.contains("subhead")) {
  224. content += '## ';
  225. }
  226. content += elements[i].innerHTML + '\n\n';
  227. }
  228. }
  229. content += document.getElementById('attributionMD').innerHTML;
  230. // Starting here, see https://stackoverflow.com/a/33542499
  231. var blob = new Blob([content], {type: 'text/plain'});
  232. if(window.navigator.msSaveOrOpenBlob) {
  233. window.navigator.msSaveBlob(blob, filename);
  234. }
  235. else{
  236. var elem = window.document.createElement('a');
  237. elem.href = window.URL.createObjectURL(blob);
  238. elem.download = filename;
  239. document.body.appendChild(elem);
  240. elem.click();
  241. document.body.removeChild(elem);
  242. URL.revokeObjectURL(); // This needs an arg but I can't figure out what
  243. }
  244. var myFile = new Blob([fileContent], {type: 'text/plain'});
  245. window.URL = window.URL || window.webkitURL; document.getElementById('download').setAttribute('href',window.URL.createObjectURL(myFile));
  246. document.getElementById('download').setAttribute('download', fileName);
  247. }
  248. // BEGIN Publish tools, via SteinHQ.com
  249. // publishRule()
  250. // Publishes existing fields to new page, /create/?rule=[ruleID]
  251. // Opens new page in Display mode
  252. function publishRule() {
  253. var now = new Date();
  254. // Numerical ID for published Rule
  255. var timeID = now.getTime();
  256. // Readable UTC timestamp
  257. var dateTime = now.getUTCFullYear()+'.'+(now.getUTCMonth()+1)+'.'+now.getUTCDate()
  258. +' '+now.getUTCHours()+":"+ now.getUTCMinutes()+":"+now.getUTCSeconds()
  259. + ' UTC';
  260. // TKTK: Check if ruleID exists; while yes, replace and repeat
  261. var rule = [{
  262. ruleID: timeID,
  263. timestamp: dateTime,
  264. }];
  265. var fields = document.getElementsByClassName("editable");
  266. for (var i = 0; i < fields.length; i++) {
  267. var key = fields[i].id;
  268. var value = fields[i].innerHTML.replace(/(<([^>]+)>)/ig,"");
  269. rule[0][key] = value;
  270. }
  271. const store = new SteinStore(
  272. "https://api.steinhq.com/v1/storages/5e8b937ab88d3d04ae0816a5"
  273. );
  274. store.append("rules", rule).then(data => {
  275. window.open("/create/?r=" + timeID, "_self", false);
  276. });
  277. }
  278. // displayRule(ID)
  279. // Displays content based on ID
  280. function displayRule(ID) {
  281. const store = new SteinStore(
  282. "https://api.steinhq.com/v1/storages/5e8b937ab88d3d04ae0816a5"
  283. );
  284. store.read("rules", { search: { ruleID: ID } }).then(data => {
  285. // only runs when we have the data from Goog:
  286. var rule = data[0];
  287. var fields = document.getElementsByClassName("editable");
  288. for (var i = 0; i < fields.length; i++) {
  289. var key = fields[i].id;
  290. var value = rule[key];
  291. if (typeof value === "undefined") {
  292. value = "";
  293. }
  294. document.getElementById(key).innerHTML = value;
  295. }
  296. // Publish timestamp to Rule
  297. document.getElementById('dateTime').innerHTML = rule['timestamp'];
  298. // Finish
  299. displayMode = false;
  300. toggleDisplayMode();
  301. document.title = rule['communityname'] + " / CommunityRule";
  302. });
  303. }
  304. // deleteRule()
  305. // A temporary placeholder that sends an email requesting rule deletion
  306. function deleteRule() {
  307. var urlParamz = new URLSearchParams(window.location.search);
  308. var rID = urlParamz.get('r');
  309. window.open("mailto:medlab@colorado.edu?subject=Delete Rule request ("
  310. + rID + ")&body=Please explain your rationale:\n");
  311. }
  312. // END Publish tools
  313. // FINALLY, Page loading
  314. // First, grab the current URL
  315. var urlParams = new URLSearchParams(window.location.search);
  316. // Determine if it is a published Rule
  317. if (urlParams.has('r')) {
  318. // If so, grab the Rule from database and enter displayMode
  319. var rID = urlParams.get('r');
  320. displayRule(rID);
  321. } else {
  322. // Otherwise, open in editMode as default
  323. var editMode = true;
  324. // switch out of editMode in special cases
  325. window.onload = function() {
  326. if ((window.location.href.indexOf("/templates/") != -1) ||
  327. (window.location.href.indexOf("/about/") != -1)) {
  328. toggleEditMode();
  329. }
  330. }
  331. }
  332. </script>
  333. <article class="post">
  334. <header class="post-header">
  335. <h1 class="post-title" id="title">
  336. {{ page.title }}
  337. </h1>
  338. <button class="pushButton" id="editToggle" onclick="toggleEditMode()">
  339. Preview</button>
  340. <div class="post-content">
  341. {{ content }}
  342. </div>
  343. </header>
  344. <div id="rulebox">
  345. <span class="question">What is the community’s name?</span>
  346. <h1 contenteditable="true" class="editable output" id="communityname">{{ page.community-name }}</h1>
  347. <!-- SECTION S1: BASICS -->
  348. <h2 id="header-s1" class="header">
  349. <img src="{% link assets/tabler_icons/info-circle.svg %}"
  350. class="icons" />
  351. <span class="subhead output">Basics</span>
  352. <button onclick="toggleVisible('s1')" class="button plus"> + </button>
  353. </h2>
  354. <div class="section" id="s1" style="display:none">
  355. <span class="question">What is the basic structure of the community?</span>
  356. <div class="button">Modules
  357. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/federation/">federation</a>, <a target="_blank" href="https://democraticmediums.info/mediums/friendship/">friendship</a>, <a target="_blank" href="https://democraticmediums.info/mediums/membership/">membership</a>, <a target="_blank" href="https://democraticmediums.info/mediums/multicameralism/">multicameralism</a>, <a target="_blank" href="https://democraticmediums.info/mediums/ritual/">ritual</a>, <a target="_blank" href="https://democraticmediums.info/mediums/separation_of_powers/">separation of powers</a>, <a target="_blank" href="https://democraticmediums.info/mediums/stake_weight/">stake weight</a></span>
  358. </div>
  359. <p contenteditable="true" class="editable output" id="structure">{{ page.structure }}</p>
  360. <span class="question">What is the community’s mission?</span>
  361. <p contenteditable="true" class="editable output" id="mission">{{ page.mission }}</p>
  362. <span class="question">What core values does the community hold?</span>
  363. <div class="button">Modules
  364. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/secrecy/">secrecy</a>, <a target="_blank" href="https://democraticmediums.info/mediums/solidarity/">solidarity</a>, <a target="_blank" href="https://democraticmediums.info/mediums/transparency/">transparency</a></span>
  365. </div>
  366. <p contenteditable="true" class="editable output" id="values">{{ page.values }}</p>
  367. <span class="question">What is the legal status of the community’s assets and creations?</span>
  368. <div class="button">Modules
  369. <span class="tooltiptext"><a target="_blank" href="https://medlabboulder.gitlab.io/democraticmediums/mediums/ownership/">ownership</a></span>
  370. </div>
  371. <p contenteditable="true" class="editable output" id="legal">{{ page.legal }}</p>
  372. </div><!--hiding section s1-->
  373. <!-- SECTION s2: PARTICIPANTS -->
  374. <h2 id="header-s2" class="header">
  375. <img src="{% link assets/tabler_icons/user.svg %}"
  376. class="icons" />
  377. <span class="subhead output">Participants</span>
  378. <button onclick="toggleVisible('s2')" class="button plus"> + </button>
  379. </h2>
  380. <div class="section" id="s2" style="display:none">
  381. <span class="question">How does someone become a participant?</span>
  382. <div class="button">Modules
  383. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/do-ocracy/">do-ocracy</a>, <a target="_blank" href="https://democraticmediums.info/mediums/friendship/">friendship</a>, <a target="_blank" href="https://democraticmediums.info/mediums/membership/">membership</a>, <a target="_blank" href="https://democraticmediums.info/mediums/reputation/">reputation</a></span>
  384. </div>
  385. <p contenteditable="true" class="editable output" id="membership">{{ page.membership }}</p>
  386. <span class="question">How are participants suspended or removed?</span>
  387. <div class="button">Modules
  388. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/exclusion/">exclusion</a>, <a target="_blank" href="https://democraticmediums.info/mediums/friendship/">friendship</a>, <a target="_blank" href="https://democraticmediums.info/mediums/reputation/">reputation</a></span>
  389. </div>
  390. <p contenteditable="true" class="editable output" id="removal">{{ page.removal }}</p>
  391. <span class="question">What special roles can participants hold, and how are roles assigned?</span>
  392. <div class="button">Modules
  393. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/delegation/">delegation</a>, <a target="_blank" href="https://democraticmediums.info/mediums/representation/">representation</a>, <a target="_blank" href="https://democraticmediums.info/mediums/separation_of_powers/">separation of powers</a></span>
  394. </div>
  395. <p contenteditable="true" class="editable output" id="roles">{{ page.roles }}</p>
  396. <span class="question">Are there limits on the terms or powers of participant roles?</span>
  397. <div class="button">Modules
  398. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/fact_finding/">fact-finding</a>, <a target="_blank" href="https://democraticmediums.info/mediums/ranked_choice/">ranked choice</a>, <a target="_blank" href="https://democraticmediums.info/mediums/representation/">representation</a>, <a target="_blank" href="https://democraticmediums.info/mediums/reputation/">reputation</a>, <a target="_blank" href="https://democraticmediums.info/mediums/sortition/">sortition</a>, <a target="_blank" href="https://democraticmediums.info/mediums/term_limit/">term limits</a></span>
  399. </div>
  400. <p contenteditable="true" class="editable output" id="limits">{{ page.limits }}</p>
  401. </div><!--hiding section s2-->
  402. <!--SECTION s3: POLICY-->
  403. <h2 id="header-s3" class="header">
  404. <img src="{% link assets/tabler_icons/news.svg %}"
  405. class="icons" />
  406. <span class="subhead output">Policy</span>
  407. <button onclick="toggleVisible('s3')" class="button plus"> + </button>
  408. </h2>
  409. <div class="section" id="s3" style="display:none">
  410. <span class="question">What basic rights does this Rule guarantee?</span>
  411. <p contenteditable="true" class="editable output" id="rights">{{ page.rights }}</p>
  412. <span class="question">Who has the capacity to decide on policies, and how do they do so?</span>
  413. <div class="button">Modules
  414. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/disapproval_voting/">disapproval voting</a>, <a target="_blank" href="https://democraticmediums.info/mediums/do-ocracy/">do-ocracy</a>, <a target="_blank" href="https://democraticmediums.info/mediums/holographic_consensus/">holographic consensus</a>, <a target="_blank" href="https://democraticmediums.info/mediums/quadratic_voting/">quadratic voting</a>, <a target="_blank" href="https://democraticmediums.info/mediums/referendum/">referendum</a>, <a target="_blank" href="https://democraticmediums.info/mediums/representation/">representation</a>, <a target="_blank" href="https://democraticmediums.info/mediums/sortition/">sortition</a></span>
  415. </div>
  416. <p contenteditable="true" class="editable output" id="decision">{{ page.decision }}</p>
  417. <span class="question">How are policies implemented?</span>
  418. <div class="button">Modules
  419. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/exclusion/">exclusion</a>, <a target="_blank" href="https://democraticmediums.info/mediums/lazy_consensus/">lazy consensus</a>, <a target="_blank" href="https://democraticmediums.info/mediums/restorative_justice/">restorative justice</a></span>
  420. </div>
  421. <p contenteditable="true" class="editable output" id="implementation">{{ page.implementation }}</p>
  422. <span class="question">How does the community monitor and evaluate its policy implementation? </span>
  423. <div class="button">Modules
  424. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/board/">board</a>, <a target="_blank" href="https://democraticmediums.info/mediums/disapproval_voting/">disapproval voting</a>, <a target="_blank" href="https://democraticmediums.info/mediums/judiciary/">jury</a>, <a target="_blank" href="https://democraticmediums.info/mediums/precedent/">precedent</a>, <a target="_blank" href="https://democraticmediums.info/mediums/refusal/">refusal</a>, <a target="_blank" href="https://democraticmediums.info/mediums/rough_consensus/">rough consensus</a></span>
  425. </div>
  426. <p contenteditable="true" class="editable output" id="oversight">{{ page.oversight }}</p>
  427. </div><!--hiding section s3-->
  428. <!-- SECTION s4: PROCESS -->
  429. <h2 id="header-s4" class="header">
  430. <img src="{% link assets/tabler_icons/refresh.svg %}"
  431. class="icons" />
  432. <span class="subhead output">Process</span>
  433. <button onclick="toggleVisible('s4')" class="button plus"> + </button>
  434. </h2>
  435. <div class="section" id="s4" style="display:none">
  436. <span class="question">How does the community manage access to administrative accounts and other tools?</span>
  437. <p contenteditable="true" class="editable output" id="access">{{ page.access }}</p>
  438. <span class="question">How does the community manage funds and economic flows?</span>
  439. <p contenteditable="true" class="editable output" id="economics">{{ page.economics }}</p>
  440. <span class="question">Where does the community deliberate about policies and governance?</span>
  441. <div class="button">Modules
  442. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/caucus/">caucus</a>, <a target="_blank" href="https://democraticmediums.info/mediums/coalition/">coalition</a>, <a target="_blank" href="https://democraticmediums.info/mediums/board/">board</a>, <a target="_blank" href="https://democraticmediums.info/mediums/debate/">debate</a>, <a target="_blank" href="https://democraticmediums.info/mediums/lobbying/">lobbying</a>, <a target="_blank" href="https://democraticmediums.info/mediums/recess/">recess</a>, <a target="_blank" href="https://democraticmediums.info/mediums/secrecy/">secrecy</a>, <a target="_blank" href="https://democraticmediums.info/mediums/transparency/">transparency</a></span>
  443. </div>
  444. <p contenteditable="true" class="editable output" id="deliberation">{{ page.deliberation }}</p>
  445. <span class="question">How are grievances among participants addressed?</span>
  446. <div class="button">Modules
  447. <span class="tooltiptext"><a target="_blank" href="https://democraticmediums.info/mediums/audit/">audit</a>, <a target="_blank" href="https://democraticmediums.info/mediums/debate/">debate</a>, <a target="_blank" href="https://democraticmediums.info/mediums/friendship/">friendship</a>, <a target="_blank" href="https://democraticmediums.info/mediums/restorative_justice/">restorative justice</a>, <a target="_blank" href="https://democraticmediums.info/mediums/recess/">recess</a></span>
  448. </div>
  449. <p contenteditable="true" class="editable output" id="grievances">{{ page.grievances }}</p>
  450. </div><!--hiding section s4-->
  451. <!-- SECTION s5: EVOLUTION -->
  452. <h2 id="header-s5" class="header">
  453. <img src="{% link assets/tabler_icons/adjustments.svg %}"
  454. class="icons" />
  455. <span class="subhead output">Evolution</span>
  456. <button onclick="toggleVisible('s5')" class="button plus"> + </button>
  457. </h2>
  458. <div class="section" id="s5" style="display:none">
  459. <span class="question">Where are policies and records kept?</span>
  460. <p contenteditable="true" class="editable output" id="records">{{ page.records }}</p>
  461. <span class="question">How can this Rule be modified?</span>
  462. <p contenteditable="true" class="editable output" id="modification">{{ page.modification }}</p>
  463. </div><!--hiding section s5-->
  464. <div id="attribution" style="display:none;">
  465. <br />
  466. <p><a href="http://communityrule.info">
  467. <img src="https://img.shields.io/badge/CommunityRule-derived-000000" alt="CommunityRule derived"></a></p>
  468. <p id="dateTime"></p>
  469. <p>Created with <a href="http://communityrule.info">CommunityRule</a><br />
  470. <a href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons BY-SA</a></p>
  471. <p><strong>The Publish feature is experimental. Rules may be removed without notice</strong></p>
  472. </div>
  473. <div id="attributionMD" style="display:none;">
  474. ---
  475. [![CommunityRule derived]({% link assets/CommunityRule-derived-000000.svg %})](http://communityrule.info)
  476. Created with [CommunityRule](http://communityrule.info)
  477. [Creative Commons BY-SA](http://creativecommons.org/licenses/by-sa/4.0/).
  478. </div>
  479. </div><!--#rulebox-->
  480. <button class="pushButton" id="publishRule" onclick="publishRule()">Publish</button>
  481. <button class="pushButton" id="toggleDisplayMode" onclick="toggleDisplayMode()">Fork</button>
  482. <button class="pushButton" onclick="textOutput()">Markdown</button>
  483. <button class="pushButton" id="trash" onclick="deleteRule()">
  484. <img src="{% link assets/tabler_icons/trash.svg %}" title="Rule deletion request" />
  485. </button>
  486. </article>