From 73e445d175c048b396b9c1b13a4a7b43f9f7cf46 Mon Sep 17 00:00:00 2001
From: Sam White <webmaster@ycra.org.uk>
Date: Fri, 10 Sep 2021 18:00:20 +0000
Subject: [PATCH] Add navbar appending to identify different site versions.

---
 public_html/css/navbar.css      | 18 ++++++++++++++++++
 public_html/includes/navbar.php |  8 +++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/public_html/css/navbar.css b/public_html/css/navbar.css
index 37460a9..2ec6602 100644
--- a/public_html/css/navbar.css
+++ b/public_html/css/navbar.css
@@ -154,6 +154,24 @@ nav div#quotes {
     font-style: italic;
 }
 
+nav div#titleappend {
+    /* Vertically align.*/
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+
+    /* Position on right hand side of navigation bar. */
+    margin-left: auto;
+    text-align: center;
+
+    /* Pad appropriately. */
+    padding: 1% 2%;
+
+    /* Emphasise. */
+    color: red;
+    font-weight: bold;
+}
+
 /* Hide collapsible menu checkbox. */
 input#menutoggle {
     display: none;
diff --git a/public_html/includes/navbar.php b/public_html/includes/navbar.php
index 283b13a..f40d7a8 100644
--- a/public_html/includes/navbar.php
+++ b/public_html/includes/navbar.php
@@ -1,6 +1,7 @@
 <?php
 require_once('includes/utils.php');
 require_once('includes/html-templating.php');
+include_once('includes/config.php');
 
 function get_menu_pages() {
   return [
@@ -55,7 +56,12 @@ function navbar() {
           </a>
         </li><?php
       }?>
-    </ul>
+    </ul><?php
+    $cfg = get_config();
+    if (!empty($cfg['title_append'])) {?>
+      <div id="titleappend"><?php esc($cfg['title_append']);?></div>
+      <div class="clear"></div><?php
+    }?>
   </nav>
   <!--nav class="navbar" id="subnav">
     <ul><li><a href="#">About</a></li></ul>
-- 
2.25.1