]> git.ipfire.org Git - ipfire.org.git/commitdiff
base: Dynamically change nagivation on location stuff
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Oct 2023 17:29:43 +0000 (17:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Oct 2023 17:29:43 +0000 (17:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/base.html

index 2580a09681dfb3b7ba8b87f1a685828b99af7371..b510c919e72bcf5bc82e6c938854f2affe8effb1 100644 (file)
                                <div class="navbar-brand">
                                        <a class="navbar-item is-size-4" href="/">
                                                <strong>
-                                                       IPFire<span class="has-text-primary">_</span>
+                                                       {% if request.path.startswith("/projects/location") %}
+                                                               IPFire<span class="has-text-primary">_</span>Location
+                                                       {% else %}
+                                                               IPFire<span class="has-text-primary">_</span>
+                                                       {% end %}
 
                                                        {% if hostname.startswith("fireinfo.") %}
                                                                {{ _("Fireinfo") }}
                                                        {% elif hostname.startswith("nopaste.") %}
                                                                {{ _("Nopaste") }}
-                                                       {% elif hostname.startswith("location.") %}
-                                                               {{ _("Location") }}
                                                        {% end %}
                                                </strong>
                                        </a>
                                                                        </div>
                                                                {% end %}
 
-                                                               <a class="navbar-item is-tab {% if request.path == "/about" %}is-active{% end %}" href="/about">{{ _("About") }}</a>
+                                                               {# Location #}
+                                                               {% if request.path.startswith("/projects/location") %}
+                                                                       <a class="navbar-item is-tab
+                                                                                       {% if request.path == "/projects/location/how-to-use" %}is-active{% end %}"
+                                                                                       href="/projects/location/how-to-use">
+                                                                               {{ _("How To Use") }}
+                                                                       </a>
+
+                                                                       <a class="navbar-item is-tab
+                                                                                       {% if request.path.startswith("/projects/location/download") %}is-active{% end %}"
+                                                                                       href="/projects/location/download">
+                                                                               {{ _("Download") }}
+                                                                       </a>
 
-                                                               <a class="navbar-item is-tab {% if request.path.startswith("/docs") %}is-active{% end %}" href="/docs">{{ _("Documentation") }}</a>
+                                                               {# Main #}
+                                                               {% else %}
+                                                                       <a class="navbar-item is-tab {% if request.path == "/about" %}is-active{% end %}" href="/about">{{ _("About") }}</a>
 
-                                                               <a class="navbar-item is-tab {% if request.path.startswith("/download") %}is-active{% end %}" href="/download">{{ _("Download") }}</a>
+                                                                       <a class="navbar-item is-tab {% if request.path.startswith("/docs") %}is-active{% end %}" href="/docs">{{ _("Documentation") }}</a>
 
-                                                               <a class="navbar-item is-tab {% if request.path.startswith("/blog") %}is-active{% end %}" href="/blog">{{ _("Blog") }}</a>
+                                                                       <a class="navbar-item is-tab {% if request.path.startswith("/download") %}is-active{% end %}" href="/download">{{ _("Download") }}</a>
 
-                                                               <a class="navbar-item is-tab {% if request.path == "/help" %}is-active{% end %}" href="/help">{{ _("Help") }}</a>
+                                                                       <a class="navbar-item is-tab {% if request.path.startswith("/blog") %}is-active{% end %}" href="/blog">{{ _("Blog") }}</a>
+
+                                                                       <a class="navbar-item is-tab {% if request.path == "/help" %}is-active{% end %}" href="/help">{{ _("Help") }}</a>
+                                                               {% end %}
 
                                                                <div class="navbar-item">
                                                                        <a class="button is-lwl has-text-weight-bold is-uppercase"