From f43b3696529a6059c0d64b198a09b280e87bebff Mon Sep 17 00:00:00 2001
From: Tom Teichler <tom.teichler@teckids.org>
Date: Tue, 1 Dec 2020 19:29:57 +0100
Subject: [PATCH] Fix active menu entries

---
 templates/base.html         | 6 +++---
 templates/page_default.html | 2 --
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/templates/base.html b/templates/base.html
index 5467f98..d41290a 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -51,8 +51,8 @@
             <ul class="navbar-nav navbar-right mr auto">
                 {% for title,url in MENUITEMS %}
                     {% if url is string %}
-                        <li class="nav-item{% if output_file == url %}active{% endif %}">
-                            <a class="nav-link" href="{{ genurl( url ) }}" >{{ title }}</a>
+                        <li class="nav-item {% if output_file ==  url %}active{% endif %}">
+                            <a class="nav-link" href="/{{ genurl( url ) }}" >{{ title }}</a>
                         </li>
                     {% elif url is iterable %}
                         <li class="nav-item dropdown
@@ -65,7 +65,7 @@
                             <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{- title }}</a>
                             <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                 {% for title,item_url in url %}
-                                    <a class="dropdown-item {% if item_url == output_url %}active{% endif %}" href="{{ genurl( item_url ) }}">{{ title }}</a>
+                                    <a class="dropdown-item {% if item_url == output_file %}active{% endif %}" href="/{{ genurl( item_url ) }}">{{ title }}</a>
                                 {% endfor %}
                             </div>
                         </li>
diff --git a/templates/page_default.html b/templates/page_default.html
index f682707..a5086ce 100644
--- a/templates/page_default.html
+++ b/templates/page_default.html
@@ -1,7 +1,5 @@
 {% extends "base.html" %}
 
-{% block title %}{{ SITENAME }} - {{ page.title|striptags }}{%endblock%}
-
 {% block head %}
 {{ super() }}
         <link rel='stylesheet' type='text/css' href="/theme/css/page.css" />
-- 
GitLab