From f4fcba887dee649ef8dd73a8b01823883daa2c59 Mon Sep 17 00:00:00 2001
From: Stephan Porada <sporada@uni-bielefeld.de>
Date: Thu, 4 Jul 2019 11:36:23 +0200
Subject: [PATCH] Add title if condition

---
 app/templates/base.html.j2 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2
index 1d00f152..505c3fc0 100644
--- a/app/templates/base.html.j2
+++ b/app/templates/base.html.j2
@@ -1,8 +1,10 @@
 <html>
     <head>
-        <title>
-          Opaque - {% block title %}{% endblock %}
-        </title>
+        {% if title %}
+        <title>Opaque – {{ title }}</title>
+        {% else %}
+        <title>Opaque</title>
+        {% endif %}
         <!-- import materialize icons css -->
         <link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='fonts/material-design-icons-3.0.1/iconfont/material-icons.css') }}">
         <!--Import materialize.css-->
@@ -12,7 +14,7 @@
     </head>
     <body class="blue-grey lighten-5">
         {% block body %}
-        
+
         {% endblock %}
 
         <!--JavaScript at end of body for optimized loading-->
-- 
GitLab