summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJan Friedli2020-04-13 22:09:14 +0200
committerJan Friedli2020-04-13 22:09:14 +0200
commit8a45eb2f5399aaa2a022389086a4afde22b00477 (patch)
tree666052a800275a2a497dcf949ec5e24d8208aa0a /templates
parent5723f889e1a8d5cf0dbdbdd317b356073ed50a0b (diff)
full redesign
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html84
-rw-r--r--templates/download.html88
-rw-r--r--templates/index.html26
3 files changed, 120 insertions, 78 deletions
diff --git a/templates/base.html b/templates/base.html
index 66b60d8..6f0f57a 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,48 +1,54 @@
1<!doctype html> 1<!doctype html>
2<html> 2<html>
3 <head> 3 <head>
4 <title>mat2 - web edition</title> 4 <title>MAT2</title>
5 <link href="{{url_for('static', filename='raleway.woff2') }}" as="font" type="font/woff2" rel="preload"> 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" /> 6 <link rel="stylesheet" href="{{ url_for('static', filename='normalize.css') }}" type="text/css"/>
7 <link rel="stylesheet" href="{{ url_for('static', filename='uikit.min.css') }}" type="text/css" /> 7 <link rel="stylesheet" href="{{ url_for('static', filename='uikit.min.css') }}" type="text/css"/>
8 <link rel="stylesheet" href="{{ url_for('static', filename='style.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') }}"> 9 <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.png') }}">
10 <script defer src="{{url_for('static', filename='script.js') }}"></script> 10 <script defer src="{{ url_for('static', filename='script.js') }}"></script>
11 </head> 11 </head>
12 <body> 12<body>
13 <header class="main-header"> 13 <header class="main-header">
14 <div class="uk-container"> 14 <div class="uk-container">
15 <div class="row"> 15 <div class="row">
16 <div class="two-half column"> 16 <div class="two-half column">
17 <a href='.' class="u-center-block"> 17 <a href='.' class="u-center-block">
18 <img class='logo' src="{{ url_for('static', filename='logo.png') }}" alt="mat2 logo"/> 18 <img class='logo' src="{{ url_for('static', filename='logo.png') }}" alt="mat2 logo"/>
19 </a> 19 </a>
20 </div>
20 </div> 21 </div>
21 </div>
22 </div> 22 </div>
23 </header> 23 </header>
24 <div class="uk-container uk-flex uk-flex-center">
25 <div class="row uk-flex uk-flex-center">
26 {% with messages = get_flashed_messages() %}
27 {% if messages %}
28 <ul class=flashes>
29 {% for message in messages %}
30 <li>{{ message }}</li>
31 {% endfor %}
32 </ul>
33 {% endif %}
34 {% endwith %}
35 </div>
36 24
37 <section> 25 <div class="uk-flex uk-flex-center">
38 <div class="row uk-flex uk-flex-center"> 26 <div>
39 {% block content %}{% endblock %} 27 {% with messages = get_flashed_messages() %}
40 </div> 28 {% if messages %}
41 </section> 29 {% for message in messages %}
30 <div class="uk-alert uk-alert-danger">
31 <p>
32 {{ message }}
33 </p>
34 </div>
35 {% endfor %}
36 {% endif %}
37 {% endwith %}
38 </div>
39 </div>
40
41 <div class="uk-container uk-flex uk-flex-center">
42 <section>
43 <div class="row uk-flex uk-flex-center">
44 {% block content %}{% endblock %}
45 </div>
46 </section>
47 </div>
42 48
43 <footer> 49 <footer>
44 © <a href='https://dustri.org'>jvoisin</a> - 50 © <a href='https://dustri.org'>jvoisin</a> -
45 <a href='https://0xacab.org/jvoisin/mat2-web'>source</a> - 51 <a href='https://0xacab.org/jvoisin/mat2-web'>source</a> -
46 52
47 </footer> 53 </footer>
48 </body> 54</body>
diff --git a/templates/download.html b/templates/download.html
index e39b16b..83dd9c4 100644
--- a/templates/download.html
+++ b/templates/download.html
@@ -1,37 +1,69 @@
1{% extends "base.html" %} 1{% extends "base.html" %}
2 2
3{% block content %} 3{% block content %}
4<h2>» Metadata removed</h2> 4 <div class="shadowed-box u-text-center u-center-block">
5<p> 5 <h2 class="uk-text-center">Metadata removed</h2>
6{% if not meta_after %} 6 {% if not meta_after %}
7mat2 managed to remove <b>all metadata</b> from <pre>{{ filename }}</pre>. 7 <p class="uk-text-center">
8{% else %} 8 Successfully removed the metadata
9mat2 <b>could not</b> remove all the metadata from <pre>{{ filename }}</pre>, those are the remaining ones: 9 </p>
10<ul> 10 {% endif %}
11 {% for key, value in meta_after.items() %} 11 <div class="uk-flex uk-flex-center">
12 <li> <b>{{ key }}</b>: {{ value }}</li> 12 <div>
13 {% endfor %} 13 <a class="uk-flex-1" href='{{ url_for('download_file', key=key, filename=filename) }}'>
14 </ul> 14 <button class="uk-button uk-button-primary">
15{%endif %} 15 ⇩ download cleaned file
16</p> 16 </button>
17<a class="button button-primary" href='{{ url_for('download_file', key=key, filename=filename) }}'>⇩ Download cleaned file</a> 17 </a>
18 </div>
19 </div>
18 20
19<hr/>
20 21
21{% if meta %} 22 <p>
22<p>Just for fun, those are the metadata that mat2 detected in your file, before cleanup.</p> 23 {% if meta_after %}
23<div class='b'> 24 <div class="uk-alert uk-alert-warning" uk-alert>
24 <ul> 25 <p>
25 {% for key, value in meta.items() %} 26 <b>Could not</b> remove all the metadata
26 <li>{{ key }}: <i>{{ value }}</i></li> 27 </p>
27 {% endfor %} 28 </div>
28 </ul> 29 <h3>
29</div> 30 Remaining Metadata
30{% else %} 31 </h3>
31<p>Not a single metadata was found by mat2, odds are that your file was already clean!</p> 32 <dl class="uk-description-list uk-description-list-divider">
32{% endif %} 33 {% for key, value in meta_after.items() %}
34 <dt>
35 {{ key }}
36 </dt>
37 <dd>
38 {{ value }}
39 </dd>
40 {% endfor %}
41 </dl>
42 {% endif %}
43 </p>
33 44
34<hr/> 45 {% if meta %}
46 <h3>
47 Removed Metadata
48 </h3>
49 <dl class="uk-description-list uk-description-list-divider">
50 {% for key, value in meta.items() %}
51 <dt>
52 {{ key }}
53 </dt>
54 <dd>
55 {{ value }}
56 </dd>
57 {% endfor %}
58 </dl>
59 {% else %}
60 <div class="uk-alert uk-alert-success">
61 <p>
62 Not a single metadata was found, odds are that your file was already clean!
63 </p>
64 </div>
65 {% endif %}
66 </div>
35 67
36{% endblock %} 68{% endblock %}
37 69
diff --git a/templates/index.html b/templates/index.html
index 7f55283..b361394 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,15 +1,19 @@
1{% extends "base.html" %} 1{% extends "base.html" %}
2{% block content %} 2{% block content %}
3<div class="shadowed-box u-text-center u-center-block"> 3 <div class="shadowed-box u-text-center u-center-block">
4 <h2 class="uk-text-center">Remove metadata</h2> 4 <h2 class="uk-text-center">Remove metadata</h2>
5 <p class="uk-text-center"> 5 <p class="uk-text-center">
6 The file you see is just the tip of the iceberg. Remove the hidden meta 6 The file you see is just the tip of the iceberg. Remove the hidden meta
7 </p> 7 </p>
8 <form class="b" method=post enctype=multipart/form-data> 8 <div class="uk-flex uk-flex-center">
9 <div class="uk-margin"> 9 <div>
10 <input type="file" name=file id="upload_file" accept="{{ mimetypes | join(', ') }}"> 10 <form method=post enctype=multipart/form-data>
11 <button class="uk-button uk-button-default" type="submit" value="Upload">Upload</button> 11 <div class="uk-margin">
12 <input type="file" name=file id="upload_file" accept="{{ mimetypes | join(', ') }}">
13 <button class="uk-button uk-button-default" type="submit" value="Upload">Upload</button>
14 </div>
15 </form>
16 </div>
12 </div> 17 </div>
13 </form> 18 </div>
14</div>
15{% endblock %} 19{% endblock %}