add search page, results template
parent
9809948778
commit
2a09ad730c
|
|
@ -83,6 +83,15 @@ newlines
|
||||||
|
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
"Results": []struct {
|
||||||
|
Title string
|
||||||
|
ID string
|
||||||
|
}{
|
||||||
|
{Title: "title id00", ID: "id00"},
|
||||||
|
{Title: "title id07", ID: "id07"},
|
||||||
|
{Title: "title id00 / title id10", ID: "id00/id10/id10"},
|
||||||
|
{Title: "title id00 / title id10 / title id20", ID: "id00/id10/id20"},
|
||||||
|
},
|
||||||
"Tree": `{
|
"Tree": `{
|
||||||
"Leaf": {"Title": ""},
|
"Leaf": {"Title": ""},
|
||||||
"Branches": {
|
"Branches": {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{{ define "search" }}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<header>
|
||||||
|
<title>{{ .This.Title }}</title>
|
||||||
|
{{ template "_import" }}
|
||||||
|
</header>
|
||||||
|
<body class="fullscreen tb_fullscreen lr_fullscreen" style="position: absolute">
|
||||||
|
<div class="rows" style="height: inherit;">
|
||||||
|
{{ template "_searchbar" }}
|
||||||
|
<div class="columns thic_flex tb_buffer" style="height: calc(100% - 4rem);">
|
||||||
|
{{ template "_filetree" . }}
|
||||||
|
<div class="thic_flex lr_fullscreen" style="margin-left: 1em; width: 5px;">
|
||||||
|
{{ template "_results" . }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{{ end }}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
{{ define "_results" }}
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
</script>
|
||||||
|
<div class="fullscreen tb_fullscreen">
|
||||||
|
<ul id="results">
|
||||||
|
{{ range .Results }}
|
||||||
|
<li>
|
||||||
|
<a href="/ui/files/{{ .ID }}">{{ .Title }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
Loading…
Reference in New Issue