Multilanguage support, italian version, free schema
This commit is contained in:
147
index.html
147
index.html
@ -2,90 +2,77 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>DarkQuest</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: black;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
<title>The Social Credit Score Game</title>
|
||||
<meta name="description" content="Is your social credit score high enough?">
|
||||
<meta name="author" content="Mattia Mascarello">
|
||||
.container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
/* Responsive grid */
|
||||
gap: 20px;
|
||||
/* Spacing between grid items */
|
||||
justify-items: center;
|
||||
/* Center items horizontally */
|
||||
align-items: center;
|
||||
/* Center items vertically */
|
||||
text-align: center;
|
||||
color: white;
|
||||
max-width: 800px;
|
||||
/* Limiting max width for better readability */
|
||||
width: 90%;
|
||||
/* Taking up 90% of the available width */
|
||||
}
|
||||
|
||||
<meta property="og:title" content="The Social Credit Score Game">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://www.sitepoint.com/a-basic-html5-template/">
|
||||
<meta property="og:description" content="Is your social credit score high enough?">
|
||||
<meta property="og:image" content="assets/img/chinese_flag.png">
|
||||
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
|
||||
<link rel="stylesheet" href="./css/style.css">
|
||||
.flag {
|
||||
width: 100%;
|
||||
/* Make the flags fill the available space */
|
||||
max-width: 150px;
|
||||
/* Limiting max width for better readability */
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main">
|
||||
<div id="scoreDisplay"></div>
|
||||
<div id="progress"></div>
|
||||
<div id="question">
|
||||
<h1 id="questionTitle">Question</h1>
|
||||
<div class="grid">
|
||||
<div class="row">
|
||||
<a class="button ans" data-ans="1">a</a>
|
||||
<a class="button ans" data-ans="2">b</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="button ans" data-ans="3">c</a>
|
||||
<a class="button ans" data-ans="4">d</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="playBegin" class="floattop">
|
||||
<h1>The Social Credit Score Game</h1>
|
||||
<img src="assets/img/play.png">
|
||||
</div>
|
||||
<div id="rock-approves" class="floatleft">
|
||||
<video id="rock-approves-video" style="width: 100%;" muted class="fadeOutVideo">
|
||||
<source src="assets/video/aprovar.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
<div id="rock-disapproves" class="floatleft">
|
||||
<video id="rock-disapproves-video" style="width: 100%;">
|
||||
<source src="assets/video/desaprovar.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
<div id="bbchacha" class="floatright">
|
||||
<img src="assets/img/bbchacha.gif">
|
||||
</div>
|
||||
<div id="wrong" class="floattop">
|
||||
<img src="assets/img/wrong.png">
|
||||
</div>
|
||||
<div id="correct" class="floattop">
|
||||
<img src="assets/img/correct.png">
|
||||
</div>
|
||||
<div id="mao" class="floattop">
|
||||
<img src="assets/img/mao.jpg">
|
||||
</div>
|
||||
<div id="xi" class="floattop">
|
||||
<img src="assets/img/xi.jpg">
|
||||
</div>
|
||||
<div id="square" class="floattop">
|
||||
<img src="assets/img/square.jpg">
|
||||
</div>
|
||||
<div id="loose" class="floattop">
|
||||
<h1>Your social credit score is too low</h1>
|
||||
<p>Your execution is scheduled tomorrow at sunset</p>
|
||||
<a href="javascript:location.reload()">Play again</a>
|
||||
</div>
|
||||
<div id="win" class="floattop">
|
||||
<h1>Congratulations!</h1>
|
||||
<p>Your social credit score is high enough</p>
|
||||
<p>You are worthy of the Chinese Dream</p>
|
||||
<a href="javascript:location.reload()">Play again</a>
|
||||
</div>
|
||||
<div class="container">
|
||||
<img id="enf" class="flag" src="assets/img/it_flag.svg" alt="Italian Flag" onclick="selectLanguage('it')">
|
||||
<img id="itf" class="flag" src="assets/img/uk_flag.svg" alt="English Flag" onclick="selectLanguage('en')">
|
||||
</div>
|
||||
<script src="js/jquery-3.6.0.min.js"></script>
|
||||
<script src="js/js-yaml.min.js"></script>
|
||||
<script src="js/util.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
|
||||
<script>
|
||||
function selectLanguage(language) {
|
||||
window.location.href = `game/index.html?lang=${language}`;
|
||||
}
|
||||
let enf = document.getElementById('enf');
|
||||
let itf = document.getElementById('itf');
|
||||
enf.addEventListener("mouseover", function () {
|
||||
enf.style.transform = "scale(2)";
|
||||
enf.style.transition = "transform 0.5s";
|
||||
});
|
||||
enf.addEventListener("mouseout", function () {
|
||||
enf.style.transform = "scale(1)";
|
||||
enf.style.transition = "transform 0.5s";
|
||||
});
|
||||
itf.addEventListener("mouseover", function () {
|
||||
itf.style.transform = "scale(2)";
|
||||
itf.style.transition = "transform 0.5s";
|
||||
});
|
||||
itf.addEventListener("mouseout", function () {
|
||||
itf.style.transform = "scale(1)";
|
||||
itf.style.transition = "transform 0.5s";
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user