Compare commits

...
5 Commits
Author SHA1 Message Date
qingwei.li cb592e7bf0 -> v1.4.3 2017-01-01 12:01:36 +08:00
qingwei.li 3c01d1f82d bump 1.4.3 2017-01-01 12:01:23 +08:00
qingwei.li 00253d3148 Tweak style 2017-01-01 12:01:01 +08:00
qingwei.li d23881ba7c Update version 2016-12-31 22:23:47 +08:00
qingwei.li f0a99c0d1d Update change log 2016-12-31 22:06:43 +08:00
15 changed files with 50 additions and 29 deletions
+5 -4
View File
@@ -1,14 +1,15 @@
## 1.4.3
### Bug fixes
- Tweak style.
## 1.4.2
### Bug fixes
- Fix toggle button style.
- Support `mailto`, `tel`, etc. href type
## 1.4.2
### Bug fixes
- Fix scroll to top.
## 1.4.1
### Bug fixes
- Fix generate slug.
+1 -1
View File
@@ -1,6 +1,6 @@
![logo](_media/icon.svg)
# docsify <small>1.3.3</small>
# docsify <small>1.4.2</small>
> A magical documentation site generator.
+5 -2
View File
@@ -2369,7 +2369,10 @@ function corner (data) {
* Render main content
*/
function main (tpl) {
return ("<main>\n " + tpl + "\n <aside class=\"sidebar\"></aside>\n <section class=\"content\">\n <article class=\"markdown-section\"></article>\n </section>\n </main>")
var aside = tpl + "<aside class=\"sidebar\"></aside>";
return (isMobile() ? (aside + "<main>") : ("<main>" + aside)) +
"<section class=\"content\">\n <article class=\"markdown-section\"></article>\n </section>\n </main>"
}
/**
@@ -2433,7 +2436,7 @@ renderer.heading = function (text, level) {
toc.push({ level: level, slug: (route + "#" + (encodeURIComponent(slug))), title: text });
return ("<a href=\"" + route + "#" + slug + "\" data-id=\"" + slug + "\" class=\"anchor\"><h" + level + " id=\"" + slug + "\">" + text + "</h" + level + "></a>")
return ("<h" + level + " id=\"" + slug + "\"><a href=\"" + route + "#" + slug + "\" data-id=\"" + slug + "\" class=\"anchor\"><span>" + text + "</span></a></h" + level + ">")
};
// highlight code
renderer.code = function (code, lang) {
+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
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "1.4.2",
"version": "1.4.3",
"description": "A magical documentation generator.",
"main": "lib/docsify.js",
"files": [
+1 -1
View File
@@ -30,7 +30,7 @@ renderer.heading = function (text, level) {
toc.push({ level, slug: `${route}#${encodeURIComponent(slug)}`, title: text })
return `<a href="${route}#${slug}" data-id="${slug}" class="anchor"><h${level} id="${slug}">${text}</h${level}></a>`
return `<h${level} id="${slug}"><a href="${route}#${slug}" data-id="${slug}" class="anchor"><span>${text}</span></a></h${level}>`
}
// highlight code
renderer.code = function (code, lang = '') {
+5 -1
View File
@@ -20,7 +20,7 @@ section.cover {
.cover-main {
flex: 1;
text-align: center;
margin: 0 16px;
margin: -20px 16px 0;
z-index: 1;
}
@@ -46,6 +46,10 @@ section.cover {
font-weight: 300;
color: inherit;
a {
display: block;
}
small {
position: absolute;
bottom: -.4375rem;
+18 -4
View File
@@ -31,6 +31,7 @@ body {
letter-spacing: 0;
margin: 0;
overflow-x: hidden;
color: $color-text;
}
img {
@@ -159,14 +160,18 @@ nav {
/* main */
main {
size: 100% 100%;
size: 100vw 100%;
position: relative;
}
.anchor {
text-decoration: none;
transition: all .3s;
display: block;
display: inline-block;
span {
color: $color-text;
}
&:hover {
text-decoration: underline;
@@ -313,6 +318,11 @@ body.close {
top: 30px;
}
main {
height: auto;
overflow-x: hidden;
}
.sidebar {
left: -$sidebar-width;
transition: transform 250ms ease-out;
@@ -320,7 +330,8 @@ body.close {
.content {
left: 0;
min-width: 100vw;
max-width: 100vw;
position: static;
transition: transform 250ms ease;
}
@@ -330,6 +341,7 @@ body.close {
.sidebar-toggle {
width: auto;
background-color: transparent;
}
body.close {
@@ -339,6 +351,8 @@ body.close {
.sidebar-toggle {
width: calc($sidebar-width - 16px);
background-color: rgba($color-bg, .8);
transition: 1s background-color;
}
.content {
@@ -346,7 +360,7 @@ body.close {
}
nav, .github-corner {
transform: translateX($sidebar-width);
display: none;
}
}
+1 -3
View File
@@ -2,14 +2,12 @@
$color-primary: #0074D9;
$color-bg: #fff;
$color-text: #34495e;
$sidebar-width: 16em;
@import "basic/layout";
@import "basic/coverpage";
body {
color: #34495e;
}
/* sidebar */
.sidebar {
color: #364149;
+1
View File
@@ -1,4 +1,5 @@
$color-primary: #000;
$color-bg: #fff;
$color-text: #000;
$sidebar-width: 300px;
@import "basic/layout";
+1 -1
View File
@@ -2,6 +2,7 @@
$color-primary: #42b983;
$color-bg: #fff;
$color-text: #34495e;
$sidebar-width: 300px;
@import "basic/layout";
@@ -9,7 +10,6 @@ $sidebar-width: 300px;
body {
background-color: $color-bg;
color: #34495e;
}
/* sidebar */
+6 -6
View File
@@ -1,4 +1,4 @@
import { isMobile } from './util'
/**
* Render github corner
* @param {Object} data
@@ -23,13 +23,13 @@ export function corner (data) {
* Render main content
*/
export function main (tpl) {
return `<main>
${tpl}
<aside class="sidebar"></aside>
<section class="content">
const aside = `${tpl}<aside class="sidebar"></aside>`
return (isMobile() ? `${aside}<main>` : `<main>${aside}`) +
`<section class="content">
<article class="markdown-section"></article>
</section>
</main>`
</main>`
}
/**