Abram Kash 6 anni fa
parent
commit
9055b3571a
7 ha cambiato i file con 64 aggiunte e 84 eliminazioni
  1. 25 25
      help/index.html
  2. 11 11
      index.html
  3. 1 9
      quiz.js
  4. 9 9
      quiz/index.html
  5. 2 10
      results.js
  6. 16 16
      results/index.html
  7. 0 4
      style.css

+ 25 - 25
help/index.html

@@ -2,19 +2,19 @@
 <html>
 
 <head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
 
 	<title>PolitiScales - Help</title>
 
-	<meta name="description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion." />
-	<link rel="stylesheet" href="/style.css" type="text/css" media="screen" />
+	<meta name="description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion.">
+	<link rel="stylesheet" href="/style.css" type="text/css" media="screen">
 	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
-	<meta property="og:url" content="https://dbhq.github.io/" />
-	<meta property="og:title" content="PolitiScales" />
-	<meta property="og:locale" content="en_US" />
-	<meta property="og:description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion." />
-	<meta property="og:image" content="/images/facebook-preview.jpg" />
+	<meta property="og:url" content="https://dbhq.github.io/">
+	<meta property="og:title" content="PolitiScales">
+	<meta property="og:locale" content="en_US">
+	<meta property="og:description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion.">
+	<meta property="og:image" content="/images/facebook-preview.jpg">
 </head>
 
 <body>
@@ -33,84 +33,84 @@
 
 			<h3>Constructivism vs. Essentialism</h3>
 			<div class="description">
-				<div class="descImg"><img src="/images/constructivism.png" alt="Constructivism" /></div>
+				<div class="descImg"><img src="/images/constructivism.png" alt="Constructivism"></div>
 				<div class="descText">
 					<p>Why are the people how they are? This axis allows you to situate yourself between two opposite poles which answer this question.</p>
 					<p><strong>Constructivists</strong> consider that people build themselves from their environment (notably social) and that the characteristics that make them who they are, are acquired.</p>
 					<p>On the contrary, <strong>essentialists</strong> consider that an individual is by nature how he/she is and that his/her characteristics which make this person who she/he is, are innate.</p>
 				</div>
-				<div class="descImg"><img src="/images/essentialism.png" alt="Essentialism" class="descImgRight" /></div>
+				<div class="descImg"><img src="/images/essentialism.png" alt="Essentialism" class="descImgRight"></div>
 			</div>
 
 			<h3>Rehabilitative Justice vs. Punitive Justice</h3>
 			<div class="description">
-				<div class="descImg"><img src="/images/justice_soft.png" alt="Rehabilitative justice" /></div>
+				<div class="descImg"><img src="/images/justice_soft.png" alt="Rehabilitative justice"></div>
 				<div class="descText">
 					<p>Those in favor of <strong>rehabilitative justice</strong> consider that the role of justice is to put the condemned on the “right path” again by making them understand why they should not do what they did and why they were condemned and by accompanying them all along the process.</p>
 					<p>Conversely those in favor of <strong>punitive justice</strong> consider that the role of justice is dissuasive, both for the condemned (to avoid recidivism) and for the rest of the society (by making them examples not to follow).</p>
 				</div>
-				<div class="descImg"><img src="/images/justice_hard.png" alt="Punitive justice" class="descImgRight" /></div>
+				<div class="descImg"><img src="/images/justice_hard.png" alt="Punitive justice" class="descImgRight"></div>
 			</div>
 
 			<h3>Progressive vs. Conservative</h3>
 			<div class="description">
-				<div class="descImg"><img src="/images/progressism.png" alt="Progressism" /></div>
+				<div class="descImg"><img src="/images/progressism.png" alt="Progressism"></div>
 				<div class="descText">
 					<p>The <strong>progressives</strong> try to build social progress, make a better society without caring about traditions. They often consider the present as better than the past and that it is necessary to keep on this path.</p>
 					<p>On the contrary the <strong>conservatives</strong> want to keep the status quo and even to reinsert some values already considered as disappeared or disappearing. Traditions, among those the religious heritage, are put forward as a source of wisdom.</p>
 				</div>
-				<div class="descImg"><img src="/images/conservatism.png" alt="Conservatism" class="descImgRight" /></div>
+				<div class="descImg"><img src="/images/conservatism.png" alt="Conservatism" class="descImgRight"></div>
 			</div>
 
 			<h3>Internationalism vs. Nationalism</h3>
 			<div class="description">
-				<div class="descImg"><img src="/images/internationalism.png" alt="Internationalism" /></div>
+				<div class="descImg"><img src="/images/internationalism.png" alt="Internationalism"></div>
 				<div class="descText">
 					<p><strong>Internationalism</strong> is a set of different ides which have for common point to stop making a hierarchy between countries and their inhabitants and to promote as much as possible their cooperation. Pushed to its maximum the final objective is the abolitions of borders.</p>
 					<p>On the other hand, <strong>nationalism</strong> is a set of heterogeneous ideas which, when applied, favor one country and its citizens over foreigners, it also justifies the idea that each people has a nation </p>
 				</div>
-				<div class="descImg"><img src="/images/nationalism.png" alt="Nationalism" class="descImgRight" /></div>
+				<div class="descImg"><img src="/images/nationalism.png" alt="Nationalism" class="descImgRight"></div>
 			</div>
 
 			<h3>Communism vs. Capitalism</h3>
 			<div class="description">
-				<div class="descImg"><img src="/images/communism.png" alt="Communism" /></div>
+				<div class="descImg"><img src="/images/communism.png" alt="Communism"></div>
 				<div class="descText">
 					<p><strong>Communism</strong> is a vast political doctrine. In this test a majority for communism simply signifies that you are for a public property of the means of production.</p>
 					<p><strong>Capitalism</strong> is as well an ambivalent concept. In this test a majority for capitalism simply signifies that you are for a private property of the means of production.</p>
 				</div>
-				<div class="descImg"><img src="/images/capitalism.png" alt="Capitalism" class="descImgRight" /></div>
+				<div class="descImg"><img src="/images/capitalism.png" alt="Capitalism" class="descImgRight"></div>
 			</div>
 
 			<h3>Regulation vs. Laissez-faire</h3>
 			<div class="description">
-				<div class="descImg"><img src="/images/regulation.png" alt="Regulationnism" /></div>
+				<div class="descImg"><img src="/images/regulation.png" alt="Regulationnism"></div>
 				<div class="descText">
 					<p>This axis represents the attitude that a government needs to have concerning the market economy in which an important part of the means of production are private. Liberals and Keynesians are opposed to the method that needs to be adopted without putting into question capitalism. If you are more capitalist, this axis represents your goal in terms of economy. If you are more communist, this axis represents the least bad that you can expect of the current system.</p>
 					<p><strong>Regulation</strong> or interventionism is an idea in which the economical activity should be regulated for the common interest. It can be through legislation, planning, subventions, a variable taxation...</p>
 					<p>On the contrary, the <strong>laissez-faire</strong> is the ideas in which the economical activity should not be regulated because it would in itself correspond to the common interest. It can be through a weak legislation, few or no subventions, a fixed taxation and often weak or even the complete suppression of the role of the state in the economy.</p>
 				</div>
-				<div class="descImg"><img src="/images/laissezfaire.png" alt="Laissez-faire" class="descImgRight" /></div>
+				<div class="descImg"><img src="/images/laissezfaire.png" alt="Laissez-faire" class="descImgRight"></div>
 			</div>
 
 			<h3>Ecology vs. Production</h3>
 			<div class="description">
-				<div class="descImg"><img src="/images/ecology.png" alt="Ecology" /></div>
+				<div class="descImg"><img src="/images/ecology.png" alt="Ecology"></div>
 				<div class="descText">
 					<p><strong>Ecology</strong> in politics privileges the protection of the environment by limiting as much as possible the impact of human activities on the biodiversity even if it implies to limit the these human activities by modifying more or less radically our current way of life.</p>
 					<p><strong>Production</strong> privileges human needs notably by supporting the increase of the production or the use of methods that have an uncertain impact on the environment.</p>
 				</div>
-				<div class="descImg"><img src="/images/productivism.png" alt="Productivism" class="descImgRight" /></div>
+				<div class="descImg"><img src="/images/productivism.png" alt="Productivism" class="descImgRight"></div>
 			</div>
 
 			<h3>Revolution vs. Reform</h3>
 			<div class="description">
-				<div class="descImg"><img src="/images/revolution.png" alt="Revolution" /></div>
+				<div class="descImg"><img src="/images/revolution.png" alt="Revolution"></div>
 				<div class="descText">
 					<p><strong>Revolutionaries</strong> have a tendency to privilege direct action, often in the margin of legality, to reach their goal: replace the current political organization for totally different one.</p>
 					<p><strong>Reformers</strong> have a tendency to privilege legal action to reach their goal: reform the political organization step by step. This can be done through the institutions, via elections, authorized demonstrations, petitions...</p>
 				</div>
-				<div class="descImg"><img src="/images/reformism.png" alt="Reformism" class="descImgRight" /></div>
+				<div class="descImg"><img src="/images/reformism.png" alt="Reformism" class="descImgRight"></div>
 			</div>
 
 		</div>

+ 11 - 11
index.html

@@ -2,19 +2,19 @@
 <html>
 
 <head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
 
-	<title>PolitiScales - Index</title>
+	<title>PolitiScales - the online political test</title>
 
-	<meta name="description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion." />
-	<link rel="stylesheet" href="/style.css" type="text/css" media="screen" />
+	<meta name="description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion.">
+	<link rel="stylesheet" href="/style.css" type="text/css" media="screen">
 	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
-	<meta property="og:url" content="https://dbhq.github.io/" />
-	<meta property="og:title" content="PolitiScales" />
-	<meta property="og:locale" content="en_US" />
-	<meta property="og:description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion." />
-	<meta property="og:image" content="/images/facebook-preview.jpg" />
+	<meta property="og:url" content="https://dbhq.github.io/">
+	<meta property="og:title" content="PolitiScales">
+	<meta property="og:locale" content="en_US">
+	<meta property="og:description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion.">
+	<meta property="og:image" content="/images/facebook-preview.jpg">
 </head>
 
 <body>
@@ -32,7 +32,7 @@
 			<p class="simpleText ltr">Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion.</p>
 			<br/>
 
-			<p class="simpleText ltr"><i class="fa fa-bell" aria-hidden="true"></i> The questions assume that your are a citizen of a multi-parti political system and a market economy.</p>
+			<p class="simpleText ltr"><i class="fa fa-bell" aria-hidden="true"></i> The questions assume that your are a citizen of a multi-party political system and a market economy.</p>
 			<p class="simpleText ltr"><i class="fa fa-bell" aria-hidden="true"></i> You can always avoid answering a question. But if you do not understand the meaning of one of them, try to invert its meaning for a better understanding of what is implied.</p>
 			<p class="simpleText ltr"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This test tries to represent the wider set of ideas as possible and contains some phrases that can be shocking, notably concerning racism and homosexuality.</p>
 

+ 1 - 9
quiz.js

@@ -2009,14 +2009,6 @@ function calc_score(score, max_value) {
   return ((100 * score) / max_value).toFixed(0);
 }
 
-function rot13(s) {
-  return s.replace(/[A-Za-z]/g, function(c) {
-    return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".charAt(
-           "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm".indexOf(c)
-    );
-  });
-}
-
 function results() {
   var axes = {};
 
@@ -2061,7 +2053,7 @@ function results() {
       url += aK + "=" + calc_score(axes[aK].val, axes[aK].sum);
     }
   }
-  url = window.btoa(rot13(url));
+  url = window.btoa(url);
   url = "/results/?" + url;
 
   location.href = url;

+ 9 - 9
quiz/index.html

@@ -2,19 +2,19 @@
 <html>
 
 <head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
 
 	<title>PolitiScales - Quiz</title>
 
-	<meta name="description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion." />
-	<link rel="stylesheet" href="/style.css" type="text/css" media="screen" />
+	<meta name="description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion.">
+	<link rel="stylesheet" href="/style.css" type="text/css" media="screen">
 	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
-	<meta property="og:url" content="https://dbhq.github.io/" />
-	<meta property="og:title" content="PolitiScales" />
-	<meta property="og:locale" content="en_US" />
-	<meta property="og:description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion." />
-	<meta property="og:image" content="/images/facebook-preview.jpg" />
+	<meta property="og:url" content="https://dbhq.github.io/">
+	<meta property="og:title" content="PolitiScales">
+	<meta property="og:locale" content="en_US">
+	<meta property="og:description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion.">
+	<meta property="og:image" content="/images/facebook-preview.jpg">
 </head>
 
 <body>

+ 2 - 10
results.js

@@ -36,16 +36,8 @@ function shareLink() {
   } catch (err) {}
 }
 
-function rot13(s) {
-  return s.replace(/[A-Za-z]/g, function(c) {
-    return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".charAt(
-           "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm".indexOf(c)
-    );
-  });
-}
-
 function getQueryVariable(variable) {
-  var query = rot13(window.atob(window.location.search.substring(1)));
+  var query = window.atob(window.location.search.substring(1));
   var vars = query.split("&");
   for (var i = 0; i < vars.length; i++) {
     var pair = vars[i].split("=");
@@ -614,7 +606,7 @@ function onImageLoaded() {
       ctx.fillStyle = "#ffffff";
       ctx.font = "bold 25px sans-serif";
       ctx.textAlign = "left";
-      ctx.fillText("🅱️olitiScales", 10, 30);
+      ctx.fillText("P️olitiScales, DBHQ Edition", 10, 30);
 
       ctx.fillStyle = "#ffffff";
       ctx.font = "bold 15px sans-serif";

+ 16 - 16
results/index.html

@@ -2,19 +2,19 @@
 <html>
 
 <head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
 
 	<title>PolitiScales - Results</title>
 
-	<meta name="description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion." />
-	<link rel="stylesheet" href="/style.css" type="text/css" media="screen" />
+	<meta name="description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion.">
+	<link rel="stylesheet" href="/style.css" type="text/css" media="screen">
 	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
-	<meta property="og:url" content="https://dbhq.github.io/" />
-	<meta property="og:title" content="PolitiScales" />
-	<meta property="og:locale" content="en_US" />
-	<meta property="og:description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion." />
-	<meta property="og:image" content="/images/facebook-preview.jpg" />
+	<meta property="og:url" content="https://dbhq.github.io/">
+	<meta property="og:title" content="PolitiScales">
+	<meta property="og:locale" content="en_US">
+	<meta property="og:description" content="Welcome to the PolitiScale, the online political test. You will be confronted to a series of affirmations and for each of them you will have to click on the button which corresponds the most to your opinion.">
+	<meta property="og:image" content="/images/facebook-preview.jpg">
 </head>
 
 <body>
@@ -305,7 +305,7 @@
 				<h3>Additional characteristics</h3>
 
 				<div id="anarBonus" class="description">
-					<div class="descImg"><img src="/images/anarchism.png" alt="" /></div>
+					<div class="descImg"><img src="/images/anarchism.png" alt=""></div>
 					<div class="descTextMono">
 						<p><strong>Anarchist:</strong>  When the people are being hit with a stick, they are not happier if the stick is called “the stick of the people”. The State is an oppression that must be abolished.</p>
 
@@ -313,7 +313,7 @@
 				</div>
 
 				<div id="pragBonus" class="description">
-					<div class="descImg"><img src="/images/pragmatism.png" alt="" /></div>
+					<div class="descImg"><img src="/images/pragmatism.png" alt=""></div>
 					<div class="descTextMono">
 						<p><strong>Pragmatist:</strong> politics objectively boil down to looking at where the problems are and trying to solve them according to the means available.</p>
 
@@ -321,7 +321,7 @@
 				</div>
 
 				<div id="femiBonus" class="description">
-					<div class="descImg"><img src="/images/feminism.png" alt="" /></div>
+					<div class="descImg"><img src="/images/feminism.png" alt=""></div>
 					<div class="descTextMono">
 						<p><strong>Radical Feminist:</strong> gender should disappear to put an end to the patriarchy.</p>
 
@@ -329,7 +329,7 @@
 				</div>
 
 				<div id="compBonus" class="description">
-					<div class="descImg"><img src="/images/complotism.png" alt="" /></div>
+					<div class="descImg"><img src="/images/complotism.png" alt=""></div>
 					<div class="descTextMono">
 						<p><strong>Conspiratorial:</strong> the biggest problems of our society are the work of a small group of people. It is then essential to find them, inform the people of their objective and neutralize them.</p>
 
@@ -337,7 +337,7 @@
 				</div>
 
 				<div id="vegaBonus" class="description">
-					<div class="descImg"><img src="/images/veganism.png" alt="" /></div>
+					<div class="descImg"><img src="/images/veganism.png" alt=""></div>
 					<div class="descTextMono">
 						<p><strong>Vegan:</strong> Human beings must stop at all costs the consumption and exploitation of “sensible” being.</p>
 
@@ -345,7 +345,7 @@
 				</div>
 
 				<div id="monaBonus" class="description">
-					<div class="descImg"><img src="/images/monarchism.png" alt="" /></div>
+					<div class="descImg"><img src="/images/monarchism.png" alt=""></div>
 					<div class="descTextMono">
 						<p><strong>Monarchist:</strong> society should be organized around a king.</p>
 
@@ -353,7 +353,7 @@
 				</div>
 
 				<div id="reliBonus" class="description">
-					<div class="descImg"><img src="/images/religion.png" alt="" /></div>
+					<div class="descImg"><img src="/images/religion.png" alt=""></div>
 					<div class="descTextMono">
 						<p><strong>Missionary:</strong> for you religion is important, especially yours. It is therefore appropriate to spread it as globally as possible.</p>
 

+ 0 - 4
style.css

@@ -335,10 +335,6 @@ h3 {
   color: white;
   text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
 }
-.scale .axis .axis-bar .axis-left span,
-.scale .axis .axis-bar .axis-center span,
-.scale .axis .axis-bar .axis-right span {
-}
 .scale .axis .axis-bar .axis-left {
   text-align: right;
 }