WIP registration platform + discord bot

This commit is contained in:
2026-01-03 20:37:22 +01:00
parent 073087e644
commit 5afac8f90d
13 changed files with 648 additions and 0 deletions

113
app/templates/index.html Normal file
View File

@@ -0,0 +1,113 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TUM CTF Registration</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<style>
body {
font-family: 'Courier New', monospace;
background: #1a1a1a;
color: #00ff00;
margin: 0;
padding: 10px; /* Reduced for mobile */
font-size: 18px; /* Balanced size for readability */
}
.container {
max-width: 600px; /* Prevents it from stretching too wide on desktop */
margin: 20px auto;
background: #222;
padding: 20px;
border: 1px solid #00ff00;
box-sizing: border-box; /* Ensures padding doesn't break layout */
}
h1 { font-size: 1.5rem; word-wrap: break-word; }
input[type="text"], input[type="email"] {
width: 100%;
padding: 12px;
margin: 10px 0;
background: #000;
color: #00ff00;
border: 1px solid #00ff00;
box-sizing: border-box;
font-size: 16px; /* Prevents iOS from zooming in on focus */
}
button {
background: #00ff00;
color: #000;
padding: 15px 20px;
border: none;
font-weight: bold;
cursor: pointer;
width: 100%; /* Full width button is easier to tap on mobile */
font-family: inherit;
}
.alert { padding: 10px; margin-bottom: 10px; border: 1px solid white; font-size: 14px; }
.alert.error { border-color: red; color: red; }
.alert.success { border-color: #00ff00; }
ul { padding-left: 20px; }
li { margin-bottom: 10px; }
/* Small screen adjustments */
@media (max-width: 480px) {
body { font-size: 16px; }
.container { padding: 15px; }
h1 { font-size: 1.2rem; }
}
</style>
</head>
<body>
<div class="container">
<h1>> TUM CTF 2025_</h1>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert {{ category }}">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}
<div class="status">
<h2>Spots Remaining: {{ spots_left }} / 84</h2>
</div>
{% if spots_left > 0 %}
<form method="POST">
<label>Name</label>
<input type="text" name="name" required>
<label>TUM Email</label>
<input type="email" name="email" placeholder="@tum.de" required>
<label style="display:block; margin: 20px 0; line-height: 1.4;">
<input type="checkbox" name="looking_for_team" style="transform: scale(1.2); margin-right: 10px;">
[ ] I need a team / looking for group
</label>
<button type="submit">INITIALIZE_REGISTRATION</button>
</form>
{% else %}
<h2 style="color:red">EVENT FULL</h2>
{% endif %}
<hr style="border-color: #333; margin: 30px 0;">
<div class="info">
<h3>> SYSTEM_INFO</h3>
<ul>
<li><strong>Team Size:</strong> 4 People</li>
<li><strong>Location:</strong> MI Rechnerhalle, Garching</li>
<li><strong>Date:</strong> 16.01.2026 12:00</li>
</ul>
</div>
</div>
</body>
</html>