mirror of
https://github.com/Project-Redacted/Highscores-Server.git
synced 2025-05-29 22:43:13 +00:00
Add templates and many other things
This commit is contained in:
parent
330201be3a
commit
62945c943d
414 changed files with 14758 additions and 4145 deletions
23
server/templates/auth.html
Normal file
23
server/templates/auth.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="auth">
|
||||
<h2>Login</h2>
|
||||
<form action="" method="POST">
|
||||
<input type="text" name="username" placeholder="Username | Email" required>
|
||||
<input type="password" name="password" placeholder="Password" required>
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p style="text-align: center;">or</p>
|
||||
|
||||
<div class="auth">
|
||||
<h2>Register</h2>
|
||||
<form action="" method="POST">
|
||||
<input type="text" name="username" placeholder="Username" required>
|
||||
<input type="email" name="email" placeholder="Email - Optional">
|
||||
<input type="password" name="password" placeholder="Password" required>
|
||||
<button type="submit" class="secondary">Register</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
31
server/templates/base.html
Normal file
31
server/templates/base.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Front Rooms Highscores</title>
|
||||
{% assets "styles" %}
|
||||
<link rel="stylesheet" href="{{ ASSET_URL }}" type="text/css">
|
||||
{% endassets %}
|
||||
</head>
|
||||
<body>
|
||||
<img src="{{ url_for("static", filename="bg.png") }}" alt="The Front Rooms pause menu" class="background">
|
||||
<div class="app">
|
||||
<img src="{{ url_for("static", filename="title.png") }}" alt="The Front Rooms logo" class="title">
|
||||
<nav>
|
||||
<a href="{{ url_for('views.index', diff=0) }}" class="button">Level 1</a>
|
||||
<a href="{{ url_for('views.index', diff=1) }}" class="button">Level 2</a>
|
||||
<a href="{{ url_for('views.index', diff=2) }}" class="button">Level 3</a>
|
||||
<a href="{{ url_for('views.index', diff=3) }}" class="button">Normal</a>
|
||||
<a href="{{ url_for('views.index', diff=4) }}" class="button">Hard</a>
|
||||
|
||||
<span></span> <!-- This is a spacer -->
|
||||
|
||||
<a href="{{ url_for('auth.auth') }}" class="button secondary">Login</a>
|
||||
</nav>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
30
server/templates/scores.html
Normal file
30
server/templates/scores.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
{% if scores %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>Position</th>
|
||||
<th>Player</th>
|
||||
<th>Difficulty</th>
|
||||
<th>Score</th>
|
||||
</tr>
|
||||
{% for score in top_scores %}
|
||||
<tr>
|
||||
<td>{{ loop.index }}</td>
|
||||
{% if score.anonymous %}
|
||||
<td>{{ score.username }}</td>
|
||||
{% else %}
|
||||
<td>{{ score.scorer.username }}</td>
|
||||
{% endif %}
|
||||
<td>{{ score.difficulty }}</td>
|
||||
<td>{{ score.score }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="center-text">
|
||||
<h2>No scores yet</h2>
|
||||
<p>Set some!</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue