Compare commits

...
10 Commits
Author SHA1 Message Date
qingwei.li 375a1dd3e1 -> v1.4.0 2016-12-31 13:47:28 +08:00
qingwei.li 3069ad3928 bump 1.4.0 2016-12-31 13:47:16 +08:00
qingwei.li b287f57c86 Add custom cover background 2016-12-31 13:40:29 +08:00
qingwei.li e932ff66b9 max-sub-level => sub-max-level 2016-12-31 11:50:30 +08:00
nsinaandcinwell.li 7a10e4aecf Readme/homepage cleanup 2016-12-31 10:22:31 +08:00
qingwei.li 41e7ef6863 Add docs 2016-12-30 18:09:13 +08:00
qingwei.li 7ce166501b Add render sub menu 2016-12-30 17:58:39 +08:00
qingwei.li b9aeb4a922 Fix scroll highlight when Vue exist 2016-12-27 23:58:26 +08:00
qingwei.li 9ac8293c0a Update docs 2016-12-26 23:47:26 +08:00
qingwei.li aa3121eca2 Bye 🎅 2016-12-25 20:59:08 +08:00
22 changed files with 250 additions and 184 deletions
+7
View File
@@ -1,3 +1,10 @@
## 1.4.0 Happly new year 🎉
### Features
- Display TOC in the custom sidebar, `data-sub-max-level`.
- Custom background in coverpage.
### Bug fixes
- Fix scroll highlight when Vue exist.
## 1.3.5
### Bug fixes
+1 -1
View File
@@ -4,7 +4,7 @@ var fs = require('fs')
http.createServer(function (req, res) {
serveStatic('.')(req, res, function () {
res.writeHead(200, { 'Content-Type': 'text/html' })
res.writeHead(404, { 'Content-Type': 'text/html' })
res.end(fs.readFileSync('dev.html'))
})
}).listen(3000, '0.0.0.0')
+2
View File
@@ -8,5 +8,7 @@
<body class="">
<div id="app"></div>
</body>
<script src=//unpkg.com/vue></script>
<script src=//unpkg.com/vuep></script>
<script src="/lib/docsify.js" data-repo="qingwei-li/docsify" data-auto2top data-sidebar-toggle data-router></script>
</html>
+38 -9
View File
@@ -29,7 +29,7 @@ Create `README.md` as the main page
```
# Title
## balabala
## blabla
```
### Deploy!
@@ -38,7 +38,7 @@ Push and open the **GitHub Pages** feature
## CLI
Easy to setup and preivew a docs.
Easy to setup and preview a docs.
### Install
```shell
@@ -96,7 +96,7 @@ Code in `index.html`
### Cover Page
Through the markdown can generate a cover page. create a `_coverpage.md` and set `data-coverpage` in script tag.
Generate a cover page through with markdown. Create a `_coverpage.md` and set `data-coverpage` in script tag.
```markdown
![logo](_media/icon.svg)
@@ -114,6 +114,23 @@ Through the markdown can generate a cover page. create a `_coverpage.md` and set
[Get Started](#quick-start)
```
#### Custom background
Currently the background of cover page is generated randomly. We can customize the background, just using the syntax to add image.
```markdown
# docsify <small>1.2.0</small>
> xxx
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#quick-start)
<!-- background image -->
![](_media/bg.png)
<!-- background color -->
![color](#f0f0f0)
```
### Options
@@ -125,7 +142,7 @@ Display the [GitHub Corner](http://tholman.com/github-corners/) widget.
```
#### max-level
Toc level.
TOC level.
```html
<script src="//unpkg.com/docsify" data-max-level="6"></script>
@@ -148,7 +165,7 @@ Sidebar with toggle
#### sidebar
Custom sidebar. if it'set, the TOC will be disabeld. Bind global variables on the `data-sidebar`.
Custom sidebar. If it's set, the TOC will be disabled. Bind global variables on the `data-sidebar`.
![image](https://cloud.githubusercontent.com/assets/7565692/20647425/de5ab1c2-b4ce-11e6-863a-135868f2f9b4.png)
@@ -172,8 +189,8 @@ Custom sidebar. if it'set, the TOC will be disabeld. Bind global variables on th
#### load-sidebar
Load sidebar markdown file. If it is configured, load the current directory `_sidebar.md` by default. If the file isn't exist, sidebar will appear TOC.
** you should add `.nojekyll` into docs folder, to prevent GitHub Pages from ignoring the `_sidebar.md`**
Load sidebar markdown file. If it is configured, load the current directory `_sidebar.md` by default. If the file isn't exist, sidebar will appear as a TOC.
** you should add `.nojekyll` into docs folder to prevent GitHub Pages from ignoring the `_sidebar.md`**
```html
<script src="/lib/docsify.js" data-load-sidebar></script>
@@ -201,9 +218,21 @@ The contents of the file can be:
- [HTML5 History Mode](/history-mode)
```
#### sub-max-level
Display TOC in the custom sidebar. The default value is 0.
```html
<script src="/lib/docsify.js" data-load-sidebar data-max-sub-level="4"></script>
```
![image](https://cloud.githubusercontent.com/assets/7565692/21563209/a8894512-ceba-11e6-80eb-fef00b80625c.png)
#### load-navbar
Load navbar markdown file. If it is configured, load the current directory `_navbar.md` by default.
Load navbar markdown file. If it is configured, load the current directory `_navbar.md` by default.
```html
<script src="/lib/docsify.js" data-load-navbar></script>
@@ -250,7 +279,7 @@ Scroll to the top on changing hash.
#### homepage
`README.md` will be render as homepage for your website in docs folder, but sometimes we want to specify another file as a homepage, or even use the `README.md` in your repo. we can use (need `data-router`):
`README.md` will be rendered as a homepage for your website in the docs folder, but sometimes we want to specify another file as a homepage, or even use the `README.md` in your repo. We can use (need `data-router`):
```html
<script src="/lib/docsify.js" data-homepage="https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md"></script>
-56
View File
@@ -1,56 +0,0 @@
// Fork https://github.com/HermannBjorgvin/SnowJs/blob/master/snow.js
(function(){
var canvas = document.createElement("canvas");
var ctx = canvas.getContext("2d");
var flakeArray = [];
canvas.style.pointerEvents = "none";
canvas.style.position = "absolute";
canvas.style.top = 0;
canvas.style.left = 0;
canvas.style.width = "100vw";
canvas.style.height = "100vh";
document.body.appendChild(canvas);
function canvasResize(){
canvas.height = canvas.offsetHeight;
canvas.width = canvas.offsetWidth;
}
canvasResize();
window.onresize = function() {
canvasResize();
};
var MyMath = Math;
setInterval(function() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.beginPath();
var random = MyMath.random();
var distance = .05 + .95 * random;
flake = {};
flake.x = 1.5 * canvas.width * MyMath.random() - .5 * canvas.width;
flake.y = -9;
flake.velX = 2 * distance * (MyMath.random() / 2 + .5);
flake.velY = (4 + 2 * MyMath.random()) * distance;
flake.radius = MyMath.pow(5 * random, 2) / 5;
flake.update = function() {
var t = this;
t.x += t.velX;
t.y += t.velY;
ctx.beginPath();
ctx.arc(t.x, t.y, t.radius, 0, 2 * MyMath.PI, !1);
ctx.fillStyle = "#FFF";
ctx.fill()
};
flakeArray.push(flake);
for (b = 0; b < flakeArray.length; b++) {
flakeArray[b].y > canvas.height ? flakeArray.splice(b, 1) : flakeArray[b].update()
}
}, 16);
})();
-1
View File
@@ -15,7 +15,6 @@
</nav>
<div id="app"></div>
</body>
<script src="_media/snow.js"></script>
<script
src="//unpkg.com/docsify/lib/docsify.min.js"
data-max-level="4"
+30 -1
View File
@@ -121,6 +121,23 @@ docsify serve docs
```
#### 自定义封面背景
默认的背景是随机生成的,你可以自定义背景色或者背景图片。只需要在文档末尾用添加图片的 Markdown 语法
```markdown
# docsify <small>1.2.0</small>
> xxx
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#quick-start)
<!-- 背景图片 -->
![](_media/bg.png)
<!-- 背景色 -->
![color](#f0f0f0)
```
### 配置参数
@@ -206,6 +223,18 @@ Sidebar 开关按钮
- [HTML5 History Mode](/history-mode)
```
#### sub-max-level
显示 TOC 在自定义的侧边栏里,默认最大显示 0 层。
```html
<script src="/lib/docsify.js" data-load-sidebar data-max-sub-level="4"></script>
```
![image](https://cloud.githubusercontent.com/assets/7565692/21563209/a8894512-ceba-11e6-80eb-fef00b80625c.png)
#### load-navbar
读取导航配置文件,如果配置,默认加载当前目录下的 `_navbar.md`。如果文件不存在,会显示 html 里定义的导航栏。
@@ -277,7 +306,7 @@ Sidebar 开关按钮
#### coverpage
生成封面,参考 [#封面](#封面).
生成封面,参考 [#封面](/zh-cn#封面).
```html
<script src="/lib/docsify.js" data-coverpage></script>
+71 -51
View File
@@ -130,7 +130,10 @@ function scrollActiveSidebar () {
var li = lis[i];
var href = li.querySelector('a').getAttribute('href');
if (href !== '/') { href = href.match(/#([^#]+)$/g)[0].slice(1); }
if (href !== '/') {
var match = href.match('#([^#]+)$');
if (match && match.length) { href = match[0].slice(1); }
}
nav[decodeURIComponent(href)] = li;
}
@@ -174,19 +177,23 @@ function activeLink (dom, activeParent) {
var host = window.location.href;
dom = typeof dom === 'object' ? dom : document.querySelector(dom);
if (!dom) { return
if (!dom) { return }
var target;[].slice.call(dom.querySelectorAll('a'))
.sort(function (a, b) { return b.href.length - a.href.length; })
.forEach(function (node) {
if (host.indexOf(node.href) === 0 && !target) {
activeParent
? node.parentNode.setAttribute('class', 'active')
: node.setAttribute('class', 'active');
target = node;
} else {
activeParent
? node.parentNode.removeAttribute('class')
: node.removeAttribute('class');
}
});
; }[].slice.call(dom.querySelectorAll('a')).forEach(function (node) {
if (node.href === host) {
activeParent
? node.parentNode.setAttribute('class', 'active')
: node.setAttribute('class', 'active');
} else {
activeParent
? node.parentNode.removeAttribute('class')
: node.removeAttribute('class');
}
});
return target
}
/**
@@ -2348,7 +2355,7 @@ function cover () {
var SL = ', 100%, 85%';
var 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 + "\">\n <div class=\"cover-main\"></div>\n </section>")
return ("<section class=\"cover\" style=\"background: " + bgc + "\">\n <div class=\"cover-main\"></div>\n <div class=\"mask\"></div>\n </section>")
}
function toggle () {
@@ -2452,12 +2459,12 @@ function renderApp (dom, replace) {
*/
function renderArticle (content) {
renderTo('article', content ? marked(content) : 'not found');
if (!renderSidebar.rendered) { renderSidebar(null, OPTIONS$1); }
if (!renderNavbar.rendered) { renderNavbar(null, OPTIONS$1); }
renderSidebar.rendered = false;
renderNavbar.rendered = false;
if (!OPTIONS$1.sidebar && !OPTIONS$1.loadSidebar) { renderSidebar(); }
if (content && typeof Vue !== 'undefined' && typeof Vuep !== 'undefined') { new Vue({ el: 'main' }); } // eslint-disable-line
if (content && typeof Vue !== 'undefined' && typeof Vuep !== 'undefined') {
var vm = new Vue({ el: 'main' }); // eslint-disable-line
vm.$nextTick(function (_) { return scrollActiveSidebar(); });
}
if (OPTIONS$1.auto2top) { scroll2Top(); }
}
@@ -2467,7 +2474,6 @@ function renderArticle (content) {
function renderNavbar (content) {
if (CACHE.navbar && CACHE.navbar === content) { return }
CACHE.navbar = content;
renderNavbar.rendered = true;
if (content) { renderTo('nav', marked(content)); }
activeLink('nav');
@@ -2477,23 +2483,27 @@ function renderNavbar (content) {
* sidebar
*/
function renderSidebar (content) {
var isToc = false;
var html;
if (content) {
content = marked(content);
html = marked(content);
} else if (OPTIONS$1.sidebar) {
content = tree(OPTIONS$1.sidebar, '<ul>');
html = tree(OPTIONS$1.sidebar, '<ul>');
} else {
content = tree(genTree(toc, OPTIONS$1.maxLevel), '<ul>');
isToc = true;
html = tree(genTree(toc, OPTIONS$1.maxLevel), '<ul>');
}
renderSidebar.rendered = true;
if (CACHE.sidebar && CACHE.sidebar === content) { return }
CACHE.sidebar = content;
renderTo('aside.sidebar', content);
if (isToc) { scrollActiveSidebar(); }
renderTo('aside.sidebar', html);
var target = activeLink('aside.sidebar', true);
if (content) { renderSubSidebar(target); }
toc = [];
scrollActiveSidebar();
}
function renderSubSidebar (target) {
if (!OPTIONS$1.subMaxLevel) { return }
target.parentNode.innerHTML += tree(genTree(toc, OPTIONS$1.subMaxLevel), '<ul>');
}
/**
@@ -2502,12 +2512,31 @@ function renderSidebar (content) {
function renderCover (content) {
renderCover.dom = renderCover.dom || document.querySelector('section.cover');
if (!content) {
renderCover.dom.classList.add('hidden');
} else {
renderCover.dom.classList.remove('hidden');
!renderCover.rendered && renderTo('.cover-main', marked(content));
renderCover.rendered = true;
renderCover.dom.classList.remove('show');
return
}
renderCover.dom.classList.add('show');
if (renderCover.rendered) { return }
// render cover
var html = marked(content);
var match = html.trim().match('<p><img[^s]+src="(.*?)"[^a]+alt="(.*?)"></p>$');
// render background
if (match) {
var coverEl = document.querySelector('section.cover');
if (match[2] === 'color') {
coverEl.style.background = match[1];
} else {
coverEl.classList.add('has-mask');
coverEl.style.backgroundImage = "url(" + (match[1]) + ")";
}
html = html.replace(match[0], '');
}
renderTo('.cover-main', html);
renderCover.rendered = true;
sticky();
}
@@ -2561,6 +2590,7 @@ var OPTIONS = {
el: '#app',
repo: '',
maxLevel: 6,
subMaxLevel: 0,
sidebar: '',
sidebarToggle: false,
loadSidebar: null,
@@ -2595,7 +2625,6 @@ var mainRender = function (cb) {
var route = OPTIONS.basePath + getRoute();
if (cacheRoute === route) { return cb() }
var wait;
var basePath = cacheRoute = route;
if (!/\//.test(basePath)) {
@@ -2627,22 +2656,16 @@ var mainRender = function (cb) {
if (OPTIONS.coverpage && page !== OPTIONS.homepage) { renderCover(); }
// render sidebar
if (OPTIONS.loadSidebar) {
if (wait === false) { cb(); }
wait = false;
load(basePath + OPTIONS.loadSidebar)
.then(function (result) {
renderSidebar(result);
cb();
});
} else {
cb();
}
}, function (_) { return renderArticle(null); });
// Render sidebar
if (OPTIONS.loadSidebar) {
load(basePath + OPTIONS.loadSidebar).then(function (result) {
renderSidebar(result);
if (wait === false) { cb(); }
wait = false;
});
}
// Render navbar
if (OPTIONS.loadNavbar) {
load(basePath + OPTIONS.loadNavbar).then(renderNavbar);
@@ -2653,10 +2676,7 @@ var Docsify = function () {
var dom = document.querySelector(OPTIONS.el) || document.body;
var replace = dom !== document.body;
var main = function () {
mainRender(function (_) {
activeLink('aside.sidebar', true);
scrollIntoView();
});
mainRender(function (_) { return scrollIntoView(); });
};
// Render app
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "1.3.5",
"version": "1.4.0",
"description": "A magical documentation generator.",
"main": "lib/docsify.js",
"files": [
+21 -12
View File
@@ -16,7 +16,10 @@ export function scrollActiveSidebar () {
const li = lis[i]
let href = li.querySelector('a').getAttribute('href')
if (href !== '/') href = href.match(/#([^#]+)$/g)[0].slice(1)
if (href !== '/') {
const match = href.match('#([^#]+)$')
if (match && match.length) href = match[0].slice(1)
}
nav[decodeURIComponent(href)] = li
}
@@ -61,18 +64,24 @@ export function activeLink (dom, activeParent) {
dom = typeof dom === 'object' ? dom : document.querySelector(dom)
if (!dom) return
let target
;[].slice.call(dom.querySelectorAll('a')).forEach(node => {
if (node.href === host) {
activeParent
? node.parentNode.setAttribute('class', 'active')
: node.setAttribute('class', 'active')
} else {
activeParent
? node.parentNode.removeAttribute('class')
: node.removeAttribute('class')
}
})
;[].slice.call(dom.querySelectorAll('a'))
.sort((a, b) => b.href.length - a.href.length)
.forEach(node => {
if (host.indexOf(node.href) === 0 && !target) {
activeParent
? node.parentNode.setAttribute('class', 'active')
: node.setAttribute('class', 'active')
target = node
} else {
activeParent
? node.parentNode.removeAttribute('class')
: node.removeAttribute('class')
}
})
return target
}
/**
+8 -17
View File
@@ -1,11 +1,12 @@
import { load, camel2kebab, isNil, getRoute } from './util'
import { activeLink, scrollIntoView } from './event'
import { scrollIntoView } from './event'
import * as render from './render'
const OPTIONS = {
el: '#app',
repo: '',
maxLevel: 6,
subMaxLevel: 0,
sidebar: '',
sidebarToggle: false,
loadSidebar: null,
@@ -40,7 +41,6 @@ const mainRender = function (cb) {
const route = OPTIONS.basePath + getRoute()
if (cacheRoute === route) return cb()
let wait
let basePath = cacheRoute = route
if (!/\//.test(basePath)) {
@@ -72,22 +72,16 @@ const mainRender = function (cb) {
if (OPTIONS.coverpage && page !== OPTIONS.homepage) render.renderCover()
// render sidebar
if (OPTIONS.loadSidebar) {
if (wait === false) cb()
wait = false
load(basePath + OPTIONS.loadSidebar)
.then(result => {
render.renderSidebar(result)
cb()
})
} else {
cb()
}
}, _ => render.renderArticle(null))
// Render sidebar
if (OPTIONS.loadSidebar) {
load(basePath + OPTIONS.loadSidebar).then(result => {
render.renderSidebar(result)
if (wait === false) cb()
wait = false
})
}
// Render navbar
if (OPTIONS.loadNavbar) {
load(basePath + OPTIONS.loadNavbar).then(render.renderNavbar)
@@ -98,10 +92,7 @@ const Docsify = function () {
const dom = document.querySelector(OPTIONS.el) || document.body
const replace = dom !== document.body
const main = function () {
mainRender(_ => {
activeLink('aside.sidebar', true)
scrollIntoView()
})
mainRender(_ => scrollIntoView())
}
// Render app
+43 -21
View File
@@ -78,12 +78,12 @@ export function renderApp (dom, replace) {
*/
export function renderArticle (content) {
renderTo('article', content ? marked(content) : 'not found')
if (!renderSidebar.rendered) renderSidebar(null, OPTIONS)
if (!renderNavbar.rendered) renderNavbar(null, OPTIONS)
renderSidebar.rendered = false
renderNavbar.rendered = false
if (!OPTIONS.sidebar && !OPTIONS.loadSidebar) renderSidebar()
if (content && typeof Vue !== 'undefined' && typeof Vuep !== 'undefined') new Vue({ el: 'main' }) // eslint-disable-line
if (content && typeof Vue !== 'undefined' && typeof Vuep !== 'undefined') {
const vm = new Vue({ el: 'main' }) // eslint-disable-line
vm.$nextTick(_ => scrollActiveSidebar())
}
if (OPTIONS.auto2top) scroll2Top()
}
@@ -93,7 +93,6 @@ export function renderArticle (content) {
export function renderNavbar (content) {
if (CACHE.navbar && CACHE.navbar === content) return
CACHE.navbar = content
renderNavbar.rendered = true
if (content) renderTo('nav', marked(content))
activeLink('nav')
@@ -103,23 +102,27 @@ export function renderNavbar (content) {
* sidebar
*/
export function renderSidebar (content) {
let isToc = false
let html
if (content) {
content = marked(content)
html = marked(content)
} else if (OPTIONS.sidebar) {
content = tpl.tree(OPTIONS.sidebar, '<ul>')
html = tpl.tree(OPTIONS.sidebar, '<ul>')
} else {
content = tpl.tree(genTree(toc, OPTIONS.maxLevel), '<ul>')
isToc = true
html = tpl.tree(genTree(toc, OPTIONS.maxLevel), '<ul>')
}
renderSidebar.rendered = true
if (CACHE.sidebar && CACHE.sidebar === content) return
CACHE.sidebar = content
renderTo('aside.sidebar', content)
if (isToc) scrollActiveSidebar()
renderTo('aside.sidebar', html)
const target = activeLink('aside.sidebar', true)
if (content) renderSubSidebar(target)
toc = []
scrollActiveSidebar()
}
export function renderSubSidebar (target) {
if (!OPTIONS.subMaxLevel) return
target.parentNode.innerHTML += tpl.tree(genTree(toc, OPTIONS.subMaxLevel), '<ul>')
}
/**
@@ -128,12 +131,31 @@ export function renderSidebar (content) {
export function renderCover (content) {
renderCover.dom = renderCover.dom || document.querySelector('section.cover')
if (!content) {
renderCover.dom.classList.add('hidden')
} else {
renderCover.dom.classList.remove('hidden')
!renderCover.rendered && renderTo('.cover-main', marked(content))
renderCover.rendered = true
renderCover.dom.classList.remove('show')
return
}
renderCover.dom.classList.add('show')
if (renderCover.rendered) return
// render cover
let html = marked(content)
const match = html.trim().match('<p><img[^s]+src="(.*?)"[^a]+alt="(.*?)"></p>$')
// render background
if (match) {
const coverEl = document.querySelector('section.cover')
if (match[2] === 'color') {
coverEl.style.background = match[1]
} else {
coverEl.classList.add('has-mask')
coverEl.style.backgroundImage = `url(${match[1]})`
}
html = html.replace(match[0], '')
}
renderTo('.cover-main', html)
renderCover.rendered = true
sticky()
}
+15 -4
View File
@@ -1,16 +1,27 @@
section.cover {
height: 100vh;
display: flex;
align-items: center;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
height: 100vh;
display: none;
&.hidden {
display: none;
&.show {
display: flex;
}
&.has-mask .mask {
position: absolute;
size: 100%;
background-color: $color-bg;
opacity: .8;
}
.cover-main {
flex: 1;
text-align: center;
margin: 0 16px;
z-index: 1;
}
a {
+2 -2
View File
@@ -95,7 +95,7 @@ nav {
display: inline-block;
ul {
background-color: rgba(#fff, .6);
background-color: rgba($color-bg, .6);
border: 1px solid $color-primary;
opacity: 0;
overflow: hidden;
@@ -150,7 +150,7 @@ nav {
}
svg {
color: #fff;
color: $color-bg;
height: 80px;
width: 80px;
fill: $color-primary;
+2 -1
View File
@@ -1,6 +1,7 @@
@import url('https://fonts.googleapis.com/css?family=Inconsolata|Inconsolata-Bold');
$color-primary: #0074D9;
$color-bg: #fff;
$sidebar-width: 16em;
@import "basic/layout";
@@ -12,7 +13,7 @@ body {
/* sidebar */
.sidebar {
color: #364149;
background-color: #fff;
background-color: $color-bg;
a {
color: #666;
+1
View File
@@ -1,3 +1,4 @@
$color-primary: #000;
$color-bg: #fff;
$sidebar-width: 300px;
@import "basic/layout";
+3 -2
View File
@@ -1,20 +1,21 @@
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600');
$color-primary: #42b983;
$color-bg: #fff;
$sidebar-width: 300px;
@import "basic/layout";
@import "basic/coverpage";
body {
background-color: #fff;
background-color: $color-bg;
color: #34495e;
}
/* sidebar */
.sidebar {
color: #364149;
background-color: #fff;
background-color: $color-bg;
li {
margin: 6px 15px;
+1
View File
@@ -41,6 +41,7 @@ export function cover () {
return `<section class="cover" style="background: ${bgc}">
<div class="cover-main"></div>
<div class="mask"></div>
</section>`
}
-1
View File
@@ -105,4 +105,3 @@ export function getRoute () {
export function isMobile () {
return document.body.clientWidth <= 600
}