|
@@ -7,6 +7,198 @@ layout: default
|
|
<script>
|
|
<script>
|
|
// Enter JavaScript-land!
|
|
// Enter JavaScript-land!
|
|
// First, some functions, followed by initialization commands
|
|
// First, some functions, followed by initialization commands
|
|
|
|
+
|
|
|
|
+ // Begin BUILDER functions
|
|
|
|
+ // source: https://www.codecanal.com/html5-drag-and-copy/
|
|
|
|
+ function allowDrop(ev) {
|
|
|
|
+ ev.preventDefault();
|
|
|
|
+ }
|
|
|
|
+ function drag(ev) {
|
|
|
|
+ ev.dataTransfer.setData("text", ev.target.id);
|
|
|
|
+ }
|
|
|
|
+ function drop(ev) {
|
|
|
|
+ ev.preventDefault();
|
|
|
|
+ var target = ev.target;
|
|
|
|
+ // First, confirm target location is valid
|
|
|
|
+ function targetCheck () {
|
|
|
|
+ if (target.id == "module-input") {
|
|
|
|
+ return true;
|
|
|
|
+ } else if (!document.getElementById("module-input").contains(target)) {
|
|
|
|
+ // Ignore destinations not in the correct area
|
|
|
|
+ return false;
|
|
|
|
+ } else if (target.id == "drag-directions") {
|
|
|
|
+ // Prevents dropping into dummy text field
|
|
|
|
+ target = target.parentElement;
|
|
|
|
+ return true;
|
|
|
|
+ } else if (target.classList[0] == "module") {
|
|
|
|
+ return true;
|
|
|
|
+ } else {
|
|
|
|
+ // be sure we're adding to module, not its children
|
|
|
|
+ target = target.parentElement;
|
|
|
|
+ return targetCheck();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!targetCheck()) { return; }
|
|
|
|
+ // Set up transfer
|
|
|
|
+ var data = ev.dataTransfer.getData("text");
|
|
|
|
+ // Iff module is from the menu clone it
|
|
|
|
+ var module = document.getElementById(data);
|
|
|
|
+ if (module.parentElement.id == "module-menu") {
|
|
|
|
+ module = module.cloneNode(true);
|
|
|
|
+ var name = null;
|
|
|
|
+ if (module.id == "module-custom") {
|
|
|
|
+ // For custom modules: replace the <input> with text
|
|
|
|
+ name = module.getElementsByTagName("input")[0].value;
|
|
|
|
+ module.getElementsByTagName("input")[0].remove();
|
|
|
|
+ var customText = document.createElement("span");
|
|
|
|
+ customText.onClick = "moduleEditField(this.parentNode.id)";
|
|
|
|
+ customText.id = "module-name";
|
|
|
|
+ customText.append(name);
|
|
|
|
+ module.prepend(customText);
|
|
|
|
+ }
|
|
|
|
+ // append id with unique timestamp
|
|
|
|
+ var nowModule = new Date();
|
|
|
|
+ module.id += "-" + nowModule.getTime();
|
|
|
|
+ }
|
|
|
|
+ // display the deletion button
|
|
|
|
+ module.children[2].style.display = "inline";
|
|
|
|
+ // pop it in!
|
|
|
|
+ target.appendChild(module);
|
|
|
|
+ // set up the editing field
|
|
|
|
+ moduleEditField(module.id);
|
|
|
|
+ // be sure the dummy text is gone
|
|
|
|
+ if (document.contains(document.getElementById("drag-directions"))) {
|
|
|
|
+ document.getElementById("drag-directions").remove();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Edits the title field of a given module based on #custom-field
|
|
|
|
+ function moduleTitleEdit(moduleID) {
|
|
|
|
+ var module = document.getElementById(moduleID).children[0];
|
|
|
|
+ var content =
|
|
|
|
+ stripHTML(document.getElementById("custom-field").innerHTML);
|
|
|
|
+ module.title = content;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Sets up a field for displaying and editing module details
|
|
|
|
+ function moduleEditField(moduleID) {
|
|
|
|
+ var module = document.getElementById(moduleID);
|
|
|
|
+ var moduleName = module.children[0].innerHTML;
|
|
|
|
+ var moduleTitle = module.children[0].title;
|
|
|
|
+ if (editMode) {
|
|
|
|
+ var query = "Explain how the <strong>" + moduleName
|
|
|
|
+ + "</strong> module works.";
|
|
|
|
+ var destination = document.getElementById("builder-field");
|
|
|
|
+ if (moduleName == null) { moduleName = ""; }
|
|
|
|
+ var output = '\n<div id="custom-field-container">';
|
|
|
|
+ output += '<span class="question">' + query + '</span>';
|
|
|
|
+ output += '<div class="field-controls"><a onclick="this.parentNode.parentNode.remove()"><img src="{% link assets/tabler_icons/x.svg %}" class="delete-module" /></a></div>';
|
|
|
|
+ output += '<p contenteditable="true" class="editable" id="custom-field" oninput="moduleTitleEdit(\'' + moduleID + '\')">' + moduleTitle + '</p>';
|
|
|
|
+ output += '</div>\n';
|
|
|
|
+ destination.innerHTML = output;
|
|
|
|
+ } else {
|
|
|
|
+ var output = '\n<div id="custom-field-container">';
|
|
|
|
+ output += '<div class="field-controls"><a onclick="this.parentNode.parentNode.remove()"><img src="{% link assets/tabler_icons/x.svg %}" class="delete-module" /></a></div>';
|
|
|
|
+ output += '<p class="editable" id="custom-field">'
|
|
|
|
+ + moduleTitle + '</p>';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Tests if the RuleBuilder is empty
|
|
|
|
+ function builderEmpty() {
|
|
|
|
+ var builder = document.getElementById("module-input");
|
|
|
|
+ var childs = builder.children;
|
|
|
|
+ if (builder.getElementsByClassName("module").length > 0) {
|
|
|
|
+ return false;
|
|
|
|
+ } else {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Turns RuleBuilder contents into an output-ready nested array
|
|
|
|
+ // Returns empty array if no modules
|
|
|
|
+ function builderArray() {
|
|
|
|
+ var modules = document.getElementById("module-input").children;
|
|
|
|
+ // takes an array of children
|
|
|
|
+ // returns an array with all modules in the array, recursively nested
|
|
|
|
+ function iterateArray (childs) {
|
|
|
|
+ var moduleArray = [];
|
|
|
|
+ if (childs.length > 0) {
|
|
|
|
+ for (var i = 0; i < childs.length; i++) {
|
|
|
|
+ module = childs[i];
|
|
|
|
+ if (module.classList[0] == "module") {
|
|
|
|
+ var moduleName = module.children.item("module-name");
|
|
|
|
+ var moduleData = moduleName.title;
|
|
|
|
+ var moduleChilds = module.children;
|
|
|
|
+ moduleArray.push(
|
|
|
|
+ [stripHTML(moduleName.innerHTML),
|
|
|
|
+ stripHTML(moduleData),
|
|
|
|
+ iterateArray(moduleChilds)]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return moduleArray;
|
|
|
|
+ } // end function
|
|
|
|
+ return iterateArray(modules);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // returns HTML version of Builder content
|
|
|
|
+ function displayBuilderHTML() {
|
|
|
|
+ var output = "";
|
|
|
|
+ var mainArray = builderArray();
|
|
|
|
+ function arrayHTML(thisArray) {
|
|
|
|
+ var thisOutput = "";
|
|
|
|
+ if (thisArray.length > 0) {
|
|
|
|
+ thisOutput += '<ul class="builder-list">\n';
|
|
|
|
+ for (var i = 0; i < thisArray.length; i++) {
|
|
|
|
+ var item = thisArray[i];
|
|
|
|
+ thisOutput += '<li><strong>' + item[0] + '</strong> ';
|
|
|
|
+ thisOutput += item[1] + '</li>\n';
|
|
|
|
+ if (item[2].length > 0) {
|
|
|
|
+ thisOutput += arrayHTML(item[2]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ thisOutput += '</ul>\n';
|
|
|
|
+ }
|
|
|
|
+ return thisOutput
|
|
|
|
+ }
|
|
|
|
+ return arrayHTML(mainArray);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // returns Markdown version of Builder content
|
|
|
|
+ function displayBuilderMD() {
|
|
|
|
+ var mainArray = builderArray();
|
|
|
|
+ var indentLevel = 0;
|
|
|
|
+ function arrayMD(thisArray) {
|
|
|
|
+ var thisOutput = "";
|
|
|
|
+ if (thisArray.length > 0) {
|
|
|
|
+ for (var i = 0; i < thisArray.length; i++) {
|
|
|
|
+ var item = thisArray[i];
|
|
|
|
+ for (var x = 0; x < indentLevel; x++) {
|
|
|
|
+ thisOutput += " ";
|
|
|
|
+ }
|
|
|
|
+ thisOutput += "* **" + item[0] + "** ";
|
|
|
|
+ thisOutput += item[1] + "\n";
|
|
|
|
+ if (item[2].length > 0) {
|
|
|
|
+ indentLevel++;
|
|
|
|
+ thisOutput += arrayMD(item[2]);
|
|
|
|
+ indentLevel--;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ return thisOutput;
|
|
|
|
+ }
|
|
|
|
+ return arrayMD(mainArray);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // end RuleBuilder functions
|
|
|
|
+
|
|
|
|
+ // Removes all HTML content
|
|
|
|
+ function stripHTML(input) {
|
|
|
|
+ input = input.replace(/(<([^>]+)>)/ig,'');
|
|
|
|
+ return input;
|
|
|
|
+ }
|
|
|
|
|
|
// toggleVisible(id)
|
|
// toggleVisible(id)
|
|
// Toggles the visibility of a given element by given ID
|
|
// Toggles the visibility of a given element by given ID
|
|
@@ -37,6 +229,8 @@ layout: default
|
|
classDisplayAll("section","block");
|
|
classDisplayAll("section","block");
|
|
classDisplayAll("button","none");
|
|
classDisplayAll("button","none");
|
|
classDisplayAll("question","none");
|
|
classDisplayAll("question","none");
|
|
|
|
+ classDisplayAll("metaheader","none");
|
|
|
|
+ classDisplayAll("delete-module","none");
|
|
var editableFields = document.getElementsByClassName("editable");
|
|
var editableFields = document.getElementsByClassName("editable");
|
|
// de-editable-ize the editable fields
|
|
// de-editable-ize the editable fields
|
|
for (var i = 0; i < editableFields.length; i++) {
|
|
for (var i = 0; i < editableFields.length; i++) {
|
|
@@ -44,13 +238,23 @@ layout: default
|
|
editableFields[i].style.borderStyle = "none";
|
|
editableFields[i].style.borderStyle = "none";
|
|
// Remove empty fields entirely
|
|
// Remove empty fields entirely
|
|
var content = editableFields[i].innerHTML;
|
|
var content = editableFields[i].innerHTML;
|
|
- content = content.replace(/(<([^>]+)>)/ig,''); // strips stray tags
|
|
|
|
|
|
+ content = stripHTML(content);
|
|
if (content === "") {
|
|
if (content === "") {
|
|
editableFields[i].style.display = "none";
|
|
editableFields[i].style.display = "none";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // Remove headers of empty sections
|
|
|
|
- // Inefficient! Might be merged with the above iteration
|
|
|
|
|
|
+ // RuleBuilder sections
|
|
|
|
+ if (builderEmpty()) {
|
|
|
|
+ document.getElementById("rule-builder").style.display = "none";
|
|
|
|
+ } else {
|
|
|
|
+ document.getElementById("builder-field").innerHTML = displayBuilderHTML();
|
|
|
|
+ document.getElementById("module-input").style.border = "none";
|
|
|
|
+ }
|
|
|
|
+ if (document.contains(document.getElementById("custom-field-container"))) {
|
|
|
|
+ document.getElementById("custom-field-container").remove();
|
|
|
|
+ }
|
|
|
|
+ document.getElementById("module-menu").style.display = "none";
|
|
|
|
+ // RuleWriter: Remove headers of empty sections
|
|
var sections = document.getElementsByClassName("section");
|
|
var sections = document.getElementsByClassName("section");
|
|
for (var i = 0; i < sections.length; i++) {
|
|
for (var i = 0; i < sections.length; i++) {
|
|
var sectionQuestions = sections[i].getElementsByClassName("editable");
|
|
var sectionQuestions = sections[i].getElementsByClassName("editable");
|
|
@@ -65,8 +269,6 @@ layout: default
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // Handle links
|
|
|
|
- // TKTK
|
|
|
|
// Handle author link
|
|
// Handle author link
|
|
var authorName = document.getElementById("author-text").value;
|
|
var authorName = document.getElementById("author-text").value;
|
|
var authorURL = document.getElementById("author-url").value;
|
|
var authorURL = document.getElementById("author-url").value;
|
|
@@ -91,9 +293,14 @@ layout: default
|
|
classDisplayAll("editable","block");
|
|
classDisplayAll("editable","block");
|
|
classDisplayAll("header","block");
|
|
classDisplayAll("header","block");
|
|
classDisplayAll("section","none");
|
|
classDisplayAll("section","none");
|
|
|
|
+ classDisplayAll("metaheader","block");
|
|
classDisplayAll("link-text","inline");
|
|
classDisplayAll("link-text","inline");
|
|
classDisplayAll("link-url","inline");
|
|
classDisplayAll("link-url","inline");
|
|
- // link handling TKTK
|
|
|
|
|
|
+ classDisplayAll("delete-module","inline");
|
|
|
|
+ // builder handling
|
|
|
|
+ document.getElementById("rule-builder").style.display = "block";
|
|
|
|
+ document.getElementById("module-input").style.border = "";
|
|
|
|
+ document.getElementById("builder-field").innerHTML = "";
|
|
// author handling
|
|
// author handling
|
|
document.getElementById("authorship-result").style.display = "none";
|
|
document.getElementById("authorship-result").style.display = "none";
|
|
document.getElementById("authorship-words").style.display = "none";
|
|
document.getElementById("authorship-words").style.display = "none";
|
|
@@ -144,12 +351,16 @@ layout: default
|
|
var filename = 'GOVERNANCE.md';
|
|
var filename = 'GOVERNANCE.md';
|
|
// First, add title, whether there is one or not
|
|
// First, add title, whether there is one or not
|
|
var content = '# '+ document.getElementById('communityname').innerHTML + '\n\n';
|
|
var content = '# '+ document.getElementById('communityname').innerHTML + '\n\n';
|
|
- content = content.replace(/(<([^>]+)>)/ig,''); // strips stray tags
|
|
|
|
|
|
+ content = stripHTML(content);
|
|
|
|
+ // Add Builder content
|
|
|
|
+ if (!builderEmpty()) {
|
|
|
|
+ content += displayBuilderMD() + "\n\n";
|
|
|
|
+ }
|
|
// Now, begin adding other elements
|
|
// Now, begin adding other elements
|
|
var elements = document.getElementsByClassName('output');
|
|
var elements = document.getElementsByClassName('output');
|
|
for (var i = 1; i < elements.length; i++) {
|
|
for (var i = 1; i < elements.length; i++) {
|
|
var thisBit = elements[i].innerHTML;
|
|
var thisBit = elements[i].innerHTML;
|
|
- thisBit = thisBit.replace(/(<([^>]+)>)/ig,''); // strips stray tags
|
|
|
|
|
|
+ thisBit = stripHTML(thisBit);
|
|
if (thisBit != "") {
|
|
if (thisBit != "") {
|
|
if (elements[i].classList.contains("subhead")) {
|
|
if (elements[i].classList.contains("subhead")) {
|
|
// Before printing subhead, make sure it's not empty
|
|
// Before printing subhead, make sure it's not empty
|
|
@@ -205,7 +416,7 @@ layout: default
|
|
// BEGIN Publish tools, via SteinHQ.com
|
|
// BEGIN Publish tools, via SteinHQ.com
|
|
|
|
|
|
// publishRule()
|
|
// publishRule()
|
|
- // Publishes existing fields to new page, /create/?rule=[ruleID]
|
|
|
|
|
|
+ // Publishes existing fields to new page, /builder/?rule=[ruleID]
|
|
// Opens new page in Display mode
|
|
// Opens new page in Display mode
|
|
function publishRule() {
|
|
function publishRule() {
|
|
// Confirm user knows what they're getting into
|
|
// Confirm user knows what they're getting into
|
|
@@ -224,6 +435,13 @@ layout: default
|
|
ruleID: timeID,
|
|
ruleID: timeID,
|
|
timestamp: dateTime,
|
|
timestamp: dateTime,
|
|
}];
|
|
}];
|
|
|
|
+ // begin adding data
|
|
|
|
+ // first, RuleBuilder data
|
|
|
|
+ document.getElementById("builder-field").innerHTML = ""; // so it doesn't publish
|
|
|
|
+ if (!builderEmpty()) {
|
|
|
|
+ rule[0]["modules"] = document.getElementById("module-input").innerHTML;
|
|
|
|
+ }
|
|
|
|
+ // next, RuleWriter data
|
|
var fields = document.getElementsByClassName("editable");
|
|
var fields = document.getElementsByClassName("editable");
|
|
for (var i = 0; i < fields.length; i++) {
|
|
for (var i = 0; i < fields.length; i++) {
|
|
var key = fields[i].id;
|
|
var key = fields[i].id;
|
|
@@ -250,6 +468,7 @@ layout: default
|
|
"https://api.steinhq.com/v1/storages/5e8b937ab88d3d04ae0816a5"
|
|
"https://api.steinhq.com/v1/storages/5e8b937ab88d3d04ae0816a5"
|
|
);
|
|
);
|
|
store.read("rules", { search: { ruleID: ID } }).then(data => {
|
|
store.read("rules", { search: { ruleID: ID } }).then(data => {
|
|
|
|
+ // reads sheet variable from below
|
|
// only runs when we have the data from Goog:
|
|
// only runs when we have the data from Goog:
|
|
var rule = data[0];
|
|
var rule = data[0];
|
|
var fields = document.getElementsByClassName("editable");
|
|
var fields = document.getElementsByClassName("editable");
|
|
@@ -264,6 +483,8 @@ layout: default
|
|
document.getElementById(key).innerHTML = value;
|
|
document.getElementById(key).innerHTML = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // Add Builder content
|
|
|
|
+ document.getElementById("module-input").innerHTML = rule["modules"];
|
|
// Publish timestamp to Rule
|
|
// Publish timestamp to Rule
|
|
document.getElementById('dateTime').innerHTML = rule['timestamp'];
|
|
document.getElementById('dateTime').innerHTML = rule['timestamp'];
|
|
// Finish
|
|
// Finish
|
|
@@ -324,168 +545,188 @@ layout: default
|
|
</header>
|
|
</header>
|
|
|
|
|
|
<div id="rulebox">
|
|
<div id="rulebox">
|
|
- <span class="question">What is the community’s name?</span>
|
|
|
|
|
|
|
|
|
|
+ <span class="question">What is the community’s name?</span>
|
|
<h1 contenteditable="true" class="editable output" id="communityname">{{ page.community-name }}</h1>
|
|
<h1 contenteditable="true" class="editable output" id="communityname">{{ page.community-name }}</h1>
|
|
|
|
|
|
- <!-- SECTION S1: BASICS -->
|
|
|
|
- <h2 id="header-s1" class="header">
|
|
|
|
- <img src="{% link assets/tabler_icons/info-circle.svg %}"
|
|
|
|
- class="icons" />
|
|
|
|
- <span class="subhead output">Basics</span>
|
|
|
|
- <button onclick="toggleVisible('s1')" class="button plus"><img src="{% link assets/tabler_icons/plus.svg %}" title="Expand" /></button>
|
|
|
|
- </h2>
|
|
|
|
- <div class="section" id="s1" style="display:none">
|
|
|
|
-
|
|
|
|
- <span class="question">What is the basic structure of the community?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/federation/">federation</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/friendship/">friendship</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/membership/">membership</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/multicameralism/">multicameralism</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/ritual/">ritual</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/separation_of_powers/">separation of powers</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/stake_weight/">stake weight</a></span>
|
|
|
|
- </div>
|
|
|
|
- <p contenteditable="true" class="editable output" id="structure">{{ page.structure }}</p>
|
|
|
|
|
|
+ <!-- RuleBuilder -->
|
|
|
|
|
|
- <span class="question">What is the community’s mission?</span>
|
|
|
|
- <p contenteditable="true" class="editable output" id="mission">{{ page.mission }}</p>
|
|
|
|
|
|
+ <div id="rule-builder">
|
|
|
|
|
|
- <span class="question">What core values does the community hold?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/secrecy/">secrecy</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/solidarity/">solidarity</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/transparency/">transparency</a></span>
|
|
|
|
|
|
+ <button id="module-toggle" onclick="toggleVisible('module-menu')"
|
|
|
|
+ class="button" title="Show/hide">
|
|
|
|
+ <img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
+ </button>
|
|
|
|
+
|
|
|
|
+ <div id="module-input"
|
|
|
|
+ ondrop="drop(event)" ondragover="allowDrop(event)">
|
|
|
|
+ <span class="question" id="drag-directions">Browse modules with the tool button and drag them here.</span>
|
|
</div>
|
|
</div>
|
|
- <p contenteditable="true" class="editable output" id="values">{{ page.values }}</p>
|
|
|
|
- <span class="question">What is the legal status of the community’s assets and creations?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/ownership/">ownership</a></span>
|
|
|
|
|
|
+
|
|
|
|
+ <div id="builder-field">
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div id="module-menu" style="display:none;">
|
|
|
|
+ <!-- Customizable module -->
|
|
|
|
+ <span class="module" id="module-custom"
|
|
|
|
+ draggable="true" ondragstart="drag(event)">
|
|
|
|
+ <input contenteditable="true" placeholder="Custom..."/>
|
|
|
|
+ <img src="{% link assets/tabler_icons/bulb.svg %}" class="module-logo"
|
|
|
|
+ draggable="false" />
|
|
|
|
+ <a onclick="this.parentNode.remove()" class="delete-module"
|
|
|
|
+ style="display:none">
|
|
|
|
+ <img src="{% link assets/tabler_icons/x.svg %}" /></a>
|
|
|
|
+ </span>
|
|
|
|
+ <!-- Load preset modules from _data/modules.csv -->
|
|
|
|
+ {% for module in site.data.modules %}
|
|
|
|
+ <span class="module" id="module-{{ module.id }}"
|
|
|
|
+ draggable="true" ondragstart="drag(event)">
|
|
|
|
+ <span id="module-name"
|
|
|
|
+ onclick="moduleEditField(this.parentNode.id)">{{ module.name }}</span>
|
|
|
|
+ <a target="_blank" href="{{ module.url }}">
|
|
|
|
+ <img title="{{ module.type }}" 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 %}
|
|
</div>
|
|
</div>
|
|
- <p contenteditable="true" class="editable output" id="legal">{{ page.legal }}</p>
|
|
|
|
|
|
|
|
-
|
|
|
|
- </div><!--hiding section s1-->
|
|
|
|
-
|
|
|
|
- <!-- SECTION s2: PARTICIPANTS -->
|
|
|
|
- <h2 id="header-s2" class="header">
|
|
|
|
- <img src="{% link assets/tabler_icons/user.svg %}"
|
|
|
|
- class="icons" />
|
|
|
|
- <span class="subhead output">Participants</span>
|
|
|
|
- <button onclick="toggleVisible('s2')" class="button plus"><img src="{% link assets/tabler_icons/plus.svg %}" title="Expand" /></button>
|
|
|
|
- </h2>
|
|
|
|
-
|
|
|
|
- <div class="section" id="s2" style="display:none">
|
|
|
|
-
|
|
|
|
- <span class="question">How does someone become a participant?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/do-ocracy/">do-ocracy</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/friendship/">friendship</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/membership/">membership</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/reputation/">reputation</a></span>
|
|
|
|
- </div>
|
|
|
|
- <p contenteditable="true" class="editable output" id="membership">{{ page.membership }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">How are participants suspended or removed?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/exclusion/">exclusion</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/friendship/">friendship</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/reputation/">reputation</a></span>
|
|
|
|
- </div>
|
|
|
|
- <p contenteditable="true" class="editable output" id="removal">{{ page.removal }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">What special roles can participants hold, and how are roles assigned?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/delegation/">delegation</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/representation/">representation</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/separation_of_powers/">separation of powers</a></span>
|
|
|
|
- </div>
|
|
|
|
- <p contenteditable="true" class="editable output" id="roles">{{ page.roles }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">Are there limits on the terms or powers of participant roles?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/fact_finding/">fact-finding</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/ranked_choice/">ranked choice</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/representation/">representation</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/reputation/">reputation</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/sortition/">sortition</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/term_limit/">term limits</a></span>
|
|
|
|
- </div>
|
|
|
|
- <p contenteditable="true" class="editable output" id="limits">{{ page.limits }}</p>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- </div><!--hiding section s2-->
|
|
|
|
-
|
|
|
|
- <!--SECTION s3: POLICY-->
|
|
|
|
- <h2 id="header-s3" class="header">
|
|
|
|
- <img src="{% link assets/tabler_icons/news.svg %}"
|
|
|
|
- class="icons" />
|
|
|
|
- <span class="subhead output">Policy</span>
|
|
|
|
- <button onclick="toggleVisible('s3')" class="button plus"><img src="{% link assets/tabler_icons/plus.svg %}" title="Expand" /></button>
|
|
|
|
- </h2>
|
|
|
|
- <div class="section" id="s3" style="display:none">
|
|
|
|
-
|
|
|
|
- <span class="question">What basic rights does this Rule guarantee?</span>
|
|
|
|
- <p contenteditable="true" class="editable output" id="rights">{{ page.rights }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">Who has the capacity to decide on policies, and how do they do so?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/disapproval_voting/">disapproval voting</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/do-ocracy/">do-ocracy</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/holographic_consensus/">holographic consensus</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/quadratic_voting/">quadratic voting</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/referendum/">referendum</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/representation/">representation</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/sortition/">sortition</a></span>
|
|
|
|
- </div>
|
|
|
|
- <p contenteditable="true" class="editable output" id="decision">{{ page.decision }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">How are policies implemented?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/exclusion/">exclusion</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/lazy_consensus/">lazy consensus</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/restorative_justice/">restorative justice</a></span>
|
|
|
|
- </div>
|
|
|
|
- <p contenteditable="true" class="editable output" id="implementation">{{ page.implementation }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">How does the community monitor and evaluate its policy implementation? </span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/board/">board</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/disapproval_voting/">disapproval voting</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/judiciary/">jury</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/precedent/">precedent</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/refusal/">refusal</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/rough_consensus/">rough consensus</a></span>
|
|
|
|
- </div>
|
|
|
|
- <p contenteditable="true" class="editable output" id="oversight">{{ page.oversight }}</p>
|
|
|
|
-
|
|
|
|
- </div><!--hiding section s3-->
|
|
|
|
-
|
|
|
|
- <!-- SECTION s4: PROCESS -->
|
|
|
|
- <h2 id="header-s4" class="header">
|
|
|
|
- <img src="{% link assets/tabler_icons/refresh.svg %}"
|
|
|
|
- class="icons" />
|
|
|
|
- <span class="subhead output">Process</span>
|
|
|
|
- <button onclick="toggleVisible('s4')" class="button plus"><img src="{% link assets/tabler_icons/plus.svg %}" title="Expand" /></button>
|
|
|
|
- </h2>
|
|
|
|
- <div class="section" id="s4" style="display:none">
|
|
|
|
-
|
|
|
|
- <span class="question">Where does the community deliberate about policies and governance?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/caucus/">caucus</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/coalition/">coalition</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/board/">board</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/debate/">debate</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/lobbying/">lobbying</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/recess/">recess</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/secrecy/">secrecy</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/transparency/">transparency</a></span>
|
|
|
|
- </div>
|
|
|
|
- <p contenteditable="true" class="editable output" id="deliberation">{{ page.deliberation }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">How does the community manage access to administrative accounts and other tools?</span>
|
|
|
|
- <p contenteditable="true" class="editable output" id="access">{{ page.access }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">How does the community manage funds and economic flows?</span>
|
|
|
|
- <p contenteditable="true" class="editable output" id="economics">{{ page.economics }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">How are grievances among participants addressed?</span>
|
|
|
|
- <div class="button"><img src="{% link assets/tabler_icons/tool.svg %}" title="Modules" />
|
|
|
|
- <span class="tooltiptext modules"><a target="_blank" class="module" href="https://democraticmediums.info/mediums/audit/">audit</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/debate/">debate</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/friendship/">friendship</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/restorative_justice/">restorative justice</a> <a target="_blank" class="module" href="https://democraticmediums.info/mediums/recess/">recess</a></span>
|
|
|
|
</div>
|
|
</div>
|
|
- <p contenteditable="true" class="editable output" id="grievances">{{ page.grievances }}</p>
|
|
|
|
-
|
|
|
|
- </div><!--hiding section s4-->
|
|
|
|
-
|
|
|
|
- <!-- SECTION s5: EVOLUTION -->
|
|
|
|
- <h2 id="header-s5" class="header">
|
|
|
|
- <img src="{% link assets/tabler_icons/adjustments.svg %}"
|
|
|
|
- class="icons" />
|
|
|
|
- <span class="subhead output">Evolution</span>
|
|
|
|
- <button onclick="toggleVisible('s5')" class="button plus"><img src="{% link assets/tabler_icons/plus.svg %}" title="Expand" /></button>
|
|
|
|
- </h2>
|
|
|
|
- <div class="section" id="s5" style="display:none">
|
|
|
|
-
|
|
|
|
- <span class="question">Where are policies and records kept?</span>
|
|
|
|
- <p contenteditable="true" class="editable output" id="records">{{ page.records }}</p>
|
|
|
|
-
|
|
|
|
- <span class="question">How can this Rule be modified?</span>
|
|
|
|
- <p contenteditable="true" class="editable output" id="modification">{{ page.modification }}</p>
|
|
|
|
-
|
|
|
|
- </div><!--hiding section s5-->
|
|
|
|
|
|
|
|
|
|
+ <div id="rule-writer">
|
|
|
|
+
|
|
|
|
+ <!-- SECTION S1: BASICS -->
|
|
|
|
+ <h2 id="header-s1" class="header">
|
|
|
|
+ <img src="{% link assets/tabler_icons/info-circle.svg %}"
|
|
|
|
+ class="icons" />
|
|
|
|
+ <span class="subhead output">Basics</span>
|
|
|
|
+ <button onclick="toggleVisible('s1')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
|
+ </h2>
|
|
|
|
+ <div class="section" id="s1" style="display:none">
|
|
|
|
+
|
|
|
|
+ <span class="question">What is the basic structure of the community?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="structure">{{ page.structure }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">What is the community’s mission?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="mission">{{ page.mission }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">What core values does the community hold?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="values">{{ page.values }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">What is the legal status of the community’s assets and creations?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="legal">{{ page.legal }}</p>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </div><!--hiding section s1-->
|
|
|
|
+
|
|
|
|
+ <!-- SECTION s2: PARTICIPANTS -->
|
|
|
|
+ <h2 id="header-s2" class="header">
|
|
|
|
+ <img src="{% link assets/tabler_icons/user.svg %}"
|
|
|
|
+ class="icons" />
|
|
|
|
+ <span class="subhead output">Participants</span>
|
|
|
|
+ <button onclick="toggleVisible('s2')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
|
+ </h2>
|
|
|
|
+ <div class="section" id="s2" style="display:none">
|
|
|
|
+
|
|
|
|
+ <span class="question">How does someone become a participant?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="membership">{{ page.membership }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">How are participants suspended or removed?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="removal">{{ page.removal }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">What special roles can participants hold, and how are roles assigned?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="roles">{{ page.roles }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">Are there limits on the terms or powers of participant roles?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="limits">{{ page.limits }}</p>
|
|
|
|
+
|
|
|
|
+ </div><!--hiding section s2-->
|
|
|
|
+
|
|
|
|
+ <!--SECTION s3: POLICY-->
|
|
|
|
+ <h2 id="header-s3" class="header">
|
|
|
|
+ <img src="{% link assets/tabler_icons/news.svg %}"
|
|
|
|
+ class="icons" />
|
|
|
|
+ <span class="subhead output">Policy</span>
|
|
|
|
+ <button onclick="toggleVisible('s3')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
|
+ </h2>
|
|
|
|
+ <div class="section" id="s3" style="display:none">
|
|
|
|
+
|
|
|
|
+ <span class="question">What basic rights does this Rule guarantee?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="rights">{{ page.rights }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">Who has the capacity to decide on policies, and how do they do so?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="decision">{{ page.decision }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">How are policies implemented?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="implementation">{{ page.implementation }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">How does the community monitor and evaluate its policy implementation? </span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="oversight">{{ page.oversight }}</p>
|
|
|
|
+
|
|
|
|
+ </div><!--hiding section s3-->
|
|
|
|
+
|
|
|
|
+ <!-- SECTION s4: PROCESS -->
|
|
|
|
+ <h2 id="header-s4" class="header">
|
|
|
|
+ <img src="{% link assets/tabler_icons/refresh.svg %}"
|
|
|
|
+ class="icons" />
|
|
|
|
+ <span class="subhead output">Process</span>
|
|
|
|
+ <button onclick="toggleVisible('s4')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
|
+ </h2>
|
|
|
|
+ <div class="section" id="s4" style="display:none">
|
|
|
|
+
|
|
|
|
+ <span class="question">Where does the community deliberate about policies and governance?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="deliberation">{{ page.deliberation }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">How does the community manage access to administrative accounts and other tools?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="access">{{ page.access }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">How does the community manage funds and economic flows?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="economics">{{ page.economics }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">How are grievances among participants addressed?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="grievances">{{ page.grievances }}</p>
|
|
|
|
+
|
|
|
|
+ </div><!--hiding section s4-->
|
|
|
|
+
|
|
|
|
+ <!-- SECTION s5: EVOLUTION -->
|
|
|
|
+ <h2 id="header-s5" class="header">
|
|
|
|
+ <img src="{% link assets/tabler_icons/adjustments.svg %}"
|
|
|
|
+ class="icons" />
|
|
|
|
+ <span class="subhead output">Evolution</span>
|
|
|
|
+ <button onclick="toggleVisible('s5')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
|
+ </h2>
|
|
|
|
+ <div class="section" id="s5" style="display:none">
|
|
|
|
+
|
|
|
|
+ <span class="question">Where are policies and records kept?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="records">{{ page.records }}</p>
|
|
|
|
+
|
|
|
|
+ <span class="question">How can this Rule be modified?</span>
|
|
|
|
+ <p contenteditable="true" class="editable output" id="modification">{{ page.modification }}</p>
|
|
|
|
+
|
|
|
|
+ </div><!--hiding section s5-->
|
|
|
|
+
|
|
|
|
+ </div><!--end: rule-writer-->
|
|
|
|
+
|
|
<div id="authorship" class="linkbox">
|
|
<div id="authorship" class="linkbox">
|
|
<span id="authorship-words">Created by</span>
|
|
<span id="authorship-words">Created by</span>
|
|
- <input contenteditable="true" class="editable link-text" id="author-text" placeholder="Created by">
|
|
|
|
|
|
+ <input contenteditable="true" class="editable link-text" id="author-text" placeholder="Created by" />
|
|
<span class="link-divider"><img src="{% link assets/tabler_icons/pencil.svg %}" title="Add link" /></span>
|
|
<span class="link-divider"><img src="{% link assets/tabler_icons/pencil.svg %}" title="Add link" /></span>
|
|
- <input contenteditable="true" class="editable link-url" id="author-url" placeholder="Creator URL (http://, https://)" type="url" pattern="http://.*|https://.*">
|
|
|
|
|
|
+ <input contenteditable="true" class="editable link-url" id="author-url" placeholder="Creator URL (http://, https://)" type="url" pattern="http://.*|https://.*" />
|
|
<span id="authorship-result"></span>
|
|
<span id="authorship-result"></span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div><!--#rulebox-->
|
|
</div><!--#rulebox-->
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
<div id="attribution" style="display:none;">
|
|
<div id="attribution" style="display:none;">
|
|
<br />
|
|
<br />
|
|
<p><a href="https://communityrule.info">
|
|
<p><a href="https://communityrule.info">
|
|
@@ -502,7 +743,6 @@ layout: default
|
|
|
|
|
|
[Creative Commons BY-SA](https://creativecommons.org/licenses/by-sa/4.0/)</div>
|
|
[Creative Commons BY-SA](https://creativecommons.org/licenses/by-sa/4.0/)</div>
|
|
|
|
|
|
-
|
|
|
|
<button class="pushButton" id="publishRule" onclick="publishRule()"
|
|
<button class="pushButton" id="publishRule" onclick="publishRule()"
|
|
title="Add to the public Library">Publish</button>
|
|
title="Add to the public Library">Publish</button>
|
|
<button class="pushButton" id="toggleDisplayMode" onclick="toggleDisplayMode()"
|
|
<button class="pushButton" id="toggleDisplayMode" onclick="toggleDisplayMode()"
|
|
@@ -516,7 +756,7 @@ layout: default
|
|
onclick="javascript:location.href='https://www.colorado.edu/lab/medlab/content/communityrule-user-feedback'">
|
|
onclick="javascript:location.href='https://www.colorado.edu/lab/medlab/content/communityrule-user-feedback'">
|
|
Feedback
|
|
Feedback
|
|
</button>
|
|
</button>
|
|
-
|
|
|
|
|
|
+
|
|
</article>
|
|
</article>
|
|
|
|
|
|
|
|
|