Skip to content

Commit

Permalink
website: vue index page
Browse files Browse the repository at this point in the history
  • Loading branch information
lmorg committed Sep 15, 2024
1 parent ba86fa4 commit 1999990
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const Name = "murex"
const (
Major = 6
Minor = 3
Revision = 4173
Revision = 4174
Branch = "develop"
BuildDate = "2024-09-15 19:17:35"
BuildDate = "2024-09-15 22:11:03"
)

// Copyright is the copyright owner string
Expand Down
36 changes: 25 additions & 11 deletions utils/docgen/api/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,24 +337,38 @@ func funcFunctions(s string) string {
* VuePress *
************/

const (
_VUE_TEXT = "text"
_VUE_LINK = "link"
_VUE_ICON = "icon"
_VUE_INDEX = "index"
_VUE_CHILDREN = "children"
_VUE_COLLAPSIBLE = "collapsible"
)

// Takes: string, category ID
// Returns: JSON string
func funcVuePressMenu(catID string) string {
//var menu vuePressMenuItem
cat := Config.Categories.ByID(catID)
if cat == nil {
panic(fmt.Sprintf("cannot find category with ID '%s'", catID))
}

menu := vuePressSubMenu(cat)
index := map[string]any{
_VUE_TEXT: vueTitle(cat.Title),
_VUE_ICON: "file-lines",
_VUE_INDEX: true,
}
menu := append([]map[string]any{index}, vuePressSubMenu(cat)...)

for i := range Documents {
if Documents[i].CategoryID != cat.ID || len(Documents[i].SubCategoryIDs) > 0 {
continue
}
menu = append(menu, map[string]any{
"text": vueTitle(Documents[i].Title),
"link": Documents[i].Hierarchy() + ".html",
_VUE_TEXT: vueTitle(Documents[i].Title),
_VUE_LINK: Documents[i].Hierarchy() + ".html",
_VUE_ICON: "file-lines", //cat.VueIcon,
})
}

Expand All @@ -373,17 +387,17 @@ func vuePressSubMenu(cat *category) []map[string]any {
for i := range Documents {
if Documents[i].IsInSubCategory(sub.ID) {
subMenu = append(subMenu, map[string]any{
"text": vueTitle(Documents[i].Title),
"link": Documents[i].Hierarchy() + ".html",
"icon": "file-lines",
_VUE_TEXT: vueTitle(Documents[i].Title),
_VUE_LINK: Documents[i].Hierarchy() + ".html",
_VUE_ICON: "file-lines",
})
}
}
menu = append(menu, map[string]any{
"text": vueTitle(sub.Title),
"icon": "folder-closed", //"angles-right", //sub.VueIcon,
"children": subMenu,
"collapsible": true,
_VUE_TEXT: vueTitle(sub.Title),
_VUE_ICON: "folder-closed", //"angles-right", //sub.VueIcon,
_VUE_CHILDREN: subMenu,
_VUE_COLLAPSIBLE: true,
})
}

Expand Down
2 changes: 1 addition & 1 deletion version.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1999990

Please sign in to comment.