forked from Deyvid777/dozenvalues
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1 lines (1 loc) · 5.99 KB
/
index.html
1
<!DOCTYPE html><html><head><meta charset="utf-8"><title>Dozenvalues</title><link rel="shortcut icon" href="./assets/icon.png" type="image/x-icon"><link href="./assets/icon.png" type="image/x-icon"><meta property="og:title" content="Dozenvalues"><meta property="og:image" content="https://quark88.github.io/dozenvalues/assets/icon.png"><meta property="og:url" content="https://quark88.github.io/dozenvalues"><meta property="og:type" content="Political test"><meta property="og:locale" content="en_US"><meta property="og:description" content="DozenValues is a political test that aims to map differing political perspectives onto six axes."><link rel="stylesheet" href="./dist/style.css"></head><body><a class="github-corner" href="https://github.com/TomscisTests/dozenvalues" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#000000;color:#ffffff;position:absolute;top:0;border:0;right:0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin:130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><select id="langDropdown"></select><h1 id="title"></h1><div id="column-holder"></div><button id="start_button"></button><div class="small-button-holder"><button class="small-button" id="matches_button"></button><button class="small-button" id="lister_button"></button><button class="small-button" id="questions_button"></button></div><h2 id="whatis"></h2><p id="whatis_text"></p><h2 id="whatare12v"></h2><p id="whatare12v_text"></p><div id="values-explaination"></div><h2 id="whatisclosestmatch"></h2><p id="whatisclosestmatch_text"></p><div class="plainlinks"><h2 id="credits"></h2><p id="credits-list"></p></div><script type="module">import{getJson as e}from"./dist/common.js";!function(){const t=e("langs"),n=document.getElementById("langDropdown");let o=new Array;for(const e of t){const t=document.createElement("option");t.value=e.id,t.textContent=e.name,n.appendChild(t),o.push(e.id)}const a=new URLSearchParams(document.location.search),l=a.get("lang")??"en",c=t=>{try{!function(e,t){const n=document.getElementById("column-holder"),o=document.getElementById("values-explaination"),a=document.getElementById("credits-list"),l=e=>{for(;e.firstChild;)e.removeChild(e.firstChild)};l(n),l(o),l(a),document.getElementById("start_button").addEventListener("click",(()=>window.location.href="instructions.html?lang="+t)),document.getElementById("matches_button").addEventListener("click",(()=>window.location.href="matches.html?lang="+t)),document.getElementById("lister_button").addEventListener("click",(()=>window.location.href="lister.html?lang="+t)),document.getElementById("questions_button").addEventListener("click",(()=>window.location.href="questions.html?lang="+t));for(const t of e.axes){document.createElement("div").className="column";const e=document.createElement("div");e.className="block";const a=document.createElement("div");a.className="axis_label",a.textContent=t.axisname.toUpperCase(),e.appendChild(a);const l=e=>{const n=document.createElement("a");n.href="#anchor-"+t.axisname.toLowerCase();const o=new Image;return o.src=e.icon,o.className="quadcolumn",n.appendChild(o),n};e.appendChild(l(t.leftvalue)),e.appendChild(l(t.rightvalue)),n.appendChild(e);const c=document.createElement("div");c.className="spacer";const d=(e,t)=>{const n=document.createElement("div");n.className="explanation_blurb_"+e;const o=document.createElement("p");o.className="value";const a=document.createElement("b");a.textContent=t.name.toUpperCase(),a.style.color=t.color,o.appendChild(a);const l=document.createElement("p");return l.textContent=t.blurb,l.className="blurb-text",n.appendChild(o),n.appendChild(l),n};c.appendChild(d("left",t.leftvalue));const i=document.createElement("div"),s=document.createElement("p");s.textContent=t.axisname.toUpperCase(),s.className="axis_name";const r=document.createElement("a");r.id="anchor-"+t.axisname.toLowerCase(),i.appendChild(s),i.appendChild(r),i.innerHTML+='<svg xmlns="http://www.w3.org/2000/svg" width="71.2522" height="21.8695" viewBox="0 0 406.4 135.46666667" class="arrow"><path fill="none" stroke="#404040" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" d="m338.66666 101.6 50.8-33.866668-50.8-33.866666m-270.933328 0L16.933333 67.73333 67.733332 101.6M16.933333 67.73333H389.46666"></path></svg>',c.appendChild(i),c.appendChild(d("right",t.rightvalue)),o.appendChild(c)}for(const t of Object.keys(e.indextext.rawtext))document.getElementById(t).textContent=e.indextext.rawtext[t];for(const t of Object.keys(e.indextext.htmltext))document.getElementById(t).innerHTML=e.indextext.htmltext[t];document.title=e.indextext.rawtext.title;for(const n of e.indextext.creditslist){const e=document.createElement("div");e.textContent=n.role;const o=document.createElement("a");o.textContent=n.tag,o.href="./results.html?lang="+t+"&score="+n.score.map((e=>e.toFixed(1))).join(",")+"&send=no",e.appendChild(o),a.appendChild(e)}}(e("ui-"+t),t),a.set("lang",t);const l=document.location.origin+window.location.pathname+"?"+a.toString();window.history.replaceState(null,document.title,l),n.selectedIndex=o.indexOf(t,0)}catch(e){console.error(e),alert(t+" is not a valid language"),c("en")}};c(l),n.addEventListener("change",(()=>c(n.value)))}();</script></body></html>