@trimble-oss/modus-docs-hugo-theme 1.0.0-alpha13 → 1.0.0-alpha14
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/assets/css/_mobile.scss +1 -1
- package/assets/css/_sidebar.scss +2 -2
- package/assets/js/scroll-to-top.js +19 -19
- package/package.json +11 -11
package/assets/css/_mobile.scss
CHANGED
package/assets/css/_sidebar.scss
CHANGED
@@ -4,30 +4,30 @@
|
|
4
4
|
* Licensed under MIT
|
5
5
|
*/
|
6
6
|
|
7
|
-
|
7
|
+
const ScrollToTop = (() => {
|
8
|
+
const target = document.querySelector('footer');
|
9
|
+
const scrollToTopBtn = document.querySelector('.btn-to-top');
|
10
|
+
const rootElement = document.documentElement;
|
8
11
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
function callback(entries, observer) {
|
13
|
-
entries.forEach((entry) => {
|
14
|
-
window.onscroll = function (e) {
|
12
|
+
function callback(entries, observer) {
|
13
|
+
entries.forEach((entry) => {
|
15
14
|
if (entry.isIntersecting) {
|
16
15
|
scrollToTopBtn.classList.add('btn-to-top-show');
|
17
16
|
} else {
|
18
17
|
scrollToTopBtn.classList.remove('btn-to-top-show');
|
19
18
|
}
|
20
|
-
};
|
21
|
-
}
|
22
|
-
|
19
|
+
});
|
20
|
+
}
|
21
|
+
|
22
|
+
function scrollToTop() {
|
23
|
+
rootElement.scrollTo({
|
24
|
+
top: 0,
|
25
|
+
behavior: 'smooth',
|
26
|
+
});
|
27
|
+
}
|
23
28
|
|
24
|
-
|
25
|
-
rootElement.scrollTo({
|
26
|
-
top: 0,
|
27
|
-
behavior: 'smooth',
|
28
|
-
});
|
29
|
-
}
|
30
|
-
scrollToTopBtn.addEventListener('click', scrollToTop);
|
29
|
+
scrollToTopBtn.addEventListener('click', scrollToTop);
|
31
30
|
|
32
|
-
const observer = new IntersectionObserver(callback);
|
33
|
-
observer.observe(target);
|
31
|
+
const observer = new IntersectionObserver(callback);
|
32
|
+
observer.observe(target);
|
33
|
+
})();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trimble-oss/modus-docs-hugo-theme",
|
3
|
-
"version": "1.0.0-
|
3
|
+
"version": "1.0.0-alpha14",
|
4
4
|
"description": "A Documentation theme for Hugo built by Trimble",
|
5
5
|
"homepage": "https://github.com/trimble-oss/modus-docs-hugo-theme",
|
6
6
|
"bugs": {
|
@@ -26,21 +26,21 @@
|
|
26
26
|
"test": "npm run lint-css && npm run lint-html && npm run lint-js"
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"@trimble-oss/modus-bootstrap": "2.0.0-
|
30
|
-
"@trimble-oss/modus-icons": "1.
|
29
|
+
"@trimble-oss/modus-bootstrap": "2.0.0-alpha15",
|
30
|
+
"@trimble-oss/modus-icons": "1.8.0"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
33
33
|
"autoprefixer": "10.4.16",
|
34
|
-
"eslint": "8.
|
35
|
-
"eslint-config-prettier": "9.
|
34
|
+
"eslint": "8.55.0",
|
35
|
+
"eslint-config-prettier": "9.1.0",
|
36
36
|
"htmlhint": "1.1.4",
|
37
37
|
"hugo-bin": "0.116.4",
|
38
|
-
"postcss": "8.4.
|
39
|
-
"postcss-cli": "
|
40
|
-
"prettier": "3.
|
41
|
-
"stylelint": "
|
42
|
-
"stylelint-config-standard-scss": "
|
43
|
-
"stylelint-order": "6.0.
|
38
|
+
"postcss": "8.4.32",
|
39
|
+
"postcss-cli": "11.0.0",
|
40
|
+
"prettier": "3.1.1",
|
41
|
+
"stylelint": "16.0.2",
|
42
|
+
"stylelint-config-standard-scss": "12.0.0",
|
43
|
+
"stylelint-order": "6.0.4"
|
44
44
|
},
|
45
45
|
"hugo-bin": {
|
46
46
|
"buildTags": "extended"
|