@eeacms/volto-clms-theme 1.1.164 → 1.1.165

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
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [1.1.165](https://github.com/eea/volto-clms-theme/compare/1.1.164...1.1.165) - 1 July 2024
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Code cleanup [Tiberiu Ichim - [`47e3633`](https://github.com/eea/volto-clms-theme/commit/47e3633511e5096d3691161b4538baa0a14cb86e)]
12
+ - Fix homepage image in backend [Tiberiu Ichim - [`ba27cb9`](https://github.com/eea/volto-clms-theme/commit/ba27cb938fb7e28fd9c228673c088a5c30ab3bc6)]
7
13
  ### [1.1.164](https://github.com/eea/volto-clms-theme/compare/1.1.163...1.1.164) - 27 June 2024
8
14
 
9
15
  #### :bug: Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.164",
3
+ "version": "1.1.165",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -1,19 +1,26 @@
1
+ import { flattenToAppURL } from '@plone/volto/helpers';
2
+
1
3
  export const HomeBgImg = ({ url, alt }) => {
4
+ url = url ? flattenToAppURL(url) : url;
5
+ const srcSet = url
6
+ ? `${url}/@@images/image/huge4000 4000w,
7
+ ${url}/@@images/image/huge3000 3000w,
8
+ ${url}/@@images/image/huge2400 2400w,
9
+ ${url}/@@images/image/huge 1600w,
10
+ ${url}/@@images/image/great 1200w,
11
+ ${url}/@@images/image/larger 1000w,
12
+ ${url}/@@images/image/large 800w,
13
+ ${url}/@@images/image/teaser 600w`
14
+ : '';
15
+
2
16
  return (
3
17
  <img
4
18
  src={
5
- `${url}/@@images/image/huge` ||
6
- 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
19
+ url
20
+ ? `${url}/@@images/image/huge`
21
+ : 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
7
22
  }
8
- srcSet={`${url}/@@images/image/huge4000 4000w,
9
- ${url}/@@images/image/huge3000 3000w,
10
- ${url}/@@images/image/huge2400 2400w,
11
- ${url}/@@images/image/huge 1600w,
12
- ${url}/@@images/image/great 1200w,
13
- ${url}/@@images/image/larger 1000w,
14
- ${url}/@@images/image/large 800w,
15
- ${url}/@@images/image/teaser 600w,
16
- `}
23
+ srcSet={srcSet}
17
24
  alt={alt}
18
25
  width={'100%'}
19
26
  height={349}