summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorjvoisin2018-11-15 16:03:12 +0100
committerjvoisin2018-12-09 18:59:23 +0100
commit3231047c1475c9e500a0e5f92ea129fccef8dd28 (patch)
tree6aab8a78909887b36cdcfb089cf557a043f25875 /templates
parent60aa7f879e16e4ae329c099eecffd97547b39a07 (diff)
Second commit
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html42
-rw-r--r--templates/download.html37
-rw-r--r--templates/index.html36
3 files changed, 95 insertions, 20 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..3f6e97b
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,42 @@
1<!doctype html>
2<html>
3 <head>
4 <title>mat2 - web edition</title>
5 <link href="{{url_for('static', filename='raleway.woff2') }}" as="font" type="font/woff2" rel="preload">
6 <link rel="stylesheet" href="{{ url_for('static', filename='normalize.css') }}" type="text/css" />
7 <link rel="stylesheet" href="{{ url_for('static', filename='skeleton.css') }}" type="text/css" />
8 <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" type="text/css" />
9 <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.png') }}">
10 </head>
11 <body>
12 <div class="container">
13 <div class="row">
14 {% with messages = get_flashed_messages() %}
15 {% if messages %}
16 <ul class=flashes>
17 {% for message in messages %}
18 <li>{{ message }}</li>
19 {% endfor %}
20 </ul>
21 {% endif %}
22 {% endwith %}
23 </div>
24
25 <section>
26 <div class="row">
27 <div class="four columns">
28 <a href='.'>
29 <img class='u-max-full-width' src="{{ url_for('static', filename='logo.png') }}" alt="mat2 logo"/>
30 </a>
31 </div>
32 <div class="eight columns">
33 {% block content %}{% endblock %}
34 </div>
35 </section>
36
37 <footer>
38 © <a href='https://dustri.org'>jvoisin</a> -
39 <a href='https://0xacab.org/jvoisin/mat2-web'>source</a> -
40
41 </footer>
42 </body>
diff --git a/templates/download.html b/templates/download.html
new file mode 100644
index 0000000..c2b2a42
--- /dev/null
+++ b/templates/download.html
@@ -0,0 +1,37 @@
1{% extends "base.html" %}
2
3{% block content %}
4<h2>» Metadata removed</h2>
5<p>
6{% if not meta_after %}
7mat2 managed to remove <b>all metadata</b> from your file.
8{% else %}
9mat2 <b>could not</b> remove all the metadata from your file, those are the remaining ones:
10<ul>
11 {% for key, value in meta_after.items() %}
12 <li> <b>{{ key }}</b>: {{ value }}</li>
13 {% endfor %}
14 </ul>
15{%endif %}
16</p>
17<a class="button button-primary" href='{{ url_for('download_file', filename=filename) }}'>⇩ Download cleaned file</a>
18
19<hr/>
20
21{% if meta %}
22<p>Just for fun, those are the metadata that mat2 detected in your file, before cleanup.</p>
23<div class='b'>
24 <ul>
25 {% for key, value in meta.items() %}
26 <li>{{ key }}: <i>{{ value }}</i></li>
27 {% endfor %}
28 </ul>
29</div>
30{% else %}
31meh
32{% endif %}
33
34<hr/>
35
36{% endblock %}
37
diff --git a/templates/index.html b/templates/index.html
index 0496c2d..1e05c82 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,20 +1,16 @@
1<!doctype html> 1{% extends "base.html" %}
2<html> 2{% block content %}
3<head> 3
4 <title>mat2 - online edition</title> 4<h2>» Remove metadata</h2>
5 <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" type="text/css" /> 5<p>
6</head> 6Upload your image, get a <em>cleaned</em> one in response.<br>
7<body> 7 <br>
8 <header> 8 Please note that while we do not keep a copy of your image,<br>
9 <h1>mat2 - online edition</h1> 9 there is no way that you could be certain about this: act accordingly.
10 </header> 10</p>
11 <section> 11<br>
12 <h1>Remove metadata from your images</h1> 12<form class='b' method=post enctype=multipart/form-data>
13 <p>Drag and drop anywhere you want and get your files cleaned</p> 13 <input type=file name=file id="upload_file" accept="{{ mimetypes }}">
14 <br> 14 <input type=submit value=Upload>
15 <form method=post enctype=multipart/form-data> 15</form>
16 <input type=file name=file id="upload_file" accept="{{ mimetypes }}"> 16{% endblock %}
17 <input type=submit value=Upload>
18 </form>
19 </section>
20</body>