diff --git a/views/components/navigation.templ b/views/components/navigation.templ
index a4fd6d5..f346840 100644
--- a/views/components/navigation.templ
+++ b/views/components/navigation.templ
@@ -2,6 +2,8 @@ package components
import "github.com/tigorlazuardi/redmage/views"
import "strings"
+import "github.com/tigorlazuardi/redmage/views/utils"
+import "strconv"
templ Navigation(c *views.Context) {
@@ -67,34 +69,50 @@ templ navLogo() {
}
templ Navbar(c *views.Context) {
-
+
@navLogo()
Redmage
-
}
templ navList(c *views.Context) {
-
+ @createLink(c, "/", "Home", true)
+ @createLink(c, "/config", "Config", false)
+ @createLink(c, "/subreddits", "Subreddits", true)
+
+
+ @createLink(c, "/about", "About", true)
+
+}
+
+templ createLink(c *views.Context, path string, text string, boost bool) {
+ { text }
+}
+
+func isCurrentPage(c *views.Context, path string) bool {
+ if path == "/" && c.Request.URL.Path == "/" {
+ return true
+ } else if strings.HasPrefix(c.Request.URL.Path, path) && path != "/" {
+ return true
+ }
+ return false
}