SocialCreditScoreGame/index.html

78 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Social Credit Score</title>
<style>
body {
margin: 0;
padding: 0;
background-color: black;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.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 */
}
.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 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>
function selectLanguage(language) {
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>
</body>
</html>