kernel_panic_web/kernelpanic.lol/templates/layout.html

71 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>{{ this.title }}</title>
<style>
body, html {
height: 100%;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
#topbar {
width: 100%;
text-align: center;
border-bottom: 1px solid black;
}
.button {
display: inline-block;
padding: 10px;
border-right: 1px solid black;
transition: background-color 0.5s;
}
.button:hover {
background-color: #888;
}
.content {
max-width: 80%;
text-align: justify;
}
h1 {
text-align: left;
}
</style>
</head>
<body>
<div id="topbar">
<a href="/about"><div class="button">khe?</div></a>
<a href="/blog"><div class="button">noticiones</div></a>
<a href="/miranomasesosproyectos"><div class="button">proyectazos</div></a>
<!-- Add more buttons as needed -->
</div>
<div class="content">
<h1>{{ this.title }}</h1>
{{ this.body }}
</div>
<script>
document.body.addEventListener('click', function () {
var randomColor = 'rgb(' +
Math.floor(Math.random() * 256) + ',' +
Math.floor(Math.random() * 256) + ',' +
Math.floor(Math.random() * 256) + ')';
document.body.style.backgroundColor = randomColor;
document.getElementById('topbar').style.backgroundColor = randomColor;
});
var buttons = document.querySelectorAll('.button');
buttons.forEach(function(button) {
button.addEventListener('click', function() {
var randomColor = 'rgb(' +
Math.floor(Math.random() * 256) + ',' +
Math.floor(Math.random() * 256) + ',' +
Math.floor(Math.random() * 256) + ')';
this.style.backgroundColor = randomColor;
});
});
</script>
</body>
</html>