139 lines
5.3 KiB
HTML
139 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Moon Gaming</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@700&family=Press+Start+2P&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
|
<style>
|
|
:root {
|
|
--background-color-dark: #0d0d0d;
|
|
--text-color-dark: #00ffcc;
|
|
--button-bg-dark: #1a1a1a;
|
|
--button-hover-bg-dark: #00ffcc;
|
|
--button-hover-text-dark: #0d0d0d;
|
|
|
|
--background-color-light: #ffffff;
|
|
--text-color-light: #333333;
|
|
--button-bg-light: #f0f0f0;
|
|
--button-hover-bg-light: #333333;
|
|
--button-hover-text-light: #ffffff;
|
|
}
|
|
|
|
body {
|
|
background-color: var(--background-color);
|
|
color: var(--text-color);
|
|
font-family: 'Orbitron', sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
transition: background-color 0.3s, color 0.3s;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 3rem;
|
|
text-transform: uppercase;
|
|
animation: glow 1.5s infinite alternate;
|
|
}
|
|
|
|
@keyframes glow {
|
|
from {
|
|
text-shadow: 0 0 10px var(--text-color), 0 0 20px var(--text-color), 0 0 30px var(--text-color), 0 0 40px var(--text-color);
|
|
}
|
|
to {
|
|
text-shadow: 0 0 20px var(--text-color), 0 0 30px var(--text-color), 0 0 40px var(--text-color), 0 0 50px var(--text-color);
|
|
}
|
|
}
|
|
|
|
.button-container {
|
|
display: flex;
|
|
gap: 20px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.button {
|
|
padding: 15px 30px;
|
|
font-size: 1.2rem;
|
|
font-family: 'Press Start 2P', cursive;
|
|
color: var(--text-color);
|
|
background-color: var(--button-bg);
|
|
border: 2px solid var(--text-color);
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
text-transform: uppercase;
|
|
transition: background-color 0.3s, color 0.3s, transform 0.2s;
|
|
}
|
|
|
|
.button:hover {
|
|
background-color: var(--button-hover-bg);
|
|
color: var(--button-hover-text);
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.button:active {
|
|
transform: scale(0.95);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Moon Gaming</h1>
|
|
<div class="button-container">
|
|
<button class="button" onclick="location.href='setting.html'">Settings</button>
|
|
<button class="button" onclick="location.href='./WebGames-master/WebGames-master/index.html'">Games</button>
|
|
</div>
|
|
|
|
<script>
|
|
// Utility function to set a cookie
|
|
function setCookie(name, value, days) {
|
|
const date = new Date();
|
|
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
document.cookie = `${name}=${value};expires=${date.toUTCString()};path=/`;
|
|
}
|
|
|
|
// Utility function to get a cookie
|
|
function getCookie(name) {
|
|
const cookies = document.cookie.split(';');
|
|
for (let i = 0; i < cookies.length; i++) {
|
|
const cookie = cookies[i].trim();
|
|
if (cookie.startsWith(name + '=')) {
|
|
return cookie.substring(name.length + 1);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
// Apply dark or light mode based on cookie
|
|
function applyDarkMode(enabled) {
|
|
if (enabled) {
|
|
document.body.style.setProperty('--background-color', 'var(--background-color-dark)');
|
|
document.body.style.setProperty('--text-color', 'var(--text-color-dark)');
|
|
document.body.style.setProperty('--button-bg', 'var(--button-bg-dark)');
|
|
document.body.style.setProperty('--button-hover-bg', 'var(--button-hover-bg-dark)');
|
|
document.body.style.setProperty('--button-hover-text', 'var(--button-hover-text-dark)');
|
|
} else {
|
|
document.body.style.setProperty('--background-color', 'var(--background-color-light)');
|
|
document.body.style.setProperty('--text-color', 'var(--text-color-light)');
|
|
document.body.style.setProperty('--button-bg', 'var(--button-bg-light)');
|
|
document.body.style.setProperty('--button-hover-bg', 'var(--button-hover-bg-light)');
|
|
document.body.style.setProperty('--button-hover-text', 'var(--button-hover-text-light)');
|
|
}
|
|
}
|
|
|
|
// Ensure dark mode is the default
|
|
if (getCookie('darkMode') === null) {
|
|
setCookie('darkMode', 'true', 30); // Default to dark mode
|
|
}
|
|
|
|
// Apply saved mode on load
|
|
const darkModeEnabled = getCookie('darkMode') === 'true';
|
|
applyDarkMode(darkModeEnabled);
|
|
</script>
|
|
</body>
|
|
</html>
|