cur page has diff highlight in tree

master
Bel LaPointe 2022-02-16 11:36:16 -07:00
parent 668a057bc5
commit a90ffb65bc
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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>
` `
} }