Add account page and login system

This commit is contained in:
Michał Gdula 2023-05-08 01:00:40 +01:00
parent ebdef07840
commit ffba2b3b7b
11 changed files with 154 additions and 63 deletions

View file

@ -5,30 +5,33 @@
<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 "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">
<img src="{{ url_for('static', filename='bg.png') }}" alt="The Front Rooms pause menu" class="background">
<div class="app">
<header>
<img src="{{ url_for("static", filename="title.png") }}" alt="The Front Rooms logo" class="title" height="60px">
<img src="{{ url_for('static', filename='title.png') }}" alt="The Front Rooms logo" class="title" height="60px">
<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>
<a href="{{ url_for('views.index') }}" class="button"><i class="ph ph-house"></i></a>
<a href="{{ url_for('views.about') }}" class="button"><i class="ph ph-info"></i></a>
<a href="#" class="button"><i class="ph ph-download-simple"></i></a>
<span></span> <!-- This is a spacer -->
<!-- This is a spacer -->
<span></span>
{% if current_user.is_authenticated %}
<a href="{{ url_for('auth.account') }}" class="button secondary">Account</a>
<a href="{{ url_for('auth.account') }}" class="button primary">{{ current_user.username }}</a>
{% else %}
<a href="{{ url_for('auth.auth') }}" class="button secondary">Login</a>
<a href="{{ url_for('auth.auth') }}" class="button primary"><i class="ph ph-identification-card"></i></a>
{% endif %}
</nav>
<!-- Secondary nav bar for page specific content -->
{% block nav %}{% endblock %}
</header>
<!-- This is where the flash messages will be displayed -->