mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-06-04 16:13:11 +00:00
Yeet useless tables
Yeet useless data paths in dockerfile Add order into templates file
This commit is contained in:
parent
b19dedc568
commit
300c80fcd5
17 changed files with 86 additions and 106 deletions
|
@ -1,43 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h2>Login</h2>
|
||||
<p>Welcome back!</p>
|
||||
<form action="{{ url_for('auth.login') }}" method="POST">
|
||||
<span class="text-input">
|
||||
<label for="login-username">Username</label>
|
||||
<input type="text" name="username" id="login-username" required>
|
||||
</span>
|
||||
|
||||
<span class="text-input">
|
||||
<label for="login-password">Password</label>
|
||||
<input type="password" name="password" id="login-password" required>
|
||||
</span>
|
||||
|
||||
<button type="submit" class="button primary">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<h2>Register</h2>
|
||||
<p>Don't have an account?</p>
|
||||
<form action="{{ url_for('auth.register') }}" method="POST">
|
||||
<span class="text-input">
|
||||
<label for="register-username">Username</label>
|
||||
<input type="text" name="username" id="register-username" required>
|
||||
</span>
|
||||
|
||||
<span class="text-input">
|
||||
<label for="register-password">Password</label>
|
||||
<input type="password" name="password" id="register-password" minlength="8" required>
|
||||
</span>
|
||||
|
||||
<span class="text-input">
|
||||
<label for="register-confirm">Confirm</label>
|
||||
<input type="password" name="confirm" id="register-confirm" minlength="8" required>
|
||||
</span>
|
||||
|
||||
<button type="submit" class="button primary">Register</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Front Rooms Highscores</title>
|
||||
<title>{% block title %}Front Rooms Highscores{% endblock %}</title>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
@ -16,10 +16,9 @@
|
|||
{% assets "scripts" %}<script src="{{ ASSET_URL }}"></script>{% endassets %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="search-hint">
|
||||
<p>Start typing to see results...</p>
|
||||
</div>
|
||||
<div class="search-hint"><p>Start typing to see results...</p></div>
|
||||
|
||||
<!-- Hopefully I can make this change seasonally/weekly/something-ly -->
|
||||
<picture class="background">
|
||||
<source srcset="{{ url_for('static', filename='images/background.webp') }}">
|
||||
<img src="{{ url_for('static', filename='images/background.png') }}" alt="The Front Rooms Level select render">
|
||||
|
@ -28,38 +27,30 @@
|
|||
<div class="app">
|
||||
<!-- Get flashed lol -->
|
||||
<div class="flash">
|
||||
<!-- My bad -->
|
||||
{% 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>
|
||||
<p class="{{ category }}" onclick="this.remove()">
|
||||
<span><i class="ph-bold ph-x"></i></span>
|
||||
{{ message }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
<header>
|
||||
<!-- Overcomplicated header, probably should just use CSS for some of this stuff -->
|
||||
<picture class="title">
|
||||
<source srcset="{{ url_for('static', filename='images/title.webp') }}">
|
||||
<img src="{{ url_for('static', filename='images/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>
|
||||
<!-- Import navigation bar -->
|
||||
{% include 'navigation.html' %}
|
||||
|
||||
<span class="spacer"></span>
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
<a href="{{ url_for('views.settings') }}" class="button primary">
|
||||
{{ current_user.username }}
|
||||
{% if not current_user.email %}<i class="ph ph-warning"></i>{% endif %}
|
||||
</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 -->
|
||||
<!-- Second nav for page specific tools -->
|
||||
{% block nav %}{% endblock %}
|
||||
</header>
|
||||
|
||||
|
|
15
TFR/server/templates/macros/input.html
Normal file
15
TFR/server/templates/macros/input.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% macro text(id, name, type="text", required=False, minlength=0) %}
|
||||
<span class="text-input">
|
||||
<label for="{{ id }}">
|
||||
{{ name|title }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
type="{{ type }}"
|
||||
name="{{ name }}"
|
||||
id="{{ id }}"
|
||||
{% if required %}required{% endif %}
|
||||
minlength="{{ minlength }}"
|
||||
>
|
||||
</span>
|
||||
{% endmacro %}
|
15
TFR/server/templates/navigation.html
Normal file
15
TFR/server/templates/navigation.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<nav>
|
||||
<a href="{{ url_for('views.index') }}" class="button">Scores</a>
|
||||
<a href="{{ url_for('views.about') }}" class="button">About</a>
|
||||
|
||||
<span class="spacer"></span>
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
<a href="{{ url_for('views.settings') }}" class="button primary">
|
||||
{{ current_user.username }}
|
||||
{% if not current_user.email %}<i class="ph ph-warning"></i>{% endif %}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('auth.auth') }}" class="button primary"><i class="ph ph-user-circle"></i></a>
|
||||
{% endif %}
|
||||
</nav>
|
25
TFR/server/templates/views/auth.html
Normal file
25
TFR/server/templates/views/auth.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% extends "base.html" %}
|
||||
{% from "macros/input.html" import text %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block">
|
||||
<h2>Login</h2>
|
||||
<p>Welcome back!</p>
|
||||
<form action="{{ url_for('auth.login') }}" method="POST">
|
||||
{{ text(id="login-username", name="username", required=True) }}
|
||||
{{ text(id="login-password", name="password", type="password", required=True) }}
|
||||
<button type="submit" class="button primary">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<h2>Register</h2>
|
||||
<p>Don't have an account?</p>
|
||||
<form action="{{ url_for('auth.register') }}" method="POST">
|
||||
{{ text(id="register-username", name="username", required=True) }}
|
||||
{{ text(id="register-password", name="password", type="password", required=True, minlength=8) }}
|
||||
{{ text(id="register-confirm", name="confirm", type="password", required=True, minlength=8) }}
|
||||
<button type="submit" class="button primary">Register</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue