You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.5 KiB
HTML

4 years ago
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>LAUNCHER</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="GIF">
<img src="INTRO.gif" alt="whatever" id="gif"/></div>
<div class="overlay">
<button id="code-input" value="myimage" onclick="openInput()">enter codeword
</button>
</div>
<div id="input">
<input type="text" id="fname" name="firstname" placeholder="">
</div>
<script>
function openInput(){
document.getElementById("input").style.visibility = "visible";
document.getElementById("code-input").style.visibility = "hidden";
document.getElementById("fname").focus();
}
let text = document.querySelector ("input[type='text']");
function checkCode (e) {
if (e.key == "Enter") {
if (document.querySelector ("input[type='text']").value === "codeword") {
location='https://hub.xpub.nl/sandbot/PrototypingTimes/LAUNCHER/louisa%20code/code/index.html';
console.log("codeword works because of checkCode");
} else {
console.log("NO GOOD");
}
}
}
text.addEventListener("keydown", checkCode );
</script>
</body>
</html>