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 == "" {
|
||||
return err
|
||||
}
|
||||
leaf.Title = "My New File"
|
||||
}
|
||||
data := map[string]interface{}{
|
||||
"This": map[string]string{
|
||||
"Title": leaf.Title,
|
||||
"Content": leaf.Content,
|
||||
"ID": r.URL.Path,
|
||||
"PID": path.Dir(r.URL.Path),
|
||||
"PID": strings.TrimPrefix(path.Dir(r.URL.Path), "/"),
|
||||
"PTitle": parent.Title,
|
||||
},
|
||||
"Tree": string(branchesJSON),
|
||||
}
|
||||
log.Printf("%v => %+v", id, data)
|
||||
return t.Lookup("files").Execute(w, data)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
<article id="article">
|
||||
<div class="columns">
|
||||
<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"/>
|
||||
</form>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
const title=id ? branch.Leaf.Title : "ROOT"
|
||||
return `
|
||||
<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>
|
||||
`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
}
|
||||
.lr_fullscreen {
|
||||
width: 100%;
|
||||
max-width: 1024px;
|
||||
/*max-width: 1024px;*/
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue