This commit is contained in:
2018-01-24 10:53:17 +02:00
commit 57e6bd5608
10 changed files with 280 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
{% extends "layout.html" %}
{% block body %}
authenticate to {{ name|safe }}
<form action={{ url_for('authenticate',name=name) }} method=post enctype=multipart/form-data>
<p><input type=password name=password>
<input type=submit value=Login>
</form>
{% endblock %}

18
code/templates/index.html Executable file
View File

@@ -0,0 +1,18 @@
{% extends "layout.html" %}
{% block body %}
<table class=entriesall>
<tr>
<th>name
<th>expires
<th>upload
</tr>
{% for entry in entries %}
<tr>
<td><a href="{{ url_for('list_view',name=entry.name) }}">{{ entry.name }}</a>
<td>{{ entry.expire|safe }}
<td>{{ entry.upload|safe }}
{% else %}
<li>no shares
{% endfor %}
</table>
{% endblock %}

View File

@@ -0,0 +1,15 @@
<!doctype html>
<head>
<title>Flees</title>
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
<script src="{{ url_for('static', filename='script.js') }}" type="text/javascript"></script>
</head>
<body>
<div class=page>
{% for message in get_flashed_messages() %}
<div class=flash>{{ message }}</div>
{% endfor %}
{% block body %}{% endblock %}
</div>
</body>

22
code/templates/list.html Normal file
View File

@@ -0,0 +1,22 @@
{% extends "layout.html" %}
{% block body %}
<a href="{{ url_for('send', name=name) }}">+ upload</a>
<table class=entriesall>
<tr>
<th>name
<th>time
<th>trip
<th>km&delta;
<th>days&delta;
<th>km/d
</tr>
{% for entry in entries %}
<tr>
<td>{{ entry.name }}
<td>{{ entry.size|safe }}
<td>{{ entry.mtime|safe }}
{% else %}
<li>no files
{% endfor %}
</table>
{% endblock %}

9
code/templates/send.html Normal file
View File

@@ -0,0 +1,9 @@
{% extends "layout.html" %}
{% block body %}
upload to {{ name|safe }}
<form action={{ url_for('upload') }} method=post enctype=multipart/form-data>
<input type=hidden name=name value="{{ name|safe }}" />
<p><input type=file name=file>
<input type=submit value=Upload>
</form>
{% endblock %}