Upload all files
This commit is contained in:
parent
1103311542
commit
e079df84fb
120
index.css
Normal file
120
index.css
Normal file
|
@ -0,0 +1,120 @@
|
|||
@font-face {
|
||||
font-family: "inter";
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
|
||||
}
|
||||
|
||||
body {
|
||||
color: white;
|
||||
background: rgb(255,0,0);
|
||||
background: linear-gradient(336deg, rgba(255,0,0,1) 0%, rgba(74,73,255,1) 100%);
|
||||
font-family: inter;
|
||||
background-attachment: fixed;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.tiny {
|
||||
font-size: 5pt;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 35pt;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 20pt;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 15pt;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.section {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
max-width: 75%;
|
||||
border-radius: 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 5px
|
||||
}
|
||||
|
||||
.section h2 {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.box {
|
||||
color: white;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
max-width: 95%;
|
||||
border-radius: 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.box p {
|
||||
margin: 10px;
|
||||
}
|
||||
.box h3 {
|
||||
margin: 10px;
|
||||
}
|
||||
.box img {
|
||||
margin: 10px;
|
||||
}
|
||||
.box button {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.bluebutton {
|
||||
color: white;
|
||||
font-size: 12pt;
|
||||
background: rgba(0, 0, 255, 0.3);
|
||||
font-family: inter;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
padding: 5px;
|
||||
}
|
||||
.greenbutton {
|
||||
color: white;
|
||||
font-size: 12pt;
|
||||
background: rgba(0, 255, 0, 0.3);
|
||||
font-family: inter;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
padding: 5px;
|
||||
}
|
||||
.redbutton {
|
||||
color: white;
|
||||
font-size: 12pt;
|
||||
background: rgba(255, 0, 0, 0.3);
|
||||
font-family: inter;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
padding: 5px;
|
||||
}
|
||||
.backbutton {
|
||||
color: white;
|
||||
font-size: 12pt;
|
||||
background: rgba(255, 0, 0, 0.3);
|
||||
font-family: inter;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
padding: 5px;
|
||||
}
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
44
index.html
Normal file
44
index.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>The IQ Estimator</title>
|
||||
<link type="text/css" rel="stylesheet" href="index.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h2>The IQ Estimator</h2>
|
||||
<div class="section">
|
||||
<div class="box" id="q1">
|
||||
<h3>Question 1</h3>
|
||||
<p>Are you an American citizen?</p>
|
||||
<button class="bluebutton" onclick="international()">Nope :)</button>
|
||||
<button class="redbutton" onclick="americanCitizen()">YES AMERICAAAA 🦅</button>
|
||||
</div>
|
||||
<div class="box" id="q2a" style="display: none;">
|
||||
<h3>Question 2</h3>
|
||||
<p>Did you register to vote?</p>
|
||||
<button class="bluebutton" onclick="voted()">Yes!</button>
|
||||
<button class="redbutton" onclick="novoted()">No :/</button>
|
||||
</div>
|
||||
<div class="box" id="q3" style="display: none;">
|
||||
<h3>Question 3</h3>
|
||||
<p>Who did you vote for?</p>
|
||||
<button class="bluebutton" onclick="smartPerson()">Kamala Harris!</button>
|
||||
<button class="redbutton" onclick="noBrainCells()">TRUMP 2024! MAKE AMERICA GREAT AGAIN!</button>
|
||||
</div>
|
||||
<div class="box" id="q2b" style="display: none;">
|
||||
<h3>Question 2</h3>
|
||||
<p>Who would you vote for?</p>
|
||||
<button class="bluebutton" onclick="smartPerson()">Kamala Harris</button>
|
||||
<button class="redbutton" onclick="noBrainCells()">Donald Trump</button>
|
||||
</div>
|
||||
<div class="box" id="iqresult" style="display: none;">
|
||||
<h3>Your Result...</h3>
|
||||
<h2 id="resultPlaceholder"></h2>
|
||||
<p id="snarkyRemark"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
</html>
|
102
index.js
Normal file
102
index.js
Normal file
|
@ -0,0 +1,102 @@
|
|||
var iqscore = 100;
|
||||
|
||||
function getSnarkyRemark() {
|
||||
if (iqscore < 0) {
|
||||
return("Hmm... I'm guessing that you didn't go to any schooling beyond what's mandatory. Hey, just like most other Trump supporters!");
|
||||
} else if (iqscore == 50) {
|
||||
return("Why didn't you register to vote? You could have saved democracy in America...");
|
||||
} else if (iqscore == 200) {
|
||||
return("Only thing keeping you from greatness is all the other idiots living in America :/");
|
||||
} else if (iqscore == 250) {
|
||||
return("Pity you don't live in America to help fight against the forces of evil.");
|
||||
}
|
||||
}
|
||||
|
||||
function getResult() {
|
||||
const resultPlaceholder = document.getElementById('resultPlaceholder');
|
||||
if (resultPlaceholder) {
|
||||
resultPlaceholder.textContent = `is about ${iqscore} IQ!`;
|
||||
}
|
||||
const snarkyRemark = document.getElementById('snarkyRemark');
|
||||
if (snarkyRemark) {
|
||||
snarkyRemark.textContent = getSnarkyRemark();
|
||||
}
|
||||
}
|
||||
|
||||
function international() {
|
||||
iqscore += 50;
|
||||
const qone = document.getElementById('q1');
|
||||
if (qone) {
|
||||
qone.style.display = 'none';
|
||||
}
|
||||
const qtwob = document.getElementById('q2b');
|
||||
if (qtwob) {
|
||||
qtwob.style.display = 'block';
|
||||
}
|
||||
}
|
||||
function americanCitizen() {
|
||||
iqscore -= 50;
|
||||
const qone = document.getElementById('q1');
|
||||
if (qone) {
|
||||
qone.style.display = 'none';
|
||||
}
|
||||
const qtwoa = document.getElementById('q2a');
|
||||
if (qtwoa) {
|
||||
qtwoa.style.display = 'block';
|
||||
}
|
||||
}
|
||||
function voted() {
|
||||
iqscore += 50;
|
||||
const qtwoa = document.getElementById('q2a');
|
||||
if (qtwoa) {
|
||||
qtwoa.style.display = 'none';
|
||||
}
|
||||
const qthree = document.getElementById('q3');
|
||||
if (qthree) {
|
||||
qthree.style.display = 'block';
|
||||
}
|
||||
}
|
||||
function novoted() {
|
||||
iqscore -= 100;
|
||||
const qtwoa = document.getElementById('q2a');
|
||||
if (qtwoa) {
|
||||
qtwoa.style.display = 'none';
|
||||
}
|
||||
const qtwob = document.getElementById('q2b');
|
||||
if (qtwob) {
|
||||
qtwob.style.display = 'block';
|
||||
}
|
||||
}
|
||||
function smartPerson() {
|
||||
iqscore += 100;
|
||||
const qtwob = document.getElementById('q2b');
|
||||
if (q2b) {
|
||||
q2b.style.display = 'none';
|
||||
}
|
||||
const qthree = document.getElementById('q3');
|
||||
if (qthree) {
|
||||
qthree.style.display = 'none';
|
||||
}
|
||||
const iqresult = document.getElementById('iqresult');
|
||||
if (iqresult) {
|
||||
iqresult.style.display = 'block';
|
||||
getResult()
|
||||
}
|
||||
}
|
||||
function noBrainCells() {
|
||||
iqscore -= 500;
|
||||
const qtwob = document.getElementById('q2b');
|
||||
if (q2b) {
|
||||
q2b.style.display = 'none';
|
||||
}
|
||||
const qthree = document.getElementById('q3');
|
||||
if (qthree) {
|
||||
qthree.style.display = 'none';
|
||||
}
|
||||
const iqresult = document.getElementById('iqresult');
|
||||
if (iqresult) {
|
||||
iqresult.style.display = 'block';
|
||||
getResult()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user