summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--herrschwarzify.py7
-rw-r--r--templates/index.html19
2 files changed, 21 insertions, 5 deletions
diff --git a/herrschwarzify.py b/herrschwarzify.py
index 9340a08..d47b5c3 100644
--- a/herrschwarzify.py
+++ b/herrschwarzify.py
@@ -3,7 +3,7 @@ import random
import string
from PIL import Image
-from flask import Flask, render_template, request, url_for, redirect, send_from_directory
+from flask import Flask, render_template, request, url_for, redirect, send_from_directory, send_file
from werkzeug.datastructures import FileStorage
SIGN_LOCATION = 225, 1300
@@ -38,6 +38,11 @@ def image_resource(image):
return send_from_directory('uploads', image)
+@app.route("/herrschwarz")
+def herrschwarz():
+ return send_file('herrschwarz.png')
+
+
@app.route("/upload", methods=["POST"])
def upload():
if 'file' not in request.files or not request.files["file"].filename:
diff --git a/templates/index.html b/templates/index.html
index 093c6d4..6f6dbf2 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -5,11 +5,22 @@
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Document</title>
+ <title>HERRSCHWARZIFY</title>
+ <link rel="stylesheet" href="https://unpkg.com/mvp.css">
</head>
+<style>
+ form {
+ margin: auto;
+ text-align: center;
+ }
+</style>
<body>
-<form method="post" enctype="multipart/form-data" action="{{ url_for('upload') }}">
- <input type="file" name="file"><input type="submit" value="HERRSCHWARZIFY">
-</form>
+<div>
+ <form method="post" enctype="multipart/form-data" action="{{ url_for('upload') }}">
+ <img style="width: 400px" src="{{ url_for('herrschwarz') }}" alt="Herr Schwarz">
+ <input type="file" name="file"><input type="submit" value="HERRSCHWARZIFY">
+ <p><a href="https://github.com/romangraef/herrschwarzify">GITHUB</a></p>
+ </form>
+</div>
</body>
</html> \ No newline at end of file