initial commit of slink

This commit is contained in:
2021-02-04 15:07:55 +01:00
commit d64f205162
23 changed files with 3989 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
{% extends "base.html" %}
{% block head %}
<link rel="stylesheet" href="/static/admin.css">
{% endblock %}
{% block content %}
<div class="admin">
<nav>
<ol>
<li><a href="/admin/index/">Liste</a></li>
<li><a href="/admin/submit/">Hinzufügen</a></li>
<li><a href="/admin/signup/">Einladen</a></li>
<li style="float:right"><a href="/admin/logout/">Abmelden</a></li>
</ol>
</nav>
<div class="center">
<h1>Herzlich willkommen {{ name }}!</h1>
{% block admin %}
{% endblock %}
</div>
</div>
{% endblock %}
+21
View File
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{title}}</title>
<meta name="author" content="Franz Dietrich">
<meta http-equiv="robots" content="[noindex|nofollow]">
<link rel="stylesheet" href="/static/style.css">
{% block head %}
{% endblock %}
</head>
<body>
<div class="content">
{% block content %}
{% endblock %}
</div>
</body>
</html>
+12
View File
@@ -0,0 +1,12 @@
{% extends "admin.html" %}
{% block admin %}
{% for links_user in links_per_users %}
{% set l = links_user[0] %}
{% set u = links_user[1] %}
<div>
<a href="/admin/view/{{l.code}}"><span>{{l.code}}:</span>{{ l.target }}</a>
<small>{{ u.username }}</small>
</div>
{% endfor %}
{% endblock %}
+18
View File
@@ -0,0 +1,18 @@
{% extends "base.html" %}
{% block content %}
<div class="center">
<form action="" method="POST">
<div>
<label for="username">Benutzername:</label>
<input type="text" name="username">
</div>
<div>
<label for="password">Passwort:</label>
<input type="password" name="password">
</div>
<input type="submit" value="Login">
</form>
<h2>&nbsp;</h2>
</div>
{% endblock %}
+8
View File
@@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block content %}
<div class="center">
<h3>This Link has not been found or has been deleted</h3>
<h2>&nbsp;</h2>
</div>
{% endblock %}
+20
View File
@@ -0,0 +1,20 @@
{% extends "admin.html" %}
{% block admin %}
<form action="" method="POST">
<div>
<label for="username">Benutzername:</label>
<input type="text" name="username">
</div>
<div>
<label for="email">E-mail:</label>
<input type="email" name="email">
</div>
<div>
<label for="password">Passwort:</label>
<input type="password" name="password">
</div>
<input type="submit" value="Einladen">
</form>
<h2>&nbsp;</h2>
{% endblock %}
+19
View File
@@ -0,0 +1,19 @@
{% extends "admin.html" %}
{% block admin %}
<form action="" method="POST">
<div>
<label for="title">Beschreibung:</label>
<input type="text" name="title">
</div>
<div>
<label for="target">Ziel:</label>
<input type="text" name="target">
</div>
<div>
<label for="code">Code:</label>
<input type="text" name="code">
</div>
<input type="submit" value="Submit">
</form>
{% endblock %}
+31
View File
@@ -0,0 +1,31 @@
{% extends "admin.html" %}
{% block admin %}
<h1>The Link {{ link.code }}</h1>
<table>
<tr>
<td>Beschreibung:</td>
<td>{{ link.title }}</td>
</tr>
<tr>
<td>Code:</td>
<td>{{ link.code }}</td>
</tr>
<tr>
<td>Kurzlink:</td>
<td><a href="https://fhs.li/{{ link.code }}">https://fhs.li/{{ link.code }}</a></td>
</tr>
<tr>
<td>Ziel:</td>
<td>{{ link.target }}</td>
</tr>
<tr>
<td>QR-Code</td>
<td>{{ qr | safe }}</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
{% endblock %}