Files
ben.de-roo.org/index.php
2025-12-30 11:37:01 +01:00

208 lines
4.5 KiB
PHP

<?php
$theme = "normal";
if (isset($_COOKIE['theme'])) {
$theme = $_COOKIE['theme'];
}
if (isset($_GET['theme'])) {
$theme = $_GET['theme'] === "hacker" ? "hacker" : "normal";
setcookie('theme', $theme, time() + (86400 * 30), "/");
header("Location: " . $_SERVER['PHP_SELF']);
exit();
}
?>
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8">
<meta name="robots" content="noindex">
<title>betere homesite</title>
<style>
html, body {
margin: 0;
padding: 0;
min-height: 100%;
overflow-y: auto;
font-family: monospace;
color: #a9b594b3;
background: linear-gradient(120deg, #245da4, #291451, #1e0f27, #b71b8d);
background-size: 400% 400%;
animation: bgFade 10s ease infinite;
}
@keyframes bgFade {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
/* Hacker theme */
body.hacker {
background: black;
color: #00ff00;
}
/* Matrix canvas */
#matrix {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
/* Toggle knop */
#themeToggle {
position: fixed;
top: 8px;
left: 8px;
padding: 4px 8px;
font-size: 11px;
border-radius: 5px;
border: none;
cursor: pointer;
background: rgba(0,255,255,0.2);
color: #00ffff;
z-index: 999;
}
body.hacker #themeToggle {
background: rgba(0,255,0,0.2);
color: #00ff00;
}
#themeToggle:hover {
background: rgba(0,255,255,0.4);
color: #000;
}
/* Content */
h1 {
text-align: center;
margin: 40px 0;
color: white;
position: relative;
z-index: 2;
}
body.hacker h1 {
color: #00ff00;
}
ul {
list-style: none;
padding: 0;
margin: 0 auto 80px;
max-width: 500px;
position: relative;
z-index: 2;
}
li {
margin: 10px 0;
}
a {
display: block;
padding: 15px 20px;
border-radius: 10px;
background: rgba(0, 255, 255, 0.2);
color: #00ffff;
text-decoration: none;
font-size: 18px;
transition: 0.2s;
}
a:hover {
transform: scale(1.05);
background: rgba(0,255,255,0.4);
color: #000;
}
body.hacker a {
background: rgba(0,255,0,0.1);
color: #00ff00;
}
body.hacker a:hover {
background: rgba(0,255,0,0.3);
}
</style>
</head>
<body class="<?= $theme === 'hacker' ? 'hacker' : '' ?>">
<canvas id="matrix"></canvas>
<button id="themeToggle">Theme</button>
<h1>voor alle dieren in de dierentuin</h1>
<ul>
<li><a href="https://mail.de-roo.org">Webmail</a></li>
<li><a href="https://cloud.de-roo.org/nextcloud">Nextcloud</a></li>
<li><a href="https://agenda.de-roo.org">Agenda</a></li>
<li><a href="https://remote.de-roo.org">Remote logon</a></li>
<li><a href="https://lnk.de-roo.org/admin">URL shortening</a></li>
<li><a href="https://dms.de-roo.org">Document Management System</a></li>
<li><a href="https://blog.de-roo.org">Blog</a></li>
<li><a href="https://media.de-roo.org">Media speler</a></li>
<li><a href="https://code.de-roo.org">VS Code online</a></li>
<li><a href="https://yt.de-roo.org">Internetfilmpjes</a></li>
<li><a href="https://dl.de-roo.org">Filmpjes downloaden</a></li>
</ul>
<script>
const btn = document.getElementById("themeToggle");
btn.onclick = () => {
location.href = document.body.classList.contains("hacker")
? "?theme=normal"
: "?theme=hacker";
};
/* Matrix rain */
const canvas = document.getElementById("matrix");
const ctx = canvas.getContext("2d");
function resize() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
resize();
window.addEventListener("resize", resize);
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789アカサタナ".split("");
const fontSize = 16;
let columns = Math.floor(canvas.width / fontSize);
let drops = Array(columns).fill(1);
function drawMatrix() {
if (!document.body.classList.contains("hacker")) return;
ctx.fillStyle = "rgba(0,0,0,0.12)";
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = "#00ff00";
ctx.font = fontSize + "px monospace";
for (let i = 0; i < drops.length; i++) {
const text = chars[Math.floor(Math.random() * chars.length)];
ctx.fillText(text, i * fontSize, drops[i] * fontSize);
if (drops[i] * fontSize > canvas.height && Math.random() > 0.98) {
drops[i] = 0;
}
drops[i]++;
}
setTimeout(() => requestAnimationFrame(drawMatrix), 60);
}
if (document.body.classList.contains("hacker")) {
drawMatrix();
}
</script>
</body>
</html>