mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-29 14:13:11 +00:00
Fix Commit history
This commit is contained in:
parent
a29f06dfee
commit
d26d8cb021
70 changed files with 674 additions and 477 deletions
5
TFR/server/templates/about.html
Normal file
5
TFR/server/templates/about.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h2>What is The Front Rooms?</h2>
|
||||
<h2>Project Redacted</h2>
|
||||
{% endblock %}
|
32
TFR/server/templates/account.html
Normal file
32
TFR/server/templates/account.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{% extends "base.html" %}
|
||||
{% block nav %}
|
||||
<hr>
|
||||
<nav>
|
||||
<a href="{{ url_for('auth.account', action='logout') }}" class="button">Your Profile</a>
|
||||
<span class="spacer"></span>
|
||||
<a href="{{ url_for('auth.account', action='logout') }}" class="button secondary">Logout</a>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h2>Tokens</h2>
|
||||
<p>These are your API tokens. Used to link the uploaded scores with your account.</p>
|
||||
<table>
|
||||
{% for token in token_list %}
|
||||
<tr id="token-{{ token.id }}">
|
||||
<td><button onclick="deleteToken({{ token.id }})" class="button secondary"><i class="ph ph-trash"></i></button></td>
|
||||
<td><button onclick="viewToken({{ token.id }})" class="button primary"><i class="ph ph-eye"></i></button></td>
|
||||
<td class="hidden">{{ token.token }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<button onclick="addToken()" class="button primary">Create New Token</button>
|
||||
</div>
|
||||
|
||||
<div class="block secondary">
|
||||
<h2>Danger Zone</h2>
|
||||
<p>These actions are irreversible. Be careful!</p>
|
||||
<a href="{{ url_for('auth.account', action='delete') }}" class="button secondary">Delete Account</a>
|
||||
<a href="{{ url_for('auth.account', action='password') }}" class="button secondary">Reset Password</a>
|
||||
</div>
|
||||
{% endblock %}
|
22
TFR/server/templates/auth.html
Normal file
22
TFR/server/templates/auth.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h2>Login</h2>
|
||||
<p>Welcome back!</p>
|
||||
<form action="{{ url_for('auth.login') }}" method="POST">
|
||||
<input type="text" name="username" placeholder="Username" required>
|
||||
<input type="password" name="password" placeholder="Password" required>
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<h2>Register</h2>
|
||||
<p>Don't have an account? Register here!</p>
|
||||
<form action="{{ url_for('auth.register') }}" method="POST">
|
||||
<input type="text" name="username" placeholder="Username" required>
|
||||
<input type="password" name="password" placeholder="Password" required>
|
||||
<button type="submit">Register</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
64
TFR/server/templates/base.html
Normal file
64
TFR/server/templates/base.html
Normal file
|
@ -0,0 +1,64 @@
|
|||
<!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>
|
||||
|
||||
<script src="https://unpkg.com/@phosphor-icons/web"></script>
|
||||
{% assets "scripts" %}<script src="{{ ASSET_URL }}"></script>{% endassets %}
|
||||
{% assets "styles" %}<link rel="stylesheet" href="{{ ASSET_URL }}" type="text/css">{% endassets %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="search-hint">
|
||||
<p>Start typing to see results...</p>
|
||||
</div>
|
||||
|
||||
<picture class="background">
|
||||
<source srcset="{{ url_for('static', filename='background.webp') }}">
|
||||
<img src="{{ url_for('static', filename='background.png') }}" alt="The Front Rooms Level select render">
|
||||
</picture>
|
||||
|
||||
<div class="app">
|
||||
<!-- Get flashed lol -->
|
||||
<div class="flash">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<p class="{{ category }}" onclick="this.remove()"><span><i class="ph-bold ph-x"></i></span>{{ message }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
<header>
|
||||
<picture class="title">
|
||||
<source srcset="{{ url_for('static', filename='title.webp') }}">
|
||||
<img src="{{ url_for('static', filename='title.png') }}" alt="The Front Rooms logo">
|
||||
</picture>
|
||||
|
||||
<nav>
|
||||
<a href="{{ url_for('views.index') }}" class="button">Scores</a>
|
||||
<a href="{{ url_for('views.about') }}" class="button">About</a>
|
||||
<a href="{{ url_for('views.about') }}" class="button">Updates</a>
|
||||
|
||||
<span class="spacer"></span>
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
<a href="{{ url_for('auth.account') }}" class="button primary">{{ current_user.username }}</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('auth.auth') }}" class="button primary"><i class="ph ph-user-circle"></i></a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
||||
<!-- Secondary nav bar for page specific content -->
|
||||
{% block nav %}{% endblock %}
|
||||
</header>
|
||||
|
||||
<main>{% block content %}{% endblock %}</main>
|
||||
|
||||
<footer><p>By Project Redacted | <a href="https://github.com/Fluffy-Bean/GameExpo23">Server Source</a></p></footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
8
TFR/server/templates/error.html
Normal file
8
TFR/server/templates/error.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="center-text">
|
||||
<h2>{{ error }}</h2>
|
||||
<p>{{ msg }}</p>
|
||||
<image src="{{ url_for('static', filename='error-images/' + image + '.jpg') }}" alt="Error">
|
||||
</div>
|
||||
{% endblock %}
|
72
TFR/server/templates/scores.html
Normal file
72
TFR/server/templates/scores.html
Normal file
|
@ -0,0 +1,72 @@
|
|||
{% extends "base.html" %}
|
||||
{% block nav %}
|
||||
<hr>
|
||||
<nav>
|
||||
<form method="GET" action="{{ url_for('views.index') }}">
|
||||
<select name="diff" class="button">
|
||||
<option value="0" {% if diff==0 %}selected{% endif %}>Level 1</option>
|
||||
<option value="1" {% if diff==1 %}selected{% endif %}>Level 2</option>
|
||||
<option value="2" {% if diff==2 %}selected{% endif %}>Level 3</option>
|
||||
<option value="3" {% if diff==3 %}selected{% endif %}>Normal</option>
|
||||
<option value="4" {% if diff==4 %}selected{% endif %}>Hard</option>
|
||||
</select>
|
||||
|
||||
<select name="ver" class="button">
|
||||
<option value="alpha" {% if ver=="alpha" %}selected{% endif %}>Alpha</option>
|
||||
<option value="beta" {% if ver=="beta" %}selected{% endif %}>Beta</option>
|
||||
<option value="1.0" {% if ver=="1.0" %}selected{% endif %}>1.0</option>
|
||||
<option value="1.1" {% if ver=="1.1" %}selected{% endif %}>1.1</option>
|
||||
</select>
|
||||
|
||||
<span class="search">
|
||||
<label for="user">Username</label>
|
||||
<input type="text" name="user" {% if user %}value="{{ user }}"{% endif %} autocomplete="off"/>
|
||||
</span>
|
||||
|
||||
<button class="button"><i class="ph ph-magnifying-glass"></i></button>
|
||||
</form>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if scores %}
|
||||
<div class="table">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Position</th>
|
||||
<th>Player</th>
|
||||
<th>Time</th>
|
||||
<th>Scored at</th>
|
||||
<th>Version</th>
|
||||
</tr>
|
||||
{% for score in scores %}
|
||||
<tr>
|
||||
{% if loop.index == 1 %}
|
||||
<td><i class="first ph-fill ph-crown"></i></td>
|
||||
{% elif loop.index == 2 %}
|
||||
<td><i class="second ph-duotone ph-crown"></i></td>
|
||||
{% elif loop.index == 3 %}
|
||||
<td><i class="third ph ph-crown"></i></td>
|
||||
{% else %}
|
||||
<td>{{ loop.index }}</td>
|
||||
{% endif %}
|
||||
|
||||
{% if score.users.id == current_user.id %}
|
||||
<td class="player">{{ score.users.username }}</td>
|
||||
{% else %}
|
||||
<td>{{ score.users.username }}</td>
|
||||
{% endif %}
|
||||
|
||||
<td>{{ score.score }}</td>
|
||||
<td>{{ score.scored_at }}</td>
|
||||
<td>{{ score.version }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="center-text">
|
||||
<h2>No scores</h2>
|
||||
<p>Go set some!</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue