mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
bump 1.1.3
This commit is contained in:
parent
7dc47cc4d4
commit
f8a68b87c7
@ -2426,8 +2426,8 @@ function renderArticle (content) {
|
||||
* navbar
|
||||
*/
|
||||
function renderNavbar (content) {
|
||||
if (CACHE['navbar'] && CACHE['navbar'] === content) { return }
|
||||
CACHE['navbar'] = content;
|
||||
if (CACHE.navbar && CACHE.navbar === content) { return }
|
||||
CACHE.navbar = content;
|
||||
renderNavbar.rendered = true;
|
||||
|
||||
if (content) { renderTo('nav', marked(content)); }
|
||||
@ -2450,8 +2450,8 @@ function renderSidebar (content) {
|
||||
}
|
||||
|
||||
renderSidebar.rendered = true;
|
||||
if (CACHE['sidebar'] && CACHE['sidebar'] === content) { return }
|
||||
CACHE['sidebar'] = content;
|
||||
if (CACHE.sidebar && CACHE.sidebar === content) { return }
|
||||
CACHE.sidebar = content;
|
||||
renderTo('aside.sidebar', content);
|
||||
if (isToc) { scrollActiveSidebar(); }
|
||||
toc = [];
|
||||
@ -2467,24 +2467,23 @@ function renderLoading (ref) {
|
||||
|
||||
var num = Math.floor(loaded / total * 100);
|
||||
|
||||
if (!CACHE['loading']) {
|
||||
if (!CACHE.loading) {
|
||||
var div = document.createElement('div');
|
||||
|
||||
div.classList.add('progress');
|
||||
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) {
|
||||
clearTimeout(renderLoading.cacheTImeout);
|
||||
CACHE['loading'].style.width = '100%';
|
||||
renderLoading.cacheTImeout = setTimeout(function (_) {
|
||||
CACHE['loading'].style.opacity = 0;
|
||||
CACHE['loading'].style.width = '0%';
|
||||
CACHE.loading.style.opacity = 0;
|
||||
CACHE.loading.style.width = '0%';
|
||||
}, 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…
x
Reference in New Issue
Block a user