some cleanup and refactoring

This commit is contained in:
Finn Christiansen 2018-12-30 09:24:29 +01:00
parent 0c4fed2a2b
commit fcd783ef26
7 changed files with 32 additions and 9 deletions

21
app/templates/base.html Normal file
View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>Add reminders to ICS files</title>
<link rel="stylesheet" href="/static/css/style.css">
<script type="text/javascript" src="/static/js/reminder.js"></script>
</head>
<body>
<main>
{% block body %}
{% endblock %}
</main>
<footer>
<a href="https://github.com/Finn10111/reminder">source code on github</a>
</footer>
</body>
</html>

34
app/templates/index.html Normal file
View file

@ -0,0 +1,34 @@
{% extends 'base.html' %}
{% block body %}
<h1>Add reminders to ICS files</h1>
<form method="POST" action="/" enctype=multipart/form-data>
<div class="form">
{{ form.csrf_token }}
<ol>
<li>Select ICS file</li>
<li>Set reminder time</li>
<li>Submit and download your ICS file with reminders added</li>
</ol>
<div>
<label class="file">
{{ form.icsfile }}
<span id="filename" class="file-custom" data-content="Choose file..."></span>
</label>
</div>
<div class="form-group">
{{ form.hours.label }}
{{ form.hours() }}
</div>
<div class="form-group">
{{ form.minutes.label }}
{{ form.minutes() }}
</div>
<div>
{{ form.submit() }}
</div>
{% if error %}
<div class="error">{{ error }}</div>
{% endif %}
</div>
</form>
{% endblock %}