diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 5a2e563..c8ffb77 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: m1730-generator - image: git.baumann.gr/adebaumann/m1730-generator:0.3 + image: git.baumann.gr/adebaumann/m1730-generator:0.4 imagePullPolicy: Always ports: - containerPort: 5000 diff --git a/web/app.py b/web/app.py index 45af05a..3cbdf99 100644 --- a/web/app.py +++ b/web/app.py @@ -5,6 +5,9 @@ from html import escape app = Flask(__name__) +_LOGO_PATH = pathlib.Path(__file__).parent / 'static' / 'logo.png' +_LOGO_B64 = base64.b64encode(_LOGO_PATH.read_bytes()).decode() + _FONT_PATH = pathlib.Path('/usr/local/share/fonts/г/ГОСТ_тип_А.ttf') _FONT_B64 = base64.b64encode(_FONT_PATH.read_bytes()).decode() _FONT_FACE = ( @@ -106,7 +109,7 @@ def generate_svg(unit, min_val, max_val, range_label, big_ticks, small_ticks, la @app.route('/') def index(): - return render_template('index.html') + return render_template('index.html', logo_b64=_LOGO_B64) @app.route('/generate', methods=['POST']) diff --git a/web/static/logo.png b/web/static/logo.png new file mode 100644 index 0000000..5d18f7d Binary files /dev/null and b/web/static/logo.png differ diff --git a/web/templates/index.html b/web/templates/index.html index 7c27430..3115a5e 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -3,172 +3,297 @@
-