io-sanita-theme 2.20.3 → 2.20.5
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.20.5](https://github.com/RedTurtle/io-sanita-theme/compare/2.20.4...2.20.5) (2025-09-16)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* fixed sticky header and horizontal page scroll ([#107](https://github.com/RedTurtle/io-sanita-theme/issues/107)) ([0a2356a](https://github.com/RedTurtle/io-sanita-theme/commit/0a2356a2ab9fdcf9731e2460cb63ebdebc3f64d1))
|
|
8
|
+
|
|
9
|
+
### Documentation
|
|
10
|
+
|
|
11
|
+
* updated release.md ([77a26ad](https://github.com/RedTurtle/io-sanita-theme/commit/77a26adb0ea93625a3839b53a9dd573bbe063bbc))
|
|
12
|
+
|
|
13
|
+
## [2.20.4](https://github.com/RedTurtle/io-sanita-theme/compare/2.20.3...2.20.4) (2025-09-12)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* better lead image centering ([#105](https://github.com/RedTurtle/io-sanita-theme/issues/105)) ([2bafdbc](https://github.com/RedTurtle/io-sanita-theme/commit/2bafdbc235952705060eaa47b67df8abe364ed6c))
|
|
18
|
+
|
|
3
19
|
## [2.20.3](https://github.com/RedTurtle/io-sanita-theme/compare/2.20.2...2.20.3) (2025-09-10)
|
|
4
20
|
|
|
5
21
|
### Bug Fixes
|
package/RELEASE.md
CHANGED
|
@@ -40,6 +40,14 @@
|
|
|
40
40
|
|
|
41
41
|
- ...
|
|
42
42
|
-->
|
|
43
|
+
## Versione 2.20.5 (16/09/2025)
|
|
44
|
+
|
|
45
|
+
### Fix
|
|
46
|
+
|
|
47
|
+
- Sistemato header sticky durante lo scroll della pagina ora è più fluido.
|
|
48
|
+
- Rimossa barra di scorrimento orizzontale che compariva saltuariamente nel sito durante la navigazione.
|
|
49
|
+
|
|
50
|
+
|
|
43
51
|
## Versione 2.16.4 (12/06/2025)
|
|
44
52
|
|
|
45
53
|
### Migliorie
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module components/theme/Header/Header
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import React, { useEffect, useState } from 'react';
|
|
6
|
+
import React, { useRef, useEffect, useState } from 'react';
|
|
7
7
|
import { useLocation } from 'react-router-dom';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import cx from 'classnames';
|
|
@@ -24,39 +24,57 @@ import { Headers } from 'design-react-kit';
|
|
|
24
24
|
|
|
25
25
|
const Header = ({ pathname }) => {
|
|
26
26
|
const location = useLocation();
|
|
27
|
+
const headerWrapperRef = useRef(null);
|
|
28
|
+
const [headerHeight, setHeaderHeight] = useState(0);
|
|
27
29
|
const [mini, setMini] = useState(false);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
|
|
31
|
+
const isEditMode = useSelector((state) =>
|
|
32
|
+
Object.keys(state.form.global ?? {})?.length > 0 ||
|
|
33
|
+
location.pathname.indexOf('/controlpanel') === 0
|
|
32
34
|
);
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
const node = headerWrapperRef.current;
|
|
38
|
+
if (node) {
|
|
39
|
+
const height = node.offsetHeight;
|
|
40
|
+
if (height > 0) {
|
|
41
|
+
setHeaderHeight(height);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}, []);
|
|
37
45
|
|
|
46
|
+
// Scroll solo per mini
|
|
38
47
|
useEffect(() => {
|
|
48
|
+
const handleScroll = () => {
|
|
49
|
+
setMini(window.pageYOffset > 120);
|
|
50
|
+
};
|
|
51
|
+
|
|
39
52
|
window.addEventListener('scroll', handleScroll);
|
|
40
|
-
return () =>
|
|
53
|
+
return () => {
|
|
54
|
+
window.removeEventListener('scroll', handleScroll);
|
|
55
|
+
};
|
|
41
56
|
}, []);
|
|
42
57
|
|
|
43
58
|
return (
|
|
44
59
|
<div className="public-ui">
|
|
45
60
|
{/* <Headers sticky={true} className={mini ? 'is-sticky' : undefined}> */}
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
<div ref={headerWrapperRef}>
|
|
62
|
+
<Headers
|
|
63
|
+
className={cx({
|
|
64
|
+
'is-sticky': mini && !isEditMode,
|
|
65
|
+
'it-header-sticky': !isEditMode,
|
|
66
|
+
})}
|
|
67
|
+
>
|
|
68
|
+
<HeaderSlim />
|
|
53
69
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
70
|
+
<div className="it-nav-wrapper">
|
|
71
|
+
<HeaderCenter />
|
|
72
|
+
<Navigation pathname={pathname} isEditMode={isEditMode} />
|
|
73
|
+
</div>
|
|
74
|
+
<HeaderContacts />
|
|
75
|
+
</Headers>
|
|
76
|
+
</div>
|
|
77
|
+
<div id="headerSpacer" style={{ height: mini ? headerHeight : 0 }} />
|
|
60
78
|
<SubsiteHeader />
|
|
61
79
|
</div>
|
|
62
80
|
);
|