add signature verification module

- (the (test) signature allegedly has the wrong length?)
- add login route for main.py
This commit is contained in:
lare 2022-11-12 14:50:18 +01:00
parent 6344dbb07f
commit 9fa16e1ac9
11 changed files with 215 additions and 24 deletions

19
web/frontend/base.html Normal file
View file

@ -0,0 +1,19 @@
<!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>{{config["MNT"]}} Autopeering</title>
<link rel="stylesheet" href="static/style.css">
</head>
<body>
<header class="flex">{{config["MNT"]}}</header>
<div class="content flex">{% block content %}{% endblock %}</div>
<footer class="flex">
<div></div>
<div></div>
<div> &#127279; LARE-MNT</div>
</footer>
</body>
</html>

View file

@ -1,17 +1,30 @@
<!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>{{config["MNT"]}} Autopeering</title>
<link rel="stylesheet" href="static/style.css">
</head>
<body>
<div class="content">
<div>{{config["MNT"]}}</div>
<div></div>
<div></div>
</div>
</body>
</html>
{% extends 'base.html' %}
{% block content %}
<div>
</div>
<div>
</div>
<div>
<table>
<thead>
<tr>
<th>Country</th>
<th>City</th>
<th>peerings</th>
<th>Peer!</th>
</tr>
</thead>
{% for node in config["nodes"] %}
<tr>
<td>{{config["nodes"][node]["country"]}}</td>
<td>{{config["nodes"][node]["city"]}}</td>
<td></td>
<td><a href="peer?node={{node}}">peer</a></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

17
web/frontend/login.html Normal file
View file

@ -0,0 +1,17 @@
{% extends 'base.html' %}
{% block content %}
<form action="https://dn42.g-load.eu/auth/">
<link rel="stylesheet" href="https://dn42.g-load.eu/auth/assets/button-font/auth.css">
<input type="hidden" id="return" name="return" value="{{return_addr}}">
<button type="submit" class="kioubit-btn kioubit-btn-primary kioubit-btn-dark kioubit-btn-main">
<span class="icon-kioubit-auth"></span>Authenticate with Kioubit.dn42
</button>
</form>
<form action="" method="post">
<input type="">
</form>
{% endblock %}

View file

@ -1,4 +1,46 @@
:root {
--bg-color: #aaa;
--text-color: black;
--other-background: #444;
}
body {
color: wheat;
background-color: black;
margin: 0;
width: auto;
height: auto;
background-color: var(--bg-color);
}
header {
background-color: var(--other-background);
height: 50px;
}
.content {
width: 100%;
height: calc(100% - 55px);
margin: initial;
}
.flex {
display: flex;
flex-direction: column;
}
.flex>* {
flex-flow: column;
/* width: 1fr;
height: 1fr; */
/* background-color: aquamarine; */
margin: auto;
}
footer {
position: fixed;
bottom: 0;
width: 100%;
height: 40px;
background: var(--other-background);
}
footer.flex {
flex-direction: row;
}