From 7aca3cb76886844e01a6fec9eaab89af65bc9e0d Mon Sep 17 00:00:00 2001
From: Robert Goldmann <deadlocker@gmx.de>
Date: Wed, 18 Nov 2020 16:31:30 +0100
Subject: [PATCH] #518 - add to navbar

---
 src/main/resources/languages/base_de.properties | 1 +
 src/main/resources/languages/base_en.properties | 1 +
 src/main/resources/templates/firstUse.ftl       | 2 +-
 src/main/resources/templates/helpers/navbar.ftl | 9 +++++++++
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/main/resources/languages/base_de.properties b/src/main/resources/languages/base_de.properties
index 48226bb10..725bd713f 100644
--- a/src/main/resources/languages/base_de.properties
+++ b/src/main/resources/languages/base_de.properties
@@ -157,6 +157,7 @@ menu.settings=Einstellungen
 menu.settings.database=Datenbank
 menu.about=Über
 menu.hotkeys=Tastenkombination
+menu.firstUseGuide=Einführung
 menu.logout=Logout
 menu.accounts=Konten
 menu.update=Update verfügbar
diff --git a/src/main/resources/languages/base_en.properties b/src/main/resources/languages/base_en.properties
index 923934dcb..b17182974 100644
--- a/src/main/resources/languages/base_en.properties
+++ b/src/main/resources/languages/base_en.properties
@@ -156,6 +156,7 @@ menu.settings=Settings
 menu.settings.database=Database
 menu.hotkeys=Hotkeys
 menu.about=About
+menu.firstUseGuide=Introduction
 menu.logout=Logout
 menu.accounts=Accounts
 menu.update=Update available
diff --git a/src/main/resources/templates/firstUse.ftl b/src/main/resources/templates/firstUse.ftl
index a0be6cc78..145b387de 100644
--- a/src/main/resources/templates/firstUse.ftl
+++ b/src/main/resources/templates/firstUse.ftl
@@ -6,7 +6,7 @@
     </head>
     <body class="budgetmaster-blue-light">
         <#import "helpers/navbar.ftl" as navbar>
-        <@navbar.navbar "home" settings/>
+        <@navbar.navbar "firstUseGuide" settings/>
 
         <#import "indexFunctions.ftl" as indexFunctions>
 
diff --git a/src/main/resources/templates/helpers/navbar.ftl b/src/main/resources/templates/helpers/navbar.ftl
index 25f915cbe..0f770b553 100644
--- a/src/main/resources/templates/helpers/navbar.ftl
+++ b/src/main/resources/templates/helpers/navbar.ftl
@@ -18,6 +18,7 @@
 
         <@itemDivider/>
         <@itemWithIcon "hotkeys", "/hotkeys", locale.getString("menu.hotkeys"), "keyboard", "budgetmaster-grey", activeID/>
+        <@itemWithFontawesomeIcon "firstUseGuide", "/firstUse", locale.getString("menu.firstUseGuide"), "fas fa-graduation-cap", "budgetmaster-grey", activeID/>
         <@itemWithIcon "about", "/about", locale.getString("menu.about"), "info", "budgetmaster-grey", activeID/>
 
         <@itemDivider/>
@@ -119,6 +120,14 @@
     </#if>
 </#macro>
 
+<#macro itemWithFontawesomeIcon ID link text icon activeColor activeID>
+    <#if activeID == ID>
+        <li class="active"><a href="<@s.url '${link}'/>" class="waves-effect no-padding"><div class="stripe ${activeColor}"></div><i class="${icon}"></i>${text}</a></li>
+    <#else>
+        <li><a href="<@s.url '${link}'/>" class="waves-effect"><i class="${icon}"></i>${text}</a></li>
+    </#if>
+</#macro>
+
 <#macro itemLogout text icon>
     <li><a class="waves-effect" id="button-logout"><i class="material-icons">${icon}</i>${text}</a></li>
 </#macro>
-- 
GitLab