hexo-theme-next
Advanced tools
Comparing version 8.2.2 to 8.3.0
{ | ||
"name": "hexo-theme-next", | ||
"version": "8.2.2", | ||
"version": "8.3.0", | ||
"description": "Elegant and powerful theme for Hexo.", | ||
@@ -17,3 +17,3 @@ "main": "package.json", | ||
"eslint": "eslint scripts/ source/js test/", | ||
"prepare": "git config --local core.hooksPath .githooks/", | ||
"prepare": "node .githooks/install.js", | ||
"stylint": "stylint source/css/", | ||
@@ -36,10 +36,10 @@ "test": "mocha test/index.js" | ||
"@next-theme/eslint-config": "0.0.2", | ||
"chai": "4.3.0", | ||
"eslint": "7.21.0", | ||
"chai": "4.3.4", | ||
"eslint": "7.23.0", | ||
"hexo": "5.4.0", | ||
"hexo-renderer-marked": "4.0.0", | ||
"js-yaml": "4.0.0", | ||
"mocha": "8.3.0", | ||
"mocha": "8.3.2", | ||
"stylint": "2.0.0" | ||
} | ||
} |
@@ -10,6 +10,6 @@ /** | ||
module.exports = function(args, content) { | ||
return `<div class="mermaid"> | ||
return `<pre class="mermaid"> | ||
${args.join(' ')} | ||
${escapeHTML(content)} | ||
</div>`; | ||
</pre>`; | ||
}; |
@@ -15,31 +15,4 @@ /* global NexT, CONFIG */ | ||
if (!siteNav) return; | ||
const animateAction = document.body.classList.contains('site-nav-on'); | ||
const height = NexT.utils.getComputedStyle(siteNav); | ||
siteNav.style.height = animateAction ? height : 0; | ||
const toggle = () => document.body.classList.toggle('site-nav-on'); | ||
const begin = () => { | ||
siteNav.style.overflow = 'hidden'; | ||
}; | ||
const complete = () => { | ||
siteNav.style.overflow = ''; | ||
siteNav.style.height = ''; | ||
}; | ||
window.anime(Object.assign({ | ||
targets : siteNav, | ||
duration: 200, | ||
height : animateAction ? [height, 0] : [0, height], | ||
easing : 'linear' | ||
}, animateAction ? { | ||
begin, | ||
complete: () => { | ||
complete(); | ||
toggle(); | ||
} | ||
} : { | ||
begin: () => { | ||
begin(); | ||
toggle(); | ||
}, | ||
complete | ||
})); | ||
siteNav.style.setProperty('--scroll-height', siteNav.scrollHeight + 'px'); | ||
document.body.classList.toggle('site-nav-on'); | ||
}); | ||
@@ -46,0 +19,0 @@ |
@@ -164,3 +164,3 @@ /* global NexT, CONFIG */ | ||
if (readingProgressBar) { | ||
readingProgressBar.style.width = scrollPercent.toFixed(2) + '%'; | ||
readingProgressBar.style.setProperty('--progress', scrollPercent.toFixed(2) + '%'); | ||
} | ||
@@ -294,13 +294,2 @@ } | ||
getComputedStyle: function(element) { | ||
const clone = element.cloneNode(true); | ||
clone.style.position = 'absolute'; | ||
clone.style.visibility = 'hidden'; | ||
clone.style.display = 'block'; | ||
element.parentNode.appendChild(clone); | ||
const height = clone.clientHeight; | ||
element.parentNode.removeChild(clone); | ||
return height; | ||
}, | ||
/** | ||
@@ -307,0 +296,0 @@ * Init Sidebar & TOC inner dimensions on all pages and for all schemes. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
498757
2207