Skip to content

Commit

Permalink
bump 1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Dec 31, 2016
1 parent 66d7919 commit 2bb8641
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## xxx
## 1.4.3

### Bug fixes
- Fix toggle button style.
Expand Down
19 changes: 7 additions & 12 deletions lib/docsify.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,14 @@ function bindToggle (dom) {

dom.addEventListener('click', function () { return body.classList.toggle('close'); });

if (!/mobile/i.test(navigator.userAgent)) { return }
document.querySelector('aside').addEventListener('click', function (event) {
body.classList.toggle('close');
});
if (isMobile()) {
document.querySelector('aside')
.addEventListener('click', function (_) { return body.classList.toggle('close'); });
}
}

var cacheContentDOM;
function scroll2Top () {
if (!cacheContentDOM) {
var dom = isMobile() ? 'body' : 'section.content';
cacheContentDOM = document.querySelector(dom);
}
cacheContentDOM.scrollTop = 0;
document.body.scrollTop = 0;
}

function sticky () {
Expand Down Expand Up @@ -2388,7 +2383,7 @@ function cover () {
}

function toggle () {
return "<button class=\"sidebar-toggle\">\n <span></span><span></span><span></span>\n </button>"
return "<button class=\"sidebar-toggle\">\n <div class=\"sidebar-toggle-button\">\n <span></span><span></span><span></span>\n </div>\n </button>"
}

/**
Expand Down Expand Up @@ -2450,7 +2445,7 @@ renderer.code = function (code, lang) {
return ("<pre data-lang=\"" + lang + "\"><code class=\"lang-" + lang + "\">" + hl + "</code></pre>")
};
renderer.link = function (href, title, text) {
if (OPTIONS$1.router && !/^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/.test(href)) {
if (OPTIONS$1.router && !/:/.test(href)) {
href = ("#/" + href).replace(/\/\//g, '/');
}

Expand Down
4 changes: 2 additions & 2 deletions lib/docsify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/themes/buble.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/themes/pure.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2bb8641

Please sign in to comment.