wip: progress

This commit is contained in:
2025-06-15 23:54:42 +02:00
parent 04d4e97f62
commit d983ab0f8b
5 changed files with 108 additions and 12 deletions

View File

@@ -4,6 +4,27 @@
box-sizing: border-box;
}
body {
background-color: #b48ead;
font-family: monospace, sans-serif !important;
color: #eceff4;
}
input {
font-family: inherit;
color: #eceff4;
background-color: #434c5e;
border: none;
border-radius: 0.25rem;
padding: 0.25rem;
}
#wrapper {
display: flex;
flex-direction: column;
min-height: 100vh;
}
header {
display: flex;
justify-content: space-between;
@@ -14,7 +35,36 @@ header {
}
main {
padding: 2rem;
background-color: #eceff4;
padding: 1rem;
background-color: #3b4252;
flex-grow: 1;
}
header a{
text-decoration: none;
color: #eceff4;
}
.button {
padding: 0.5rem 1rem;
border-radius: 0.25rem;
display: inline-block;
background-color: #8fbcbb;
transition: 0.3s ease-in-out;
border: none;
color: #2e3440;
}
.button:hover {
background-color: #81a1c1;
cursor: pointer;
}
.button a {
text-decoration: none;
color: #2e3440;
}
.center{
text-align: center;
}

View File

@@ -9,13 +9,39 @@
<body>
<div id="wrapper">
<header>
<h1>judas</h1>
<h1><a href="{{ url_for('index') }}">judas</a></h1>
{% if logged %}
<p>Welcome, {{ username }}! <a href="{{ url_for('logout') }}">Logout</a></p>
{% else %}
<p><a href="{{ url_for('login') }}">Login</a></p>
<p class="button"><a href="{{ url_for('login') }}">Login</a></p>
{% endif %}
</header>
<main class="center">
<h2 id="typing-text" style="font-size: 3rem;">Welcome to judas!</h2>
<p>a remote PC fleet management system</p>
<br>
<p style="color: #bf616a;"><strong>Notice:</strong> Please use this system responsibly and in accordance with all applicable laws and organizational policies.</p>
<p>Please log in to manage your remote PCs.</p>
</main>
</div>
<script>
var i = 0;
var txt = document.getElementById("typing-text").innerHTML;
var minSpeed = 50;
var maxSpeed = 200;
document.getElementById("typing-text").innerHTML = "";
function typeWriter() {
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();
</script>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>judas - login page</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
<div id="wrapper">
<header>
<h1><a href="{{ url_for('index') }}">judas</a></h1>
</header>
<main class="center">
<form method="post">
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<br><br>
<input type="submit" value="Login" class="button">
</form>
</main>
</div>
</body>
</html>

View File

@@ -9,10 +9,11 @@
<body>
<div id="wrapper">
<header>
<h1><a href="{{ url_for('panel') }}">judas panel</a></h1>
<p>Welcome, {{ username }}! <a href="{{ url_for('logout') }}">Logout</a></p>
<h1><a href="{{ url_for('panel') }}">judas</a></h1>
<p class="button"><a href="{{ url_for('logout') }}">Logout</a></p>
</header>
<main>
<h2>PCs</h2>
<table border="1">
<thead>
<tr>

View File

@@ -75,12 +75,7 @@ def login() -> str:
return flask.redirect(flask.url_for("panel"))
else:
return "Invalid password", 401
return """
<form method="post">
Password: <input type="password" name="password">
<input type="submit" value="Login">
</form>
"""
return flask.render_template("login.html")
@app.route("/logout")