summaryrefslogtreecommitdiff
path: root/nexus/tags/active.go
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-29 22:52:46 +0530
committerBobby <[email protected]>2026-03-29 22:52:46 +0530
commit9eb9b7f4bd552a641235764f66483e1f940fcfd9 (patch)
treeda520b923b5e6758d5457b6233dd6671fc640914 /nexus/tags/active.go
parent65a143a0871c35989b7c7ea6723d39a0585c089e (diff)
downloadechoes-of-vaelun-main.tar.xz
echoes-of-vaelun-main.zip
feat: nexus account manager scaffold with auth, characters, realmsHEADmain
Diffstat (limited to 'nexus/tags/active.go')
-rw-r--r--nexus/tags/active.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/nexus/tags/active.go b/nexus/tags/active.go
new file mode 100644
index 0000000..c762222
--- /dev/null
+++ b/nexus/tags/active.go
@@ -0,0 +1,20 @@
+package tags
+
+import (
+ "nexus/utils/urls"
+
+ "github.com/flosch/pongo2/v6"
+)
+
+func active(value *pongo2.Value, param *pongo2.Value) (*pongo2.Value, *pongo2.Error) {
+ routeName := value.String()
+
+ routePath, exists := urls.GetFullPath(routeName)
+ if !exists {
+ return pongo2.AsValue(false), nil
+ }
+
+ requestPath := param.String()
+
+ return pongo2.AsValue(requestPath == routePath), nil
+}