@@ -51,10 +51,17 @@ <h2><span class="weight-300" id="e-label"></span></h2>
5151 < div class ="bar union " id ="bar-union "> < div class ="text-wrapper " id ="union "> </ div > </ div >
5252 < img id ="img-union " src ="value_images/union.png " height ="128pt "/>
5353</ div >
54+ < h2 > < span class ="weight-300 " id ="f-label "> </ span > </ h2 >
55+ < div class ="axis ">
56+ < img id ="img-industry " src ="value_images/industry.png " height ="128pt "/>
57+ < div class ="bar industry " id ="bar-industry "> < div class ="text-wrapper " id ="industry "> </ div > </ div >
58+ < div class ="bar ecology " id ="bar-ecology "> < div class ="text-wrapper " id ="ecology "> </ div > </ div >
59+ < img id ="img-ecology " src ="value_images/ecology.png " height ="128pt "/>
60+ </ div >
5461< h2 > Closest Match: < span class ="weight-300 " id ="ideology-label "> </ span > </ h2 >
5562< p > You can send these results by copying and pasting the URL at the top of the page or using the image below.</ p >
5663< hr />
57- < canvas id ="banner " width =800 height =800 style ="font-family:Montserrat "> </ canvas >
64+ < canvas id ="banner " width =800 height =900 style ="font-family:Montserrat "> </ canvas >
5865< button class ="button " onclick ="location.href='index.html'; " style ="background-color: #2196f3; "> Back</ button > < br >
5966<!-- Website visit statistics - no personal information is collected! -->
6067< script type ="text/javascript ">
@@ -99,6 +106,7 @@ <h2>Closest Match: <span class="weight-300" id="ideology-label"></span></h2>
99106 cArray = [ "Extremely Pro-Centralization" , "Pro-Centralization" , "Moderately Pro-Centralization" , "Balanced" , "Moderately Pro-Decentralization" , "Pro-Decentralization" , "Extremely Pro-Decentralization" ]
100107 dArray = [ "Extremely Internationalist" , "Internationalist" , "Moderately Internationalist" , "Neutral" , "Moderately Nationalist" , "Nationalist" , "Extremely Nationalist" ]
101108 eArray = [ "Extremely Pro-Party" , "Pro-Party" , "Moderately Pro-Party" , "Indifferent" , "Moderately Pro-Union" , "Pro-Union" , "Extremely Pro-Union" ]
109+ fArray = [ "Extremely Industrial" , "Industrial" , "Moderately Industrial" , "Indifferent" , "Moderately Ecological" , "Ecological" , "Extremely Ecological" ]
102110
103111 function setLabel ( val , ary ) {
104112 if ( val > 100 ) { return "" } else
@@ -117,11 +125,13 @@ <h2>Closest Match: <span class="weight-300" id="ideology-label"></span></h2>
117125 central = getQueryVariable ( "c" )
118126 international = getQueryVariable ( "d" )
119127 party = getQueryVariable ( "e" )
128+ industry = getQueryVariable ( "f" )
120129 reform = ( 100 - revolution ) . toFixed ( 1 )
121130 utopian = ( 100 - scientific ) . toFixed ( 1 )
122131 decentral = ( 100 - central ) . toFixed ( 1 )
123132 national = ( 100 - international ) . toFixed ( 1 )
124133 union = ( 100 - party ) . toFixed ( 1 )
134+ ecology = ( 100 - industry ) . toFixed ( 1 )
125135
126136 setBarValue ( "revolution" , revolution )
127137 setBarValue ( "reform" , reform )
@@ -133,12 +143,15 @@ <h2>Closest Match: <span class="weight-300" id="ideology-label"></span></h2>
133143 setBarValue ( "international" , international )
134144 setBarValue ( "party" , party )
135145 setBarValue ( "union" , union )
146+ setBarValue ( "industry" , industry )
147+ setBarValue ( "ecology" , ecology )
136148
137149 document . getElementById ( "a-label" ) . innerHTML = setLabel ( revolution , aArray )
138150 document . getElementById ( "b-label" ) . innerHTML = setLabel ( scientific , bArray )
139151 document . getElementById ( "c-label" ) . innerHTML = setLabel ( central , cArray )
140152 document . getElementById ( "d-label" ) . innerHTML = setLabel ( international , dArray )
141153 document . getElementById ( "e-label" ) . innerHTML = setLabel ( party , eArray )
154+ document . getElementById ( "f-label" ) . innerHTML = setLabel ( industry , fArray )
142155
143156 ideology = ""
144157 ideodist = Infinity
@@ -149,6 +162,7 @@ <h2>Closest Match: <span class="weight-300" id="ideology-label"></span></h2>
149162 dist += Math . pow ( Math . abs ( ideologies [ i ] . stats . b - scientific ) , 1.73856063 )
150163 dist += Math . pow ( Math . abs ( ideologies [ i ] . stats . d - international ) , 1.73856063 )
151164 dist += Math . pow ( Math . abs ( ideologies [ i ] . stats . e - party ) , 1.73856063 )
165+ dist += Math . pow ( Math . abs ( ideologies [ i ] . stats . f - industry ) , 1.73856063 )
152166 if ( dist < ideodist ) {
153167 ideology = ideologies [ i ] . name
154168 ideodist = dist
@@ -190,13 +204,18 @@ <h2>Closest Match: <span class="weight-300" id="ideology-label"></span></h2>
190204 ctx . drawImage ( img , 20 , 650 , 100 , 100 )
191205 img = document . getElementById ( "img-union" )
192206 ctx . drawImage ( img , 680 , 650 , 100 , 100 )
207+ img = document . getElementById ( "img-industry" )
208+ ctx . drawImage ( img , 20 , 770 , 100 , 100 )
209+ img = document . getElementById ( "img-ecology" )
210+ ctx . drawImage ( img , 680 , 770 , 100 , 100 )
193211
194212 ctx . fillStyle = "#222222"
195213 ctx . fillRect ( 120 , 180 , 560 , 80 )
196214 ctx . fillRect ( 120 , 300 , 560 , 80 )
197215 ctx . fillRect ( 120 , 420 , 560 , 80 )
198216 ctx . fillRect ( 120 , 540 , 560 , 80 )
199217 ctx . fillRect ( 120 , 660 , 560 , 80 )
218+ ctx . fillRect ( 120 , 780 , 560 , 80 )
200219 ctx . fillStyle = "#890000"
201220 ctx . fillRect ( 120 , 184 , 5.6 * revolution - 2 , 72 )
202221 ctx . fillStyle = "#FC5959"
@@ -217,6 +236,10 @@ <h2>Closest Match: <span class="weight-300" id="ideology-label"></span></h2>
217236 ctx . fillRect ( 120 , 664 , 5.6 * party - 2 , 72 )
218237 ctx . fillStyle = "#7F333B"
219238 ctx . fillRect ( 682 - 5.6 * union , 664 , 5.6 * union - 2 , 72 )
239+ ctx . fillStyle = "#804E00"
240+ ctx . fillRect ( 120 , 784 , 5.6 * industry - 2 , 72 )
241+ ctx . fillStyle = "#586808"
242+ ctx . fillRect ( 682 - 5.6 * ecology , 784 , 5.6 * ecology - 2 , 72 )
220243 ctx . fillStyle = "#222222"
221244 ctx . font = "700 80px Montserrat"
222245 ctx . textAlign = "left"
@@ -230,12 +253,14 @@ <h2>Closest Match: <span class="weight-300" id="ideology-label"></span></h2>
230253 if ( central > 30 ) { ctx . fillText ( central + "%" , 130 , 477.5 ) }
231254 if ( international > 30 ) { ctx . fillText ( international + "%" , 130 , 597.5 ) }
232255 if ( party > 30 ) { ctx . fillText ( party + "%" , 130 , 717.5 ) }
256+ if ( industry > 30 ) { ctx . fillText ( industry + "%" , 130 , 837.5 ) }
233257 ctx . textAlign = "right"
234258 if ( reform > 30 ) { ctx . fillText ( reform + "%" , 670 , 237.5 ) }
235259 if ( utopian > 30 ) { ctx . fillText ( utopian + "%" , 670 , 357.5 ) }
236260 if ( decentral > 30 ) { ctx . fillText ( decentral + "%" , 670 , 477.5 ) }
237261 if ( national > 30 ) { ctx . fillText ( national + "%" , 670 , 597.5 ) }
238262 if ( union > 30 ) { ctx . fillText ( union + "%" , 670 , 717.5 ) }
263+ if ( ecology > 30 ) { ctx . fillText ( ecology + "%" , 670 , 837.5 ) }
239264
240265 ctx . font = "300 30px Montserrat"
241266 ctx . fillText ( "leftvalues.github.io" , 780 , 60 )
@@ -245,6 +270,7 @@ <h2>Closest Match: <span class="weight-300" id="ideology-label"></span></h2>
245270 ctx . fillText ( "" + document . getElementById ( "c-label" ) . innerHTML , 400 , 415 )
246271 ctx . fillText ( "" + document . getElementById ( "d-label" ) . innerHTML , 400 , 535 )
247272 ctx . fillText ( "" + document . getElementById ( "e-label" ) . innerHTML , 400 , 655 )
273+ ctx . fillText ( "" + document . getElementById ( "f-label" ) . innerHTML , 400 , 775 )
248274 }
249275 </ script >
250276</ body >
0 commit comments