io-sanita-theme 2.21.9 → 2.22.0

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.22.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.21.10...2.22.0) (2025-11-03)
4
+
5
+ ### Features
6
+
7
+ * replace fixed sorting with query string-based sorting ([#114](https://github.com/RedTurtle/io-sanita-theme/issues/114)) ([29d8195](https://github.com/RedTurtle/io-sanita-theme/commit/29d8195f40afc76b821d416763d8db3fecd9ebf7))
8
+
9
+ ## [2.21.10](https://github.com/RedTurtle/io-sanita-theme/compare/2.21.9...2.21.10) (2025-10-10)
10
+
11
+ ### Bug Fixes
12
+
13
+ * fixed sticky menu and callout block ([d8c7612](https://github.com/RedTurtle/io-sanita-theme/commit/d8c7612890bfbfee91c2412b54e3a909ccaed5e3))
14
+
3
15
  ## [2.21.9](https://github.com/RedTurtle/io-sanita-theme/compare/2.21.8...2.21.9) (2025-10-08)
4
16
 
5
17
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.21.9",
3
+ "version": "2.22.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -126,7 +126,10 @@ const Search = () => {
126
126
  a_chi_si_rivolge_tassonomia: [],
127
127
  sections: [],
128
128
  portal_types: [],
129
- order: { sort_on: 'relevance', sort_order: 'ascending' },
129
+ order: {
130
+ sort_on: qs.parse(location.search)?.sort_on ?? 'relevance',
131
+ sort_order: qs.parse(location.search)?.sort_order ?? 'ascending',
132
+ },
130
133
  });
131
134
  const [advFiltersOpen, setAdvFiltersOpen] = useState(false);
132
135
 
@@ -61,3 +61,12 @@
61
61
  }
62
62
  }
63
63
  }
64
+
65
+ @media (max-width: #{map-get($grid-breakpoints, ml)}) {
66
+ .it-header-wrapper.is-sticky.it-header-sticky {
67
+ .header-contacts .container {
68
+ padding-left: 0;
69
+ padding-right: 0;
70
+ }
71
+ }
72
+ }
@@ -25,6 +25,7 @@ import { Headers } from 'design-react-kit';
25
25
  const Header = ({ pathname }) => {
26
26
  const location = useLocation();
27
27
  const headerWrapperRef = useRef(null);
28
+ const headerSlimRef = useRef(null);
28
29
  const [headerHeight, setHeaderHeight] = useState(0);
29
30
  const [mini, setMini] = useState(false);
30
31
 
@@ -35,15 +36,18 @@ const Header = ({ pathname }) => {
35
36
  );
36
37
 
37
38
  useEffect(() => {
38
- const node = headerWrapperRef.current;
39
- if (node) {
40
- const height = node.offsetHeight;
41
- if (height > 0) {
42
- setHeaderHeight(height);
43
- }
39
+ const headerWrapper = headerWrapperRef.current;
40
+ const headerSlim = headerSlimRef.current;
41
+
42
+ if (headerWrapper.offsetHeight && headerSlim.offsetHeight) {
43
+
44
+ // 5px è lo scarto quando sei mobile, 120 l'altezza fissa quando non si è su mobile
45
+ const heightForDevice = window.matchMedia('(max-width: 991px)').matches ? (headerSlim.offsetHeight - 5) : (headerSlim.offsetHeight + 120);
46
+
47
+ setHeaderHeight(headerWrapper.offsetHeight);
44
48
 
45
49
  const handleScroll = () => {
46
- setMini(window.pageYOffset > height);
50
+ setMini(window.pageYOffset > heightForDevice);
47
51
  };
48
52
 
49
53
  window.addEventListener('scroll', handleScroll);
@@ -56,7 +60,7 @@ const Header = ({ pathname }) => {
56
60
  return (
57
61
  <div className="public-ui">
58
62
  {/* <Headers sticky={true} className={mini ? 'is-sticky' : undefined}> */}
59
- <div ref={headerWrapperRef} id='mainHeaderWrapper'>
63
+ <div ref={headerWrapperRef} id="mainHeaderWrapper">
60
64
  <Headers
61
65
  className={cx({
62
66
  'is-sticky': mini && !isEditMode,
@@ -64,7 +68,9 @@ const Header = ({ pathname }) => {
64
68
  })}
65
69
  >
66
70
  {/* SLIM HEADER */}
67
- <HeaderSlim />
71
+ <div ref={headerSlimRef} id="headerSlimWrapper">
72
+ <HeaderSlim />
73
+ </div>
68
74
 
69
75
  {/* MAIN HEADER */}
70
76
  <div className="it-nav-wrapper">
@@ -177,7 +177,12 @@ const Navigation = ({ pathname = '/', isEditMode }) => {
177
177
  </FocusLock>
178
178
  </CollapseNavigation>
179
179
  </HeaderContent>
180
- ) : null}
180
+ ) : (// icona segnaposto per lo sticky menu,
181
+ <Icon
182
+ className="d-none"
183
+ icon="it-burger"
184
+ />
185
+ )}
181
186
  </Header>
182
187
  );
183
188
  };
@@ -17,7 +17,10 @@ div.callout {
17
17
  .callout-title {
18
18
  display: flex;
19
19
  width: calc(100% + 1.389rem * 2 + 1.4rem); // padding + icon
20
- align-items: center;
20
+
21
+ .icon {
22
+ min-width: 24px;
23
+ }
21
24
 
22
25
  .text {
23
26
  position: unset;
@@ -33,6 +36,7 @@ div.callout {
33
36
  min-width: 3rem;
34
37
  height: 2px;
35
38
  flex: 1;
39
+ top: 1rem;
36
40
  background-color: $color-border-secondary;
37
41
  }
38
42
  }
@@ -13,6 +13,12 @@
13
13
  }
14
14
  }
15
15
  }
16
+
17
+ @media (max-width: #{map-get($grid-breakpoints, ml)}) {
18
+ .it-nav-wrapper .it-brand-wrapper {
19
+ padding-left: 1.2rem;
20
+ }
21
+ }
16
22
  }
17
23
  }
18
24
  }