Compare commits

...

2 Commits

Author SHA1 Message Date
e4c72b348f
🐛 fix(navigation.go): fix the condition for determining if a navigation element is active
All checks were successful
continuous-integration/drone/push Build is passing
The /tmp/ directory is now added to the .gitignore file to exclude it from version control. In the navigation.go file, the condition for determining if a navigation element is active has been fixed to correctly handle cases where the activeNav string matches the elPath string. The tmp/main file has been deleted.
2023-11-09 17:49:03 +00:00
08652832ed
fixed website links
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-28 11:47:34 +01:00
4 changed files with 6 additions and 5 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/coverage.out
/test/out
/mark2web
/tmp/

View File

@ -55,7 +55,7 @@ func buildNavigationRecursive(tree *TreeNode, curNavMap *map[string]*NavElement,
subMap := make(map[string]*NavElement)
subSlice := make([]*NavElement, 0)
navEl := NavElement{
Active: strings.HasPrefix(activeNav, elPath),
Active: strings.HasPrefix(activeNav, elPath+"/") || activeNav == elPath,
Data: el.Config.Data,
ColMap: el.ColMap,
SubMap: &subMap,

BIN
tmp/main

Binary file not shown.

View File

@ -37,10 +37,10 @@ graph TD
class M,C,D,A in
class W out
click C "../benutzung/konfiguration" "Doku: Benutzung/Konfiguration"
click M "../benutzung/inhalte" "Doku: Benutzung/Inhalte"
click A "../benutzung/inhalte" "Doku: Benutzung/Inhalte"
click D "../benutzung/templates" "Doku: Benutzung/Templates"
click C "../dokumentation/konfiguration" "Doku: Konfiguration"
click M "../dokumentation/inhalte" "Doku: Inhalte"
click A "../dokumentation/inhalte" "Doku: Inhalte"
click D "../dokumentation/templates" "Doku: Templates"
```
<script defer>