0.6.0 (#12)
* Fix ineffective option, fixed #10 * Feat: dropdown list, #6 * Fix repo url * Feat: sidebar with toggle * Update doc
This commit is contained in:
parent
dd361b34b9
commit
d07ddaa85d
12 changed files with 380 additions and 24 deletions
|
|
@ -7,6 +7,7 @@
|
|||
export function corner (data) {
|
||||
if (!data) return ''
|
||||
if (!/\/\//.test(data)) data = 'https://github.com/' + data
|
||||
data = data.replace(/^git\+/, '')
|
||||
|
||||
return `
|
||||
<a href="${data}" class="github-corner" aria-label="View source on Github">
|
||||
|
|
@ -31,6 +32,13 @@ export function main () {
|
|||
</main>`
|
||||
}
|
||||
|
||||
export function toggle (bool) {
|
||||
if (!bool) return ''
|
||||
return `<button class="sidebar-toggle">
|
||||
<span></span><span></span><span></span>
|
||||
</button>`
|
||||
}
|
||||
|
||||
/**
|
||||
* Render tree
|
||||
* @param {Array} tree
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue