@eeacms/volto-cca-policy 0.1.36 → 0.1.37
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 +2 -0
- package/package.json +1 -1
- package/src/components/theme/Header.jsx +29 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@ 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.1.37](https://github.com/eea/volto-cca-policy/compare/0.1.36...0.1.37) - 11 August 2023
|
|
8
|
+
|
|
7
9
|
### [0.1.36](https://github.com/eea/volto-cca-policy/compare/0.1.35...0.1.36) - 11 August 2023
|
|
8
10
|
|
|
9
11
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -31,6 +31,34 @@ function removeTrailingSlash(path) {
|
|
|
31
31
|
return path.replace(/\/+$/, '');
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Logo component class.
|
|
36
|
+
* @function Logo
|
|
37
|
+
* @param {Object} intl Intl object
|
|
38
|
+
* @returns {string} Markup of the component.
|
|
39
|
+
*/
|
|
40
|
+
const DirectLinkLogo = ({
|
|
41
|
+
src,
|
|
42
|
+
invertedSrc,
|
|
43
|
+
id,
|
|
44
|
+
url,
|
|
45
|
+
alt,
|
|
46
|
+
title,
|
|
47
|
+
inverted,
|
|
48
|
+
}) => {
|
|
49
|
+
return (
|
|
50
|
+
<a href={url} title={title} className={'logo'}>
|
|
51
|
+
<Image
|
|
52
|
+
src={inverted ? invertedSrc : src}
|
|
53
|
+
alt={alt}
|
|
54
|
+
title={title}
|
|
55
|
+
className="eea-logo"
|
|
56
|
+
id={id}
|
|
57
|
+
/>
|
|
58
|
+
</a>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
34
62
|
/**
|
|
35
63
|
* EEA Specific Header component.
|
|
36
64
|
*/
|
|
@@ -219,7 +247,7 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
|
|
|
219
247
|
subsite.title
|
|
220
248
|
)}
|
|
221
249
|
<div className="subsite-logo">
|
|
222
|
-
<
|
|
250
|
+
<DirectLinkLogo
|
|
223
251
|
src={isHomePageInverse ? logoWhite : logo}
|
|
224
252
|
title={eea.websiteTitle}
|
|
225
253
|
alt={eea.organisationName}
|