io-sanita-theme 2.12.0 → 2.12.1

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.12.1](https://github.com/RedTurtle/io-sanita-theme/compare/2.12.0...2.12.1) (2025-04-17)
4
+
5
+ ### Bug Fixes
6
+
7
+ * fixed video block view and layout ([#81](https://github.com/RedTurtle/io-sanita-theme/issues/81)) ([70cf688](https://github.com/RedTurtle/io-sanita-theme/commit/70cf688645320a172b766e37383df52ae9ed4546))
8
+ * root aggregation page - redirect to home ([50d9c52](https://github.com/RedTurtle/io-sanita-theme/commit/50d9c52f5b7fcc4249a8067af19f2dbb8e143de7))
9
+
3
10
  ## [2.12.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.11.2...2.12.0) (2025-04-14)
4
11
 
5
12
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.12.0",
3
+ "version": "2.12.1",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -6,6 +6,7 @@
6
6
  import React, { useState, useEffect } from 'react';
7
7
  import { defineMessages, useIntl } from 'react-intl';
8
8
  import { useDispatch, useSelector } from 'react-redux';
9
+ import { Redirect } from 'react-router-dom';
9
10
  import { Spinner } from 'design-react-kit';
10
11
  import Helmet from '@plone/volto/helpers/Helmet/Helmet';
11
12
  import { resetContent } from '@plone/volto/actions/content/content';
@@ -57,6 +58,9 @@ const AggregationPage = ({ match, route, location }) => {
57
58
  const id = match?.params?.id ?? '';
58
59
  const type = route?.type;
59
60
 
61
+ if (id?.length === 0) {
62
+ return <Redirect to="/" />;
63
+ }
60
64
  //search
61
65
  const b_size = config.settings.defaultPageSize; //batchsize
62
66
  const [searchParams, setSearchParams] = useState({
@@ -145,6 +149,7 @@ const AggregationPage = ({ match, route, location }) => {
145
149
 
146
150
  return (
147
151
  <>
152
+ {/* <Helmet title={title} /> */}
148
153
  <Helmet title={title} />
149
154
 
150
155
  <div className="container px-4 my-4 aggregation-page-view public-ui">
@@ -54,8 +54,8 @@ import { component } from 'design-react-kit/dist/types/Icon/assets/ItAndroidSqua
54
54
  export const AGGREGATION_PAGE_ARGOMENTO = '/argomento/';
55
55
  export const AGGREGATION_PAGE_TIPOLOGIA_UTENTE = '/tipologia-utente/';
56
56
 
57
- const ReleaseLog = loadable(
58
- () => import('io-sanita-theme/components/ReleaseLog/ReleaseLog'),
57
+ const ReleaseLog = loadable(() =>
58
+ import('io-sanita-theme/components/ReleaseLog/ReleaseLog'),
59
59
  );
60
60
 
61
61
  const messages = defineMessages({
@@ -338,13 +338,19 @@ export default function applyConfig(config) {
338
338
  component: ReleaseLog,
339
339
  },
340
340
  {
341
- path: [AGGREGATION_PAGE_ARGOMENTO + ':id'],
341
+ path: [
342
+ AGGREGATION_PAGE_ARGOMENTO + ':id',
343
+ AGGREGATION_PAGE_ARGOMENTO.replace(/\/+$/, ''),
344
+ ],
342
345
  component: AggregationPage,
343
346
  type: 'parliamo_di',
344
347
  breadcrumbs_title: ':id',
345
348
  },
346
349
  {
347
- path: [AGGREGATION_PAGE_TIPOLOGIA_UTENTE + ':id'],
350
+ path: [
351
+ AGGREGATION_PAGE_TIPOLOGIA_UTENTE + ':id',
352
+ AGGREGATION_PAGE_TIPOLOGIA_UTENTE.replace(/\/+$/, ''),
353
+ ],
348
354
  component: AggregationPage,
349
355
  type: 'a_chi_si_rivolge_tassonomia',
350
356
  breadcrumbs_title: ':id',
@@ -1,48 +1,91 @@
1
1
  .block.video {
2
- .ui.embed {
3
- position: relative;
4
- aspect-ratio: 16 / 9;
2
+ .video-inner {
3
+ > div {
4
+ position: relative;
5
+ overflow: hidden;
6
+ max-width: 100%;
7
+ height: 0;
8
+ padding-bottom: 56.25%;
9
+
10
+ .icon-play {
11
+ position: absolute;
12
+ z-index: 2;
13
+ top: 50%;
14
+ left: 50%;
15
+ width: 4rem;
16
+ height: 2.6rem;
17
+ border-radius: 15px;
18
+ background-color: rgba(0, 0, 0, 0.7);
19
+ color: $white;
20
+ cursor: pointer;
21
+ line-height: 2.6rem;
22
+ text-align: center;
23
+ transform: translateX(-50%) translateY(-50%);
24
+ }
25
+ }
26
+
27
+ .ui.embed.active {
28
+ .icon-play,
29
+ img.placeholder {
30
+ display: none;
31
+ }
32
+ }
5
33
 
6
34
  img.placeholder {
7
35
  position: absolute;
8
36
  top: 50%;
9
37
  left: 0;
10
38
  width: 100%;
39
+ min-width: 100%;
40
+ height: unset;
41
+ min-height: 100%;
42
+ object-fit: cover;
11
43
  transform: translateY(-50%);
12
- aspect-ratio: 16 / 9;
13
44
  }
45
+ }
14
46
 
15
- .icon-play {
16
- position: absolute;
17
- z-index: 2;
18
- top: 50%;
19
- left: 50%;
20
- width: 4rem;
21
- height: 2.6rem;
22
- border-radius: 15px;
23
- background-color: rgba(0, 0, 0, 0.7);
24
- color: $white;
47
+ .ui.embed {
48
+ position: relative;
49
+
50
+ img.placeholder {
25
51
  cursor: pointer;
26
- line-height: 2.6rem;
27
- text-align: center;
28
- transform: translateX(-50%) translateY(-50%);
52
+ }
53
+ }
29
54
 
30
- svg {
31
- width: 1.2rem;
32
- height: 1.2rem;
33
- }
55
+ &.align.center iframe,
56
+ &.full .video-inner.full-width iframe {
57
+ position: absolute;
58
+ top: 0;
59
+ left: 0;
60
+ width: 100%;
61
+ height: 100%;
62
+ padding: 0;
63
+ border: none;
64
+ margin: 0;
65
+ }
34
66
 
35
- &:hover,
36
- &:active,
37
- &:focus {
38
- background-color: $primary;
39
- color: $primary-text;
40
- }
67
+ &.full {
68
+ .video-inner.full-width > div {
69
+ height: 480px;
70
+ position: relative;
71
+ padding-bottom: 0;
41
72
  }
73
+ }
42
74
 
43
- &.active {
44
- .icon-play {
45
- display: none;
75
+ @media (max-width: #{map-get($grid-breakpoints, md)}) {
76
+ &.align.right,
77
+ &.align.left {
78
+ .video-inner {
79
+ width: 100%;
80
+ margin-right: 0 !important;
81
+ margin-left: 0 !important;
82
+ float: unset;
83
+ }
84
+
85
+ img {
86
+ margin-right: 0 !important;
87
+ margin-left: 0 !important;
88
+ float: unset;
46
89
  }
47
90
  }
48
91
  }