* Fix ineffective option, fixed #10

* Feat: dropdown list, #6

* Fix repo url

* Feat: sidebar with toggle

* Update doc
This commit is contained in:
cinwell.li 2016-11-29 21:42:48 +08:00 committed by GitHub
commit d07ddaa85d
12 changed files with 380 additions and 24 deletions

View file

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