* Add cover page

* Update doc

* Add kbd style, resolve #37

* headling can cliked, resolve #36

* Update change log, close #35

* Update docs
This commit is contained in:
cinwell.li 2016-12-22 00:24:54 +08:00 committed by GitHub
commit 50addfdac6
14 changed files with 312 additions and 48 deletions

View file

@ -21,10 +21,10 @@ export function corner (data) {
/**
* Render main content
* @return {[type]} [description]
*/
export function main () {
export function main (tpl) {
return `<main>
${tpl}
<aside class="sidebar"></aside>
<section class="content">
<article class="markdown-section"></article>
@ -32,8 +32,19 @@ export function main () {
</main>`
}
export function toggle (bool) {
if (!bool) return ''
/**
* 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 `<section class="cover" style="background: ${bgc}">
<div class="cover-main"></div>
</section>`
}
export function toggle () {
return `<button class="sidebar-toggle">
<span></span><span></span><span></span>
</button>`