style and lighthouse score

This commit is contained in:
iou1name 2019-09-25 15:12:58 -04:00
parent a93a178b57
commit c66efb985a
6 changed files with 89 additions and 53 deletions

View File

@ -8,10 +8,12 @@
</script> </script>
<script type="text/javascript" src="/static/buckler.js"></script> <script type="text/javascript" src="/static/buckler.js"></script>
<script>window.onload = load;</script> <script>window.onload = load;</script>
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<meta name="description" content="A small shield for web applications.">
</head> </head>
<body> <body>
<header> <header>
<object id="logo" data="/static/buckler_icon.svg"></object> <object id="logo" title="Buckler logo" data="/static/buckler_icon.svg"></object>
<h1>Buckler</h1> <h1>Buckler</h1>
</header> </header>
<main> <main>

View File

@ -2,22 +2,28 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>Buckler - Login</title> <title>Buckler - Login</title>
<link rel="stylesheet" type="text/css" href="/static/buckler.css">
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<meta name="description" content="A small shield for web applications.">
</head> </head>
<body> <body>
<header> <header>
<object id="logo" title="Buckler logo" data="/static/buckler_icon.svg"></object>
<h1>Buckler Login</h1> <h1>Buckler Login</h1>
</header> </header>
<main> <main>
<form action="{{ request.app.router['login'].url_for() }}" method="post" enctype="application/x-www-form-urlencoded"> <section>
<label for="username">Username</label> <form action="{{ request.app.router['login'].url_for() }}" method="post" enctype="application/x-www-form-urlencoded">
<input id="username" name="username" type="text"><br> <label for="username">Username</label>
<label for="password">Password</label> <input id="username" name="username" type="text"><br>
<input id="password" name="password" type="password"><br> <label for="password">Password</label>
{% if login_failed %} <input id="password" name="password" type="password"><br>
<ul><li>Username and/or password incorrect</li></ul> {% if login_failed %}
{% endif %} <ul><li>Username and/or password incorrect</li></ul>
<input type="submit" value="Login"> {% endif %}
</form> <input type="submit" value="Login">
</form>
</section>
</main> </main>
</body> </body>
</html> </html>

View File

@ -7,9 +7,12 @@
<script type="text/javascript" src="/static/buckler-auth.js"></script> <script type="text/javascript" src="/static/buckler-auth.js"></script>
<script>const url_prefix = '{{ url_prefix }}';</script> <script>const url_prefix = '{{ url_prefix }}';</script>
<script>window.onload = login;</script> <script>window.onload = login;</script>
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<meta name="description" content="A small shield for web applications.">
</head> </head>
<body> <body>
<header> <header>
<object id="logo" title="Buckler logo" data="/static/buckler_icon.svg"></object>
<h1>Buckler Login</h1> <h1>Buckler Login</h1>
</header> </header>
<main> <main>

View File

@ -2,40 +2,50 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>Buckler - Register</title> <title>Buckler - Register</title>
<link rel="stylesheet" type="text/css" href="/static/buckler.css">
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<meta name="description" content="A small shield for web applications.">
</head> </head>
<body> <body>
<h1>Buckler Register</h1> <header>
<form method="POST" enctype="application/x-www-form-urlencoded"> <object id="logo" title="Buckler logo" data="/static/buckler_icon.svg"></object>
<label for="username">Username</label> <h1>Buckler Register</h1>
<input id="username" name="username" type="text" minlength="3" maxlength="20"><br> </header>
{% if errors['username'] %} <main>
<ul> <section>
{% for error in errors['username'] %} <form method="POST" enctype="application/x-www-form-urlencoded">
<li class="error">{{ error }}</li> <label for="username">Username</label>
{% endfor %} <input id="username" name="username" type="text" minlength="3" maxlength="20"><br>
</ul> {% if errors['username'] %}
{% endif %} <ul>
<label for="email">Email</label> {% for error in errors['username'] %}
<input id="email" name="email" type="email"><br> <li class="error">{{ error }}</li>
{% if errors['email'] %} {% endfor %}
<ul> </ul>
{% for error in errors['email'] %} {% endif %}
<li class="error">{{ error }}</li> <label for="email">Email</label>
{% endfor %} <input id="email" name="email" type="email"><br>
</ul> {% if errors['email'] %}
{% endif %} <ul>
<label for="password">Password</label> {% for error in errors['email'] %}
<input id="password" name="password" type="password" minlength="8" maxlength="10240"><br> <li class="error">{{ error }}</li>
<label for="password_verify">Verify Password</label> {% endfor %}
<input id="password_verify" name="password_verify" type="password" minlength="8" maxlength="10240"><br> </ul>
{% if errors['password'] %} {% endif %}
<ul> <label for="password">Password</label>
{% for error in errors['password'] %} <input id="password" name="password" type="password" minlength="8" maxlength="10240"><br>
<li class="error">{{ error }}</li> <label for="password_verify">Verify Password</label>
{% endfor %} <input id="password_verify" name="password_verify" type="password" minlength="8" maxlength="10240"><br>
</ul> {% if errors['password'] %}
{% endif %} <ul>
<input type="submit" value="Register"> {% for error in errors['password'] %}
</form> <li class="error">{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
<input type="submit" value="Register">
</form>
</section>
</main>
</body> </body>
</html> </html>

View File

@ -6,17 +6,21 @@
<script type="text/javascript" src="/static/cbor.js"></script> <script type="text/javascript" src="/static/cbor.js"></script>
<script type="text/javascript" src="/static/buckler-auth.js"></script> <script type="text/javascript" src="/static/buckler-auth.js"></script>
<script>const url_prefix = '{{ url_prefix }}';</script> <script>const url_prefix = '{{ url_prefix }}';</script>
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<meta name="description" content="A small shield for web applications.">
</head> </head>
<body> <body>
<header>
<object id="logo" title="Buckler logo" data="/static/buckler_icon.svg"></object>
<h1>Register Security Key</h1>
</header>
<main> <main>
<div id="devices"> <section>
<div class="device"> <p>Upon clicking submit, your security key will begin flashing. Have it ready.
<h1>Register Security Key</h1> <p><label for="security_key_nick">Security key nick</label>
<p>Upon clicking submit, your security key will begin flashing. Have it ready. <input id="security_key_nick" type="text" minlength="1" maxlength="64" required>
<p><label for="security_key_nick">Security key nick</label> <input id="security_key_nick" type="text" minlength="1" maxlength="64" required> <p><input type="button" value="Submit" onclick="register()">
<p><input type="button" value="Submit" onclick="register()"> </section>
</div>
</div>
</main> </main>
</body> </body>
</html> </html>

View File

@ -2,8 +2,19 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>Buckler - Register</title> <title>Buckler - Register</title>
<link rel="stylesheet" type="text/css" href="/static/buckler.css">
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<meta name="description" content="A small shield for web applications.">
</head> </head>
<body> <body>
{{ message }} <header>
<object id="logo" title="Buckler logo" data="/static/buckler_icon.svg"></object>
<h1>Buckler Register</h1>
</header>
<main>
<section>
{{ message }}
</section>
</main>
</body> </body>
</html> </html>