Add navbar appending to identify different site versions.
authorSam White <webmaster@ycra.org.uk>
Fri, 10 Sep 2021 18:00:20 +0000 (18:00 +0000)
committerSam White <webmaster@ycra.org.uk>
Fri, 10 Sep 2021 18:00:20 +0000 (18:00 +0000)
public_html/css/navbar.css
public_html/includes/navbar.php

index 37460a9d01569d0dcf8186269750a0494bd1a161..2ec66029fd2494764d80e6f0ca9952098e76ac22 100644 (file)
@@ -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;
index 283b13a287dbd1d823c8f6651fe1d5915733cb23..f40d7a8b14cf3c31db09a35f0b74c6495384ee8b 100644 (file)
@@ -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>