mirror of
https://github.com/redstrate/Kawari.git
synced 2025-05-06 04:37:46 +00:00
Redesign the remaining account management pages and the homepage
This commit is contained in:
parent
04b104cbfc
commit
687c56fac8
10 changed files with 77 additions and 31 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<main class="d-flex" style="height: 100vh">
|
<main class="d-flex" style="height: 100vh">
|
||||||
<div class="d-flex flex-column p-3 text-bg-dark" style="width: 280px;">
|
<div class="d-flex flex-column p-3 text-bg-dark bg-body-tertiary" style="width: 280px;">
|
||||||
<a href="/account/app/svc/manage" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none">
|
<a href="/account/app/svc/manage" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none">
|
||||||
<span class="fs-4">Manage Account</span>
|
<span class="fs-4">Manage Account</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
|
|
||||||
{% block accountbody %}
|
{% block accountbody %}
|
||||||
<form method='post'>
|
<form method='post'>
|
||||||
<label for="old_password">Old Password:</label><br>
|
<label for="old_password" class="form-label">Old Password:</label><br>
|
||||||
<input type='text' id='old_password' name='old_password'/><br>
|
<input type='password' id='old_password' name='old_password' class="form-control"/><br>
|
||||||
<label for="new_password">New Password:</label><br>
|
<label for="new_password" class="form-label">New Password:</label><br>
|
||||||
<input type='text' id='new_ppassword' name='new_password'/><br>
|
<input type='password' id='new_ppassword' name='new_password' class="form-control"/><br>
|
||||||
<button type='submit'>Submit</button>
|
<button type='submit' class="btn btn-primary">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "login_base.html" %}
|
||||||
|
|
||||||
{% block title %}Kawari - Login{% endblock %}
|
{% block title %}Kawari - Login{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block loginbody %}
|
||||||
<form method='post'>
|
<form method='post'>
|
||||||
<label for="username">Username:</label><br>
|
<label for="username" class="form-label">Username</label><br>
|
||||||
<input type='text' id='username' name='username'/><br>
|
<input type='text' id='username' name='username' class="form-control"/><br>
|
||||||
<label for="password">Password:</label><br>
|
<label for="password" class="form-label">Password</label><br>
|
||||||
<input type='text' id='password' name='password'/><br>
|
<input id='password' name='password' class="form-control" type="password"/><br>
|
||||||
<button type='submit'>Login</button>
|
<button type='submit' class="btn btn-primary">Login</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
9
resources/templates/login_base.html
Normal file
9
resources/templates/login_base.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<main>
|
||||||
|
<section class="py-5 text-center container" style="max-width:300px">
|
||||||
|
{% block loginbody %}{% endblock %}
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
{% endblock %}
|
|
@ -1,13 +1,13 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "login_base.html" %}
|
||||||
|
|
||||||
{% block title %}Kawari - Register{% endblock %}
|
{% block title %}Kawari - Register{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block loginbody %}
|
||||||
<form action='/oauth/oa/registlist' method='post'>
|
<form action='/oauth/oa/registlist' method='post'>
|
||||||
<label for="username">Username:</label><br>
|
<label for="username" class="form-label">Username:</label><br>
|
||||||
<input type='text' id='username' name='username'/><br>
|
<input type='text' id='username' name='username' class="form-control"/><br>
|
||||||
<label for="password">Password:</label><br>
|
<label for="password" class="form-label">Password:</label><br>
|
||||||
<input type='text' id='password' name='password'/><br>
|
<input id='password' name='password' class="form-control" type="password"/><br>
|
||||||
<button type='submit'>Register</button>
|
<button type='submit' class="btn btn-primary">Register</button>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "web_base.html" %}
|
||||||
|
|
||||||
{% block title %}Kawari{% endblock %}
|
{% block title %}Kawari{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block webbody %}
|
||||||
<p>Welcome to Kawari!</p>
|
<section class="py-5 text-center container">
|
||||||
|
<p>Welcome to Kawari!</p>
|
||||||
<a href="http://{{ login_server }}/oauth/oa/oauthlogin">Login</a>
|
</section>
|
||||||
<a href="http://{{ login_server }}/oauth/oa/registligt">Signup</a>
|
|
||||||
<a href="/worldstatus">World Status</a>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
25
resources/templates/web_base.html
Normal file
25
resources/templates/web_base.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<a class="navbar-brand" href="/">Kawari</a>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="http://{{ login_server }}/oauth/oa/oauthlogin">Login</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="http://{{ login_server }}/oauth/oa/registligt">Register</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/worldstatus">World Status</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<main>
|
||||||
|
{% block webbody %}{% endblock %}
|
||||||
|
</main>
|
||||||
|
{% endblock %}
|
|
@ -1,8 +1,10 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "web_base.html" %}
|
||||||
|
|
||||||
{% block title %}Kawari - World Status{% endblock %}
|
{% block title %}Kawari - World Status{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block webbody %}
|
||||||
<p>Worlds open: {{ worlds_open }}</p>
|
<section class="py-5 text-center container">
|
||||||
<p>Login open: {{ login_open }}</p>
|
<p>Worlds open: {{ worlds_open }}</p>
|
||||||
|
<p>Login open: {{ login_open }}</p>
|
||||||
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -28,6 +28,12 @@ fn setup_default_environment() -> Environment<'static> {
|
||||||
.expect("Failed to find template!"),
|
.expect("Failed to find template!"),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
env.add_template_owned(
|
||||||
|
"login_base.html",
|
||||||
|
std::fs::read_to_string("resources/templates/login_base.html")
|
||||||
|
.expect("Failed to find template!"),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
env.add_template_owned(
|
env.add_template_owned(
|
||||||
"login.html",
|
"login.html",
|
||||||
std::fs::read_to_string("resources/templates/login.html")
|
std::fs::read_to_string("resources/templates/login.html")
|
||||||
|
|
|
@ -14,6 +14,12 @@ fn setup_default_environment() -> Environment<'static> {
|
||||||
.expect("Failed to find template!"),
|
.expect("Failed to find template!"),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
env.add_template_owned(
|
||||||
|
"web_base.html",
|
||||||
|
std::fs::read_to_string("resources/templates/web_base.html")
|
||||||
|
.expect("Failed to find template!"),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
env.add_template_owned(
|
env.add_template_owned(
|
||||||
"web.html",
|
"web.html",
|
||||||
std::fs::read_to_string("resources/templates/web.html").expect("Failed to find template!"),
|
std::fs::read_to_string("resources/templates/web.html").expect("Failed to find template!"),
|
||||||
|
|
Loading…
Add table
Reference in a new issue