refactor(index.html): use new base template

This commit is contained in:
2026-03-12 20:42:03 +01:00
parent aa562a0eab
commit 12c5de9f11

View File

@@ -1,56 +1,42 @@
<!DOCTYPE html> {% extends "base/base.html" %}
<html lang="en">
<head> {% block title %}home{% endblock %}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> {% block content %}
<title>judas</title> <div id="content" class="center">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}"> <div style="margin-top: 2rem">
</head> <p>Welcome to</p>
<body> <h2 id="typing-text" style="font-size: 3rem">judas</h2>
<div id="wrapper"> <p>a remote PC fleet management system</p>
<header>
<h2><a href="{{ url_for('index.index') }}">judas</a></h2>
{% if logged %}
<p><a class="button" href="{{ url_for('auth.logout') }}">Logout</a></p>
{% else %}
<p><a class="button" href="{{ url_for('auth.login') }}">Login</a></p>
{% endif %}
</header>
<main class="center">
<div id="content">
<div>
<p>Welcome to</p>
<h2 id="typing-text" style="font-size: 3rem;">judas</h2>
<p>a remote PC fleet management system</p>
</div>
<p style="color: var(--ctp-red);"><strong>Notice:</strong> Please use this system responsibly and in accordance with all applicable laws and organizational policies.</p>
{% if logged %}
<p><a class="button" href="{{ url_for('panel.panel') }}">Go to panel</a></p>
{% else %}
<p>Please <a href="{{ url_for('auth.login')}}" class="link">log in</a> to manage your remote PCs.</p>
{% endif %}
</div>
</main>
</div> </div>
<script> <p style="color: var(--ctp-red)"><strong>Notice:</strong> Please use this system responsibly and in accordance with all applicable laws and organizational policies.</p>
var i = 0; {% if logged %}
var txt = document.getElementById("typing-text").innerHTML; <p><a class="button" href="{{ url_for('panel.panel') }}">Go to panel</a></p>
var minSpeed = 50; {% else %}
var maxSpeed = 200; <p>Please <a href="{{ url_for('auth.login')}}" class="link">log in</a> to manage your remote PCs.</p>
{% endif %}
</div>
{% endblock %}
document.getElementById("typing-text").innerHTML = ""; {% block scripts %}
<script>
var i = 0;
var txt = document.getElementById("typing-text").innerHTML;
var minSpeed = 50;
var maxSpeed = 200;
function typeWriter() { document.getElementById("typing-text").innerHTML = "";
if (i < txt.length) {
document.getElementById("typing-text").innerHTML += txt.charAt(i);
i++;
var randomDelay = Math.floor(Math.random() * (maxSpeed - minSpeed + 1)) + minSpeed; function typeWriter() {
setTimeout(typeWriter, randomDelay); if (i < txt.length) {
} document.getElementById("typing-text").innerHTML += txt.charAt(i);
i++;
var randomDelay = Math.floor(Math.random() * (maxSpeed - minSpeed + 1)) + minSpeed;
setTimeout(typeWriter, randomDelay);
} }
}
typeWriter(); typeWriter();
</script> </script>
</body> {% endblock %}
</html>