cur page has diff highlight in tree
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
todo:
|
todo:
|
||||||
- table of contents
|
|
||||||
- alert box; https://concisecss.com/documentation/ui
|
- alert box; https://concisecss.com/documentation/ui
|
||||||
|
- table of contents
|
||||||
|
- anchor per line
|
||||||
- scrape odo
|
- scrape odo
|
||||||
- scrape gdoc
|
- scrape gdoc
|
||||||
- scrape gsheet
|
- scrape gsheet
|
||||||
|
|||||||
@@ -51,10 +51,11 @@
|
|||||||
const name=`filetree-leaf-${nameSafeId}`
|
const name=`filetree-leaf-${nameSafeId}`
|
||||||
const parentname=`filetree-leaf-${parentNameSafeId}`
|
const parentname=`filetree-leaf-${parentNameSafeId}`
|
||||||
const title=id ? branch.Leaf.Title : "ROOT"
|
const title=id ? branch.Leaf.Title : "ROOT"
|
||||||
const isLive = '{{ .This.ID }}'.slice(0, id.length) == id
|
const isLiveParent = '{{ .This.ID }}'.slice(0, id.length) == id
|
||||||
|
const isLive = '{{ .This.ID }}' == id
|
||||||
return `
|
return `
|
||||||
<div style="margin: 0; padding: 0; height: 0; width: 0;" id="${name}"></div>
|
<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;" class="${isLive ? "button button-info button-border" : ""}">${title}</button></a>
|
<a style="flex-grow: 1;" href="${href}#${parentname}"><button style="width: 100%; text-align: left; outline: none;" class="${isLiveParent ? `button button-info ${!isLive ? "button-border" : ""}` : ""}">${title}</button></a>
|
||||||
<a href="${href}/${generateUUID().split("-")[0]}#${parentname}"><button>+</button></a>
|
<a href="${href}/${generateUUID().split("-")[0]}#${parentname}"><button>+</button></a>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user