SocialCreditScoreGame/index.html

78 lines
2.4 KiB
HTML
Raw Normal View History

2021-10-09 16:57:51 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2024-04-25 12:10:20 +02:00
<title>Social Credit Score</title>
<style>
body {
margin: 0;
padding: 0;
background-color: black;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
2021-10-09 16:57:51 +02:00
.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 */
}
2021-10-09 16:57:51 +02:00
.flag {
width: 100%;
/* Make the flags fill the available space */
max-width: 150px;
/* Limiting max width for better readability */
cursor: pointer;
}
</style>
2021-10-09 16:57:51 +02:00
</head>
<body>
<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')">
2021-10-09 16:57:51 +02:00
</div>
<script>
function selectLanguage(language) {
2024-04-25 12:10:20 +02:00
window.location.href = `game?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>
2021-10-09 16:57:51 +02:00
</body>
</html>