merge
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
return `
|
||||
<div style="margin: 0; padding: 0; height: 0; width: 0;" id="${name}"></div>
|
||||
<a style="flex-grow: 1;" href="${href}#${parentname}"><button style="width: 100%; text-align: left; outline: none;">${title}</button></a>
|
||||
<a href="${href}/${crypto.randomUUID().split("-")[0]}#${parentname}"><button>+</button></a>
|
||||
<a href="${href}/${generateUUID().split("-")[0]}#${parentname}"><button>+</button></a>
|
||||
`
|
||||
}
|
||||
function branchesHTML(id, branches) {
|
||||
@@ -55,7 +55,7 @@
|
||||
var out = ``
|
||||
for(var i in branches) {
|
||||
out += `<details open>`
|
||||
out += branchHTML((id ? id + "/" : "") + i, branches[i])
|
||||
out += branchHTML(i, branches[i])
|
||||
out += `</details>`
|
||||
}
|
||||
return out
|
||||
@@ -66,6 +66,6 @@
|
||||
n += 1
|
||||
return n > 0
|
||||
}
|
||||
drawTree(JSON.parse(`{{ .Tree }}`))
|
||||
drawTree(JSON.parse({{ .Tree }}))
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user