@eeacms/volto-cca-policy 0.2.64 → 0.2.65

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,17 @@ 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
+ ### [0.2.65](https://github.com/eea/volto-cca-policy/compare/0.2.64...0.2.65) - 16 September 2024
8
+
9
+ #### :house: Internal changes
10
+
11
+ - style: Automated code fix [eea-jenkins - [`b5f1f67`](https://github.com/eea/volto-cca-policy/commit/b5f1f677a8624cf2360c8a9df7cf9bacb6510e65)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Remove duplicate line [Tiberiu Ichim - [`f83f770`](https://github.com/eea/volto-cca-policy/commit/f83f770e75a5b5fd4644e382e272d3b4e4e5db99)]
16
+ - Try to fix include archived error [Tiberiu Ichim - [`61dc5d4`](https://github.com/eea/volto-cca-policy/commit/61dc5d4e5840c84dadb55b615d4d5b11bdd64171)]
17
+ - Add styling for image copyright [Tiberiu Ichim - [`eb81a90`](https://github.com/eea/volto-cca-policy/commit/eb81a906bd365916c121ad354d4badd0c8c2f0f0)]
7
18
  ### [0.2.64](https://github.com/eea/volto-cca-policy/compare/0.2.63...0.2.64) - 2 September 2024
8
19
 
9
20
  #### :rocket: Dependency updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.2.64",
3
+ "version": "0.2.65",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -5,6 +5,8 @@ import { Modal, Image } from 'semantic-ui-react';
5
5
  import 'slick-carousel/slick/slick.css';
6
6
  import 'slick-carousel/slick/slick-theme.css';
7
7
 
8
+ import './styles.less';
9
+
8
10
  const Slider = loadable(() => import('react-slick'));
9
11
 
10
12
  const ImageGallery = (props) => {
@@ -66,19 +68,19 @@ const ImageGallery = (props) => {
66
68
  >
67
69
  <Modal.Content>
68
70
  <h3>{image?.title}</h3>
69
- <p>
70
- {image?.description}
71
-
72
- {image?.rights && (
73
- <>
74
- <br />
75
- Image rights: {image.rights}
76
- </>
77
- )}
78
- </p>
71
+ <p>{image?.description}</p>
79
72
  <Slider {...carouselSettings} ref={sliderRef}>
80
73
  {items.map((item, i) => {
81
- return <Image key={i} src={item.url} alt={item?.title} />;
74
+ return image.rights ? (
75
+ <div>
76
+ <div className="image-slide">
77
+ <div className="image-rights">{image.rights}</div>
78
+ <Image key={i} src={item.url} alt={item?.title} />
79
+ </div>
80
+ </div>
81
+ ) : (
82
+ <Image key={i} src={item.url} alt={item?.title} />
83
+ );
82
84
  })}
83
85
  </Slider>
84
86
  <div className="slide-image-count">
@@ -0,0 +1,17 @@
1
+ .image-slide {
2
+ position: relative;
3
+ display: inline-block;
4
+
5
+ .image-rights {
6
+ position: absolute;
7
+ z-index: 100;
8
+ right: 1em;
9
+ bottom: 1em;
10
+ left: 1em;
11
+ padding: 5px;
12
+ background: rgba(0, 0, 0, 0.5); /* optional: semi-transparent background */
13
+ color: white; /* text color */
14
+ font-size: 14px; /* adjust font size as needed */
15
+ text-align: left; /* optional: center the text */
16
+ }
17
+ }
@@ -37,7 +37,7 @@ export const cca_adaptation_sectors = {
37
37
  export const include_archived = booleanFacet(() => ({
38
38
  field: 'IncludeArchived',
39
39
  label: 'Include archived content',
40
- id: 'archived-facet',
40
+ id: 'IncludeArchived',
41
41
  showInFacetsList: false,
42
42
  showInSecondaryFacetsList: true,
43
43
  isFilter: true, // filters don't need facet options to show up
@@ -23,9 +23,7 @@ export const clusters = {
23
23
  };
24
24
 
25
25
  export default function installMainSearch(config) {
26
- const envConfig = process.env.RAZZLE_ENV_CONFIG
27
- ? JSON.parse(process.env.RAZZLE_ENV_CONFIG)
28
- : ccaConfig;
26
+ const envConfig = ccaConfig;
29
27
 
30
28
  const pjson = require('@eeacms/volto-cca-policy/../package.json');
31
29
 
@@ -48,11 +46,6 @@ export default function installMainSearch(config) {
48
46
  cluster_name: 'cca',
49
47
  },
50
48
  });
51
- // ccaSearch.permanentFilters.push({
52
- // term: {
53
- // cca_include_in_search: 'true',
54
- // },
55
- // });
56
49
 
57
50
  ccaSearch.permanentFilters.push({
58
51
  terms: {