2
0
Fork 0

implement terminal autoscrolling

This commit is contained in:
Florian Sorg 2022-05-21 19:36:06 +02:00
parent 084739b7a7
commit 442b239b12
1 changed files with 28 additions and 1 deletions

View File

@ -8,7 +8,6 @@
<link rel="icon" href="{% static 'tonkakt.svg' %}" sizes="any" type="image/svg+xml"> <link rel="icon" href="{% static 'tonkakt.svg' %}" sizes="any" type="image/svg+xml">
<link rel="stylesheet" href="{% static 'bulma.min.css' %}"> <link rel="stylesheet" href="{% static 'bulma.min.css' %}">
<link rel="stylesheet" href="{% static 'bulma-prefers-dark.min.css' %}"> <link rel="stylesheet" href="{% static 'bulma-prefers-dark.min.css' %}">
<meta http-equiv="refresh" content="60">
<style> <style>
@font-face { @font-face {
font-family: "Maven Pro"; font-family: "Maven Pro";
@ -29,6 +28,34 @@
} }
} }
</style> </style>
<script>
window.addEventListener('load', () => {
const max = document.body.scrollHeight - window.innerHeight;
let current = 0;
let interval;
window.scrollTo({top: 0});
if (max > 0) {
setTimeout(() => {
interval = setInterval(() => {
current += 1;
window.scrollTo({top: current});
if (window.scrollY >= max) {
clearInterval(interval);
setTimeout(() => {
window.location.reload();
}, 5000)
}
}, 20);
}, 5000)
}
setTimeout(window.location.reload, 120 * 1000)
});
</script>
</head> </head>
<body> <body>
<section class="section"> <section class="section">