bump 1.1.3
This commit is contained in:
parent
7dc47cc4d4
commit
f8a68b87c7
2 changed files with 12 additions and 13 deletions
|
|
@ -2426,8 +2426,8 @@ function renderArticle (content) {
|
||||||
* navbar
|
* navbar
|
||||||
*/
|
*/
|
||||||
function renderNavbar (content) {
|
function renderNavbar (content) {
|
||||||
if (CACHE['navbar'] && CACHE['navbar'] === content) { return }
|
if (CACHE.navbar && CACHE.navbar === content) { return }
|
||||||
CACHE['navbar'] = content;
|
CACHE.navbar = content;
|
||||||
renderNavbar.rendered = true;
|
renderNavbar.rendered = true;
|
||||||
|
|
||||||
if (content) { renderTo('nav', marked(content)); }
|
if (content) { renderTo('nav', marked(content)); }
|
||||||
|
|
@ -2450,8 +2450,8 @@ function renderSidebar (content) {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderSidebar.rendered = true;
|
renderSidebar.rendered = true;
|
||||||
if (CACHE['sidebar'] && CACHE['sidebar'] === content) { return }
|
if (CACHE.sidebar && CACHE.sidebar === content) { return }
|
||||||
CACHE['sidebar'] = content;
|
CACHE.sidebar = content;
|
||||||
renderTo('aside.sidebar', content);
|
renderTo('aside.sidebar', content);
|
||||||
if (isToc) { scrollActiveSidebar(); }
|
if (isToc) { scrollActiveSidebar(); }
|
||||||
toc = [];
|
toc = [];
|
||||||
|
|
@ -2467,24 +2467,23 @@ function renderLoading (ref) {
|
||||||
|
|
||||||
var num = Math.floor(loaded / total * 100);
|
var num = Math.floor(loaded / total * 100);
|
||||||
|
|
||||||
if (!CACHE['loading']) {
|
if (!CACHE.loading) {
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
|
|
||||||
div.classList.add('progress');
|
div.classList.add('progress');
|
||||||
document.body.appendChild(div);
|
document.body.appendChild(div);
|
||||||
CACHE['loading'] = div;
|
CACHE.loading = div;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CACHE.loading.style.opacity = 1;
|
||||||
|
CACHE.loading.style.width = num >= 95 ? '100%' : num + '%';
|
||||||
|
|
||||||
if (num >= 95) {
|
if (num >= 95) {
|
||||||
clearTimeout(renderLoading.cacheTImeout);
|
clearTimeout(renderLoading.cacheTImeout);
|
||||||
CACHE['loading'].style.width = '100%';
|
|
||||||
renderLoading.cacheTImeout = setTimeout(function (_) {
|
renderLoading.cacheTImeout = setTimeout(function (_) {
|
||||||
CACHE['loading'].style.opacity = 0;
|
CACHE.loading.style.opacity = 0;
|
||||||
CACHE['loading'].style.width = '0%';
|
CACHE.loading.style.width = '0%';
|
||||||
}, 200);
|
}, 200);
|
||||||
} else {
|
|
||||||
CACHE['loading'].style.opacity = 1;
|
|
||||||
CACHE['loading'].style.width = num + '%';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
lib/docsify.min.js
vendored
2
lib/docsify.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue