Add settings menu by default

Change-Id: Iaa9ae78a425ae716a942356cdc57ec9d5eb1cfdf
diff --git a/Changes b/Changes
index 93498a8..8f1abd2 100755
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-0.42 2021-06-11
+0.42 2021-06-15
         - Added GitHub based CI for perl.
         - Added further methods for communicating JSON Files
           with the server to the APIs (lerepp).
@@ -26,6 +26,7 @@
         - Deprecate JWT flow. In the future only OAuth2
           flow will be supported and will be the default
           option for authentication and authorization.
+        - Added settings navigation by default.
 
         WARNING: Upgrading to Mojolicious 9.19 will
           invalidate all sessions. This is a security update.
diff --git a/dev/scss/base/icons.scss b/dev/scss/base/icons.scss
index 24469c2..24ee8eb 100644
--- a/dev/scss/base/icons.scss
+++ b/dev/scss/base/icons.scss
@@ -15,6 +15,7 @@
 $fa-next:         "\f0da";
 $fa-search:       "\f002";
 $fa-rewrite:      "\f040";
+$fa-settings:     "\f1de";
 $fa-login:        "\f090";
 $fa-logout:       "\f08b";
 $fa-tutorial:     "\f19d";
diff --git a/dev/scss/sidebar/sidebar.scss b/dev/scss/sidebar/sidebar.scss
index 5764525..f67d4f3 100644
--- a/dev/scss/sidebar/sidebar.scss
+++ b/dev/scss/sidebar/sidebar.scss
@@ -44,6 +44,10 @@
     margin-right: -1 * ($standard-margin / 2);
   }
 
+  &.settings::after {
+    content:   $fa-settings;
+  }
+
   h2,
   legend {
     line-height: 2em;
diff --git a/package.json b/package.json
index 84ac947..678fc54 100755
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "name": "Kalamar",
   "description": "Mojolicious-based Frontend for KorAP",
   "license": "BSD-2-Clause",
-  "version": "0.41.6",
+  "version": "0.42.1",
   "pluginVersion": "0.2.2",
   "engines": {
     "node": ">=6.0.0"
diff --git a/t/doc.t b/t/doc.t
index 870dcff..15ca9d0 100644
--- a/t/doc.t
+++ b/t/doc.t
@@ -20,6 +20,7 @@
   ->status_is(200)
   ->text_like('title', qr/poliqarp/i)
   ->element_exists('aside.active')
+  ->element_exists_not('aside.settings')
   ->element_exists('main.tutorial')
   ->element_exists('header')
   ->element_exists('aside nav')
diff --git a/t/plugin/auth-oauth.t b/t/plugin/auth-oauth.t
index 653ea5c..20c9b64 100644
--- a/t/plugin/auth-oauth.t
+++ b/t/plugin/auth-oauth.t
@@ -202,8 +202,9 @@
   ->element_exists_not('div.notify-error')
   ->element_exists('div.notify-success')
   ->text_is('div.notify-success', 'Login successful')
-  ->element_exists('aside.off')
-  ->element_exists_not('aside.active')
+  ->element_exists_not('aside.off')
+  ->element_exists('aside.active')
+  ->element_exists('aside.settings')
   ;
 
 # Now the user is logged in and should be able to
@@ -427,8 +428,9 @@
   ->element_exists_not('div.notify-error')
   ->element_exists('div.notify-success')
   ->text_is('div.notify-success', 'Login successful')
-  ->element_exists('aside.off')
-  ->element_exists_not('aside.active')
+  ->element_exists_not('aside.off')
+  ->element_exists('aside.active')
+  ->element_exists('aside.settings')
   ;
 
 $t->get_ok('/settings/oauth')
diff --git a/t/plugin/auth.t b/t/plugin/auth.t
index 1d1a375..4ea6a2f 100644
--- a/t/plugin/auth.t
+++ b/t/plugin/auth.t
@@ -131,6 +131,7 @@
   ->text_is('div.notify-success', 'Login successful')
   ->element_exists('aside.off')
   ->element_exists_not('aside.active')
+  ->element_exists_not('aside.settings')
   ;
 
 # Now the user is logged in and should be able to
diff --git a/templates/partial/side.html.ep b/templates/partial/side.html.ep
index 3f1fc0e..950339c 100644
--- a/templates/partial/side.html.ep
+++ b/templates/partial/side.html.ep
@@ -1,6 +1,22 @@
 % my $side_bar = content_block 'sidebar';
 
-<aside tabindex="0" class="<% unless (length($side_bar) > 1) { %>off<% } elsif (stash('sidebar_active')) { %>active<% } %>">
+% my $classes = '';
+%
+% if (length($side_bar) == 0) {
+%   if (my $nav = navigation('settings')) {
+%     $side_bar = b('<nav>' . $nav . '</nav>');
+%     $classes = 'settings ';
+%   };
+% }
+
+% unless (length($side_bar) > 1) {
+%   $classes .= ' off';
+% } elsif (stash('sidebar_active')) {
+%   $classes .= ' active';
+% };
+
+
+<aside tabindex="0" class="<%= $classes %>">
   <div>
     %= $side_bar
   </div>