all but todo is at least semi functional
parent
dd7dafa1b2
commit
0cb929731f
|
|
@ -260,18 +260,18 @@ func (server *Server) uiFilesHandler(w http.ResponseWriter, r *http.Request) err
|
||||||
if len(id) > 1 && parent.Title == "" {
|
if len(id) > 1 && parent.Title == "" {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
leaf.Title = "My New File"
|
||||||
}
|
}
|
||||||
data := map[string]interface{}{
|
data := map[string]interface{}{
|
||||||
"This": map[string]string{
|
"This": map[string]string{
|
||||||
"Title": leaf.Title,
|
"Title": leaf.Title,
|
||||||
"Content": leaf.Content,
|
"Content": leaf.Content,
|
||||||
"ID": r.URL.Path,
|
"ID": r.URL.Path,
|
||||||
"PID": path.Dir(r.URL.Path),
|
"PID": strings.TrimPrefix(path.Dir(r.URL.Path), "/"),
|
||||||
"PTitle": parent.Title,
|
"PTitle": parent.Title,
|
||||||
},
|
},
|
||||||
"Tree": string(branchesJSON),
|
"Tree": string(branchesJSON),
|
||||||
}
|
}
|
||||||
log.Printf("%v => %+v", id, data)
|
|
||||||
return t.Lookup("files").Execute(w, data)
|
return t.Lookup("files").Execute(w, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
<article id="article">
|
<article id="article">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<span class="r_buffer">
|
<span class="r_buffer">
|
||||||
<form action="#" onsubmit="pushFile(); return false;"> <!-- TODO -->
|
<form action="#" onsubmit="pushFile(); return false;">
|
||||||
<input class="button-info lil_btn" type="submit" value="SAVE"/>
|
<input class="button-info lil_btn" type="submit" value="SAVE"/>
|
||||||
</form>
|
</form>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@
|
||||||
const title=id ? branch.Leaf.Title : "ROOT"
|
const title=id ? branch.Leaf.Title : "ROOT"
|
||||||
return `
|
return `
|
||||||
<a style="flex-grow: 1;" href="${href}"><button style="width: 100%; text-align: left; outline: none;">${title}</button></a>
|
<a style="flex-grow: 1;" href="${href}"><button style="width: 100%; text-align: left; outline: none;">${title}</button></a>
|
||||||
<!-- TODO -->
|
|
||||||
<a href="${href}/${crypto.randomUUID().split("-")[0]}"><button>+</button></a>
|
<a href="${href}/${crypto.randomUUID().split("-")[0]}"><button>+</button></a>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
}
|
}
|
||||||
.lr_fullscreen {
|
.lr_fullscreen {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1024px;
|
/*max-width: 1024px;*/
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue