max width for filetree
parent
95c560cd23
commit
9923b182f4
|
|
@ -222,7 +222,19 @@ func (server *Server) uiSearchHandler(w http.ResponseWriter, r *http.Request) er
|
||||||
data[i].ID = idsTitles[i][0]
|
data[i].ID = idsTitles[i][0]
|
||||||
data[i].Title = idsTitles[i][1]
|
data[i].Title = idsTitles[i][1]
|
||||||
}
|
}
|
||||||
return t.Lookup("search").Execute(w, map[string]interface{}{"Results": data})
|
tree := server.tree()
|
||||||
|
branches, err := tree.GetRootMeta()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
branchesJSON, err := json.Marshal(branches)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return t.Lookup("search").Execute(w, map[string]interface{}{
|
||||||
|
"Results": data,
|
||||||
|
"Tree": string(branchesJSON),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (server *Server) uiFilesHandler(w http.ResponseWriter, r *http.Request) error {
|
func (server *Server) uiFilesHandler(w http.ResponseWriter, r *http.Request) error {
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ newlines
|
||||||
ID string
|
ID string
|
||||||
}{
|
}{
|
||||||
{Title: "title id00", ID: "id00"},
|
{Title: "title id00", ID: "id00"},
|
||||||
{Title: "title id07", ID: "id07"},
|
{Title: "title id07 but it's really really really long", ID: "id07"},
|
||||||
{Title: "title id00 / title id10", ID: "id00/id10/id10"},
|
{Title: "title id00 / title id10", ID: "id00/id10/id10"},
|
||||||
{Title: "title id00 / title id10 / title id20", ID: "id00/id10/id20"},
|
{Title: "title id00 / title id10 / title id20", ID: "id00/id10/id20"},
|
||||||
},
|
},
|
||||||
|
|
@ -111,7 +111,7 @@ newlines
|
||||||
"id04": {"Leaf":{"Title":"title id04"},"Branches":{}},
|
"id04": {"Leaf":{"Title":"title id04"},"Branches":{}},
|
||||||
"id05": {"Leaf":{"Title":"title id05"},"Branches":{}},
|
"id05": {"Leaf":{"Title":"title id05"},"Branches":{}},
|
||||||
"id06": {"Leaf":{"Title":"title id06"},"Branches":{}},
|
"id06": {"Leaf":{"Title":"title id06"},"Branches":{}},
|
||||||
"id07": {"Leaf":{"Title":"title id07"},"Branches":{}}
|
"id07": {"Leaf":{"Title":"title id07 but it's really really really long"},"Branches":{}}
|
||||||
}
|
}
|
||||||
}`,
|
}`,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="fullscreen tb_fullscreen">
|
<div class="fullscreen tb_fullscreen" style="max-width: 25em;">
|
||||||
<details open id="filetree">
|
<details open id="filetree">
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue