@eeacms/volto-cca-policy 0.1.71 → 0.1.72
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 +6 -0
- package/package.json +1 -1
- package/src/components/MigrationButtons.jsx +41 -0
- package/src/index.js +9 -0
- package/theme/globals/site.overrides +0 -76
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
|
+
### [0.1.72](https://github.com/eea/volto-cca-policy/compare/0.1.71...0.1.72) - 9 February 2024
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: map full width layout by removing no longer needed CSS [kreafox - [`6f5f1aa`](https://github.com/eea/volto-cca-policy/commit/6f5f1aa5a92a93c07a4efcc63be7ea862692c6d1)]
|
|
12
|
+
|
|
7
13
|
### [0.1.71](https://github.com/eea/volto-cca-policy/compare/0.1.70...0.1.71) - 5 February 2024
|
|
8
14
|
|
|
9
15
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Plug } from '@plone/volto/components/manage/Pluggable';
|
|
2
|
+
import { getBaseUrl } from '@plone/volto/helpers';
|
|
3
|
+
|
|
4
|
+
function MigrationButtons(props) {
|
|
5
|
+
const { content, token, pathname } = props;
|
|
6
|
+
const contentId = content?.['@id'] || '';
|
|
7
|
+
const show = !!token && contentId && contentId.indexOf('europa.eu') === -1;
|
|
8
|
+
const base = getBaseUrl(pathname);
|
|
9
|
+
|
|
10
|
+
const handleClickMigrate = () => {
|
|
11
|
+
window.open(`http://localhost:8080/cca/${base}/@@volto_migrate`, '_blank');
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const handleClickView = () => {
|
|
15
|
+
window.open(`https://climate-adapt.eea.europa.eu${base}`, '_blank');
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return show ? (
|
|
19
|
+
<Plug pluggable="main.toolbar.top" id="cca-migration-helpers" order={0}>
|
|
20
|
+
<button
|
|
21
|
+
className={`circle-right-btn `}
|
|
22
|
+
id="toolbar-migration"
|
|
23
|
+
onClick={handleClickMigrate}
|
|
24
|
+
title="Migrate context"
|
|
25
|
+
>
|
|
26
|
+
M
|
|
27
|
+
</button>
|
|
28
|
+
|
|
29
|
+
<button
|
|
30
|
+
className={`circle-right-btn `}
|
|
31
|
+
id="toolbar-view"
|
|
32
|
+
onClick={handleClickView}
|
|
33
|
+
title="View original"
|
|
34
|
+
>
|
|
35
|
+
V
|
|
36
|
+
</button>
|
|
37
|
+
</Plug>
|
|
38
|
+
) : null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default MigrationButtons;
|
package/src/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import installStore from './store';
|
|
|
27
27
|
|
|
28
28
|
import GeocharsWidget from './components/theme/Widgets/GeocharsWidget';
|
|
29
29
|
import GeolocationWidget from './components/theme/Widgets/GeolocationWidget';
|
|
30
|
+
import MigrationButtons from './components/MigrationButtons';
|
|
30
31
|
|
|
31
32
|
const getEnv = () => (typeof window !== 'undefined' ? window.env : process.env);
|
|
32
33
|
|
|
@@ -448,6 +449,14 @@ const applyConfig = (config) => {
|
|
|
448
449
|
...(config.addonRoutes || []),
|
|
449
450
|
];
|
|
450
451
|
|
|
452
|
+
config.settings.appExtras = [
|
|
453
|
+
...(config.settings.appExtras || []),
|
|
454
|
+
{
|
|
455
|
+
match: '',
|
|
456
|
+
component: MigrationButtons,
|
|
457
|
+
},
|
|
458
|
+
];
|
|
459
|
+
|
|
451
460
|
return compose(installBlocks, installSearchEngine, installStore)(config);
|
|
452
461
|
};
|
|
453
462
|
|
|
@@ -148,82 +148,6 @@ div.content-metadata {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
body.view-viewview .full {
|
|
152
|
-
position: relative !important;
|
|
153
|
-
right: 50%;
|
|
154
|
-
left: 50%;
|
|
155
|
-
width: 100vw !important;
|
|
156
|
-
max-width: initial !important;
|
|
157
|
-
margin-right: -50vw !important;
|
|
158
|
-
margin-left: -50vw !important;
|
|
159
|
-
|
|
160
|
-
> div {
|
|
161
|
-
display: block;
|
|
162
|
-
width: 100% !important;
|
|
163
|
-
margin-right: auto !important;
|
|
164
|
-
margin-left: auto !important;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
body.view-viewview.has-toolbar:not(.has-sidebar):not(.has-sidebar-collapsed) {
|
|
169
|
-
.full > div {
|
|
170
|
-
width: calc(100% - @toolbarWidth) !important;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
@media screen and (min-width: @largestMobileScreen) {
|
|
175
|
-
body.view-viewview.has-toolbar.has-sidebar {
|
|
176
|
-
.full > div {
|
|
177
|
-
width: calc(100% - (@toolbarWidth + @sidebarWidth)) !important;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
body.view-viewview.has-toolbar.has-sidebar-collapsed {
|
|
182
|
-
.full > div {
|
|
183
|
-
width: calc(100% - (@toolbarWidth + @collapsedToolbarWidth)) !important;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
body.view-viewview.has-toolbar-collapsed:not(.has-sidebar):not(.has-sidebar-collapsed) {
|
|
188
|
-
.full > div {
|
|
189
|
-
width: calc(100% - @collapsedToolbarWidth) !important;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
body.view-viewview.has-toolbar-collapsed.has-sidebar {
|
|
194
|
-
.full > div {
|
|
195
|
-
.full-width-block {
|
|
196
|
-
width: calc(100% - (@collapsedToolbarWidth + @sidebarWidth)) !important;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
body.view-viewview.has-toolbar-collapsed.has-sidebar-collapsed {
|
|
202
|
-
.full > div {
|
|
203
|
-
width: calc(
|
|
204
|
-
100% - (@collapsedToolbarWidth + @collapsedToolbarWidth)
|
|
205
|
-
) !important;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
@media only screen and (max-width: 767px) {
|
|
211
|
-
body.view-viewview.has-toolbar-collapsed.has-sidebar-collapsed
|
|
212
|
-
.full.full-width-block,
|
|
213
|
-
body.view-viewview.has-toolbar.has-sidebar-collapsed .full.full-width-block {
|
|
214
|
-
width: 100% !important;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
@media screen and (max-width: @largestMobileScreen) {
|
|
219
|
-
body.view-viewview.has-toolbar:not(.has-sidebar):not(.has-sidebar-collapsed),
|
|
220
|
-
body.view-viewview.has-toolbar-collapsed:not(.has-sidebar):not(.has-sidebar-collapsed) {
|
|
221
|
-
.full > div {
|
|
222
|
-
width: 100% !important;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
151
|
.listing-body-dates:empty {
|
|
228
152
|
margin-bottom: 0;
|
|
229
153
|
}
|