` : `${aside}`) +
'' +
''
)
}
/**
* Cover Page
*/
export function cover() {
const SL = ', 100%, 85%'
const bgc =
'linear-gradient(to left bottom, ' +
`hsl(${Math.floor(Math.random() * 255) + SL}) 0%,` +
`hsl(${Math.floor(Math.random() * 255) + SL}) 100%)`
return (
`'
)
}
/**
* Render tree
* @param {Array} tree
* @param {String} tpl
* @return {String}
*/
export function tree(toc, tpl = '') {
if (!toc || !toc.length) {
return ''
}
let innerHTML = ''
toc.forEach(node => {
innerHTML += `${node.title}`
if (node.children) {
innerHTML += tree(node.children, tpl)
}
})
return tpl.replace('{inner}', innerHTML)
}
export function helper(className, content) {
return `${content.slice(5).trim()}
`
}
export function theme(color) {
return ``
}