hexo-auto-toc 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/index.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,6 +69,8 @@ npm install
|
|
|
69
69
|
|
|
70
70
|
Automatic Layout: Enhanced the left/right placement of the TOC, allowing it to automatically choose the best side.
|
|
71
71
|
|
|
72
|
+
7.9 长度优化
|
|
73
|
+
|
|
72
74
|
# Recommendations
|
|
73
75
|
|
|
74
76
|
- hexo-everyday-calendar:This is a practical calendar plugin for hexo bloggers, like contribution statistics on GitHub.
|
package/index.js
CHANGED
|
@@ -36,7 +36,7 @@ hexo.extend.filter.register('after_render:html', function (html) {
|
|
|
36
36
|
top: 0vh;
|
|
37
37
|
left: 0px;
|
|
38
38
|
width: 15rem;
|
|
39
|
-
max-height:
|
|
39
|
+
max-height: 80vh;
|
|
40
40
|
overflow-y: auto;
|
|
41
41
|
overflow-x: auto;
|
|
42
42
|
padding: 10px;
|
|
@@ -72,6 +72,7 @@ hexo.extend.filter.register('after_render:html', function (html) {
|
|
|
72
72
|
const toc = document.querySelector('#fixed-toc-container');
|
|
73
73
|
if (toc) {
|
|
74
74
|
toc.style.top = navBottom + 'px';
|
|
75
|
+
toc.style.maxHeight=window.innerHeight - navBottom.getBoundingClientRect().bottom;
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hexo-auto-toc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Automatically generates a responsive table of contents that fixes to the side of the article page or above the articles, depending on the user's device.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"toc",
|