-
Notifications
You must be signed in to change notification settings - Fork 0
/
results.html
1 lines (1 loc) · 8.5 KB
/
results.html
1
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>PCBvalues</title><link rel="icon" type="x-icon" href="./assets/icon.png"><link rel="shortcut icon" type="x-icon" href="./assets/icon.png"><meta name="theme-color" content="#000000" data-react-helmet="true"><meta property="og:ttl" content="600"><meta property="og:type" content="website"><meta property="og:site_name" content="pcbvalues.github.io"><meta property="og:url" content=":https://pcbvalues.github.io"><meta property="og:title" content="PCBvalues"><meta property="og:description" content="PCBvalues is a test for what kind of member of the political community you are and what camps you fall into."><meta property="og:image" content="https://pcbvalues.github.io/assets/icon.png"><meta property="og:image:width" content="250"><meta property="og:image:height" content="250"><link href="./dist/style.css" rel="stylesheet" type="text/css"></head><body><h1>PCBvalues</h1><h2>Results</h2><div class="results"><h2>Demeanor Axis: <span class="axis-labels" id="demeanor-label"></span></h2><div class="axis"><img class="value" id="img-sincerity" src="./assets/values/sincerity.svg"><div class="left-axis bar sincerity" id="bar-sincerity" style="background-color: #417CB1"><div class="text-wrapper-white" id="span-sincerity"></div></div><div class="divider"></div><div class="right-axis bar irony" id="bar-irony" style="background-color: #FFFFFF"><div class="text-wrapper" id="span-irony"></div></div><img class="value" id="img-irony" src="./assets/values/irony.svg"></div><h2>Personality Axis: <span class="axis-labels" id="personality-label"></span></h2><div class="axis"><img class="value" id="img-wholesome" src="./assets/values/wholesome.svg"><div class="left-axis bar wholesome" id="bar-wholesome" style="background-color: #FC8028"><div class="text-wrapper" id="span-wholesome"></div></div><div class="divider"></div><div class="right-axis bar edgy" id="bar-edgy" style="background-color: #981900"><div class="text-wrapper-white" id="span-edgy"></div></div><img class="value" id="img-edgy" src="./assets/values/edgy.svg"></div><h2>Judgement Axis: <span class="axis-labels" id="judgement-label"></span></h2><div class="axis"><img class="value" id="img-sensitive" src="./assets/values/sensitive.svg"><div class="left-axis bar sensitive" id="bar-sensitive" style="background-color: #2BF935"><div class="text-wrapper" id="span-sensitive"></div></div><div class="divider"></div><div class="right-axis bar fedposter" id="bar-fedposter" style="background-color: #00CFFF"><div class="text-wrapper" id="span-fedposter"></div></div><img class="value" id="img-fedposter" src="./assets/values/fedposter.svg"></div><h2>Politics Axis: <span class="axis-labels" id="politics-label"></span></h2><div class="axis"><img class="value" id="img-theory" src="./assets/values/theory.svg"><div class="left-axis bar theory" id="bar-theory" style="background-color: #7D0707"><div class="text-wrapper-white" id="span-theory"></div></div><div class="divider"></div><div class="right-axis bar freeform" id="bar-freeform" style="background-color: #009245"><div class="text-wrapper" id="span-freeform"></div></div><img class="value" id="img-freeform" src="./assets/values/freeform.svg"></div><h2>Realism Axis: <span class="axis-labels" id="realism-label"></span></h2><div class="axis"><img class="value" id="img-pragmatic" src="./assets/values/pragmatic.svg"><div class="left-axis bar pragmatic" id="bar-pragmatic" style="background-color: #52CE3C"><div class="text-wrapper" id="span-pragmatic"></div></div><div class="divider"></div><div class="right-axis bar idealist" id="bar-idealist" style="background-color: #F7B1BB"><div class="text-wrapper" id="span-idealist"></div></div><img class="value" id="img-idealist" src="./assets/values/idealist.svg"></div><h2>Perception Axis: <span class="axis-labels" id="perception-label"></span></h2><div class="axis"><img class="value" id="img-popular" src="./assets/values/popular.svg"><div class="left-axis bar popular" id="bar-popular" style="background-color: #FF0000"><div class="text-wrapper" id="span-popular"></div></div><div class="divider"></div><div class="right-axis bar disliked" id="bar-disliked" style="background-color: #9989FF"><div class="text-wrapper" id="span-disliked"></div></div><img class="value" id="img-disliked" src="./assets/values/disliked.svg"></div><h2>Hornyposting Axis: <span class="axis-labels" id="hornyposting-label"></span></h2><div class="axis"><img class="value" id="img-unfiltered" src="./assets/values/unfiltered.svg"><div class="left-axis bar unfiltered" id="bar-unfiltered" style="background-color: #FFF700"><div class="text-wrapper" id="span-unfiltered"></div></div><div class="divider"></div><div class="right-axis bar chaste" id="bar-chaste" style="background-color: #FEC62B"><div class="text-wrapper" id="span-chaste"></div></div><img class="value" id="img-chaste" src="./assets/values/chaste.svg"></div></div><h2>Closest Match: <span id="cmatch"></span></h2><div id="other-matches">Next matches:</div><canvas id="banner"></canvas><button class="button" id="download-button">Download</button><button class="button" id="submit-button">Submit Your Scores</button><button class="button" id="match-change-button" style="display: none;">Change who you match with</button><a class="no-under" href="gallery.html"><button class="button" id="gallery-button">User Gallery</button></a><a class="no-under" href="credits.html"><button class="button" id="credits-button">Credits</button></a><a class="no-under" href="index.html"><button class="button" id="back-button">Return To Index</button></a><dialog id="match-selection"><button id="match-close">X</button><h2>Only match with users that are:</h2><div id="user-match-holder"></div></dialog><script type="application/javascript">globalThis.VERSION="3.2.3";globalThis.DEFAULT_FLAGS=0b0;</script><script type="module">import{getJson as o,Canvas as t,windowPromise as n,parseScores as e,currentTheme as c,parseUsers as s,orderScores as r,parseFlags as i,filterByFlag as a}from"./dist/common.min.js";function d(o,t,n){const e=document.getElementById("span-"+o),c=document.getElementById("bar-"+o);if(!e||!c)throw Error("Expected HTML elements not found");const s=t>95?100:t;e.textContent=t.toFixed(1)+"%",c.style.width=s.toFixed(1)+"%",e.style.display=t>20?"block":"none",c.style.display=t>=2?"block":"none",t>98&&((o,t)=>{o.style[`border${t}Style`]="solid",o.style[`borderTop${t}Radius`]="28pt",o.style[`borderBottom${t}Radius`]="28pt",o.style["margin"+t]="4px";const n=o.parentElement?.querySelector(".divider");n&&(n.style.display="none")})(c,n?"Left":"Right")}(async()=>{const[m,l,u]=await Promise.all([o("values"),o("users"),n]),h=s(l),b=new URLSearchParams(location.search),f=b.get("score"),g=b.get("digest")??"missing",E=b.get("edition")??"missing";if(!f)throw Error("No scores provided");const w=e(f,m.length),k=E.toLowerCase().startsWith("s");document.getElementById("submit-button").addEventListener("click",(()=>{const o=w.map((o=>o.toFixed(1))).join(","),t=g.replaceAll(" ","+"),n=new URLSearchParams({score:o,digest:t,edition:E});location.href="submitter.html?"+n}));const p=document.getElementById("banner"),$=document.getElementById("match-selection"),L=document.getElementById("match-close"),[v,R]="dark"===c()?["#EEE","#333"]:["#333","#EEE"],S=new t(p,{fg:v,bg:R,height:1e3,width:800,font:"Andika"});document.getElementById("download-button")?.addEventListener("click",(()=>{t.download(p)})),document.getElementById("match-change-button")?.addEventListener("click",(()=>{$.showModal()})),L.addEventListener("click",(()=>{$.close()})),$.addEventListener("click",(o=>{})),$.addEventListener("close",(()=>{})),await function(o,t,n,e,c,s){const m=i(t),l=e.filter((o=>a(m,o)));if(!l.length)throw Error("No users match the provided flags");const u=(o=>{const t=100*(1-o[0].bias);document.getElementById("cmatch").textContent=`${o[0].name}: ${t.toFixed(1)}%`;const n=document.getElementById("other-matches");for(;n?.children.length;)n.removeChild(n.firstChild);for(let t=1;t<5;t++){const e=100*(1-o[t].bias),c=document.createElement("p");c.textContent=`${o[t].name}: ${e.toFixed(1)}%`,n?.appendChild(c)}return o[0].name})(r(n,l));return o.clearFields(),o.drawHeader({version:globalThis.VERSION,edition:(s?"Short":"Full")+" Edition",gallery:!1,user:u,basetext:"Taken"}),(async(o,t,n)=>{for(const[e,c]of t.entries()){const{labels:t}=c,s=n[e],r=100-s;d(t[0],s,!1),d(t[1],r,!0);const i=await o.drawValue(c,s,e);document.getElementById(c.name+"-label").textContent=i}})(o,c,n)}(S,DEFAULT_FLAGS,w,h,m,k)})().catch((o=>{console.error(o),alert(o.toString())}));</script></body></html>