@eeacms/volto-bise-policy 1.0.0 → 1.0.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.
Files changed (105) hide show
  1. package/CHANGELOG.md +15 -2
  2. package/package.json +3 -1
  3. package/src/components/manage/Blocks/NewsletterSignup/Edit.jsx +30 -0
  4. package/src/components/manage/Blocks/NewsletterSignup/View.jsx +13 -0
  5. package/src/components/manage/Blocks/NewsletterSignup/index.js +49 -0
  6. package/src/components/manage/Blocks/NewsletterSignup/schema.js +25 -0
  7. package/src/components/manage/Blocks/index.js +2 -0
  8. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderMenuPopUp.js +354 -0
  9. package/src/customizations/@eeacms/volto-eea-website-theme/components/theme/SubsiteClass.jsx +70 -0
  10. package/src/customizations/volto/components/manage/Edit/Edit.jsx +519 -0
  11. package/src/customizations/volto/components/manage/Form/BlockDataForm.jsx +28 -0
  12. package/src/customizations/volto/components/manage/Form/BlocksToolbar.jsx +214 -0
  13. package/src/customizations/volto/components/manage/Form/Field.jsx +269 -0
  14. package/src/customizations/volto/components/manage/Form/Form.jsx +804 -0
  15. package/src/customizations/volto/components/theme/Header/Header.jsx +151 -131
  16. package/src/index.js +31 -5
  17. package/theme/collections/message.overrides +10 -0
  18. package/theme/elements/container.overrides +156 -0
  19. package/theme/elements/segment.variables +1 -0
  20. package/theme/extras/header.overrides +107 -13
  21. package/theme/extras/header.variables +12 -0
  22. package/theme/extras/keyfacts.less +3 -3
  23. package/theme/extras/pluggables.less +17 -16
  24. package/theme/fonts/OpenSans-Bold.ttf +0 -0
  25. package/theme/fonts/OpenSans-Regular.ttf +0 -0
  26. package/theme/fonts/OpenSans-Semibold.ttf +0 -0
  27. package/theme/fonts/Rajdhani-Bold.ttf +0 -0
  28. package/theme/fonts/Rajdhani-Regular.ttf +0 -0
  29. package/theme/globals/helpers.less +75 -0
  30. package/theme/globals/natura2000.less +53 -0
  31. package/theme/globals/site.overrides +204 -4
  32. package/theme/globals/site.variables +5 -0
  33. package/theme/modules/accordion.overrides +3 -0
  34. package/theme/modules/accordion.variables +7 -0
  35. package/theme/modules/tab.overrides +176 -0
  36. package/theme/theme.config +1 -0
  37. package/theme/views/card.variables +2 -0
  38. package/locales/bg/LC_MESSAGES/volto.po +0 -14
  39. package/locales/bg.json +0 -1
  40. package/locales/bs/LC_MESSAGES/volto.po +0 -14
  41. package/locales/bs.json +0 -1
  42. package/locales/cs/LC_MESSAGES/volto.po +0 -14
  43. package/locales/cs.json +0 -1
  44. package/locales/da/LC_MESSAGES/volto.po +0 -14
  45. package/locales/da.json +0 -1
  46. package/locales/de/LC_MESSAGES/volto.po +0 -29
  47. package/locales/de.json +0 -1
  48. package/locales/el/LC_MESSAGES/volto.po +0 -14
  49. package/locales/el.json +0 -1
  50. package/locales/en/LC_MESSAGES/volto.po +0 -14
  51. package/locales/en.json +0 -1
  52. package/locales/es/LC_MESSAGES/volto.po +0 -24
  53. package/locales/es.json +0 -1
  54. package/locales/et/LC_MESSAGES/volto.po +0 -14
  55. package/locales/et.json +0 -1
  56. package/locales/eu/LC_MESSAGES/volto.po +0 -19
  57. package/locales/eu.json +0 -1
  58. package/locales/fi/LC_MESSAGES/volto.po +0 -14
  59. package/locales/fi.json +0 -1
  60. package/locales/fr/LC_MESSAGES/volto.po +0 -29
  61. package/locales/fr.json +0 -1
  62. package/locales/ga/LC_MESSAGES/volto.po +0 -14
  63. package/locales/ga.json +0 -1
  64. package/locales/hr/LC_MESSAGES/volto.po +0 -14
  65. package/locales/hr.json +0 -1
  66. package/locales/hu/LC_MESSAGES/volto.po +0 -14
  67. package/locales/hu.json +0 -1
  68. package/locales/is/LC_MESSAGES/volto.po +0 -14
  69. package/locales/is.json +0 -1
  70. package/locales/it/LC_MESSAGES/volto.po +0 -14
  71. package/locales/it.json +0 -1
  72. package/locales/ja/LC_MESSAGES/volto.po +0 -21
  73. package/locales/ja.json +0 -1
  74. package/locales/lt/LC_MESSAGES/volto.po +0 -14
  75. package/locales/lt.json +0 -1
  76. package/locales/lv/LC_MESSAGES/volto.po +0 -14
  77. package/locales/lv.json +0 -1
  78. package/locales/mk/LC_MESSAGES/volto.po +0 -14
  79. package/locales/mk.json +0 -1
  80. package/locales/mt/LC_MESSAGES/volto.po +0 -14
  81. package/locales/mt.json +0 -1
  82. package/locales/nl/LC_MESSAGES/volto.po +0 -33
  83. package/locales/nl.json +0 -1
  84. package/locales/no/LC_MESSAGES/volto.po +0 -14
  85. package/locales/no.json +0 -1
  86. package/locales/pl/LC_MESSAGES/volto.po +0 -14
  87. package/locales/pl.json +0 -1
  88. package/locales/pt/LC_MESSAGES/volto.po +0 -22
  89. package/locales/pt.json +0 -1
  90. package/locales/pt_BR/LC_MESSAGES/volto.po +0 -20
  91. package/locales/pt_BR.json +0 -1
  92. package/locales/ro/LC_MESSAGES/volto.po +0 -20
  93. package/locales/ro.json +0 -1
  94. package/locales/sh/LC_MESSAGES/volto.po +0 -14
  95. package/locales/sh.json +0 -1
  96. package/locales/sk/LC_MESSAGES/volto.po +0 -14
  97. package/locales/sk.json +0 -1
  98. package/locales/sl/LC_MESSAGES/volto.po +0 -14
  99. package/locales/sl.json +0 -1
  100. package/locales/sq/LC_MESSAGES/volto.po +0 -14
  101. package/locales/sq.json +0 -1
  102. package/locales/sv/LC_MESSAGES/volto.po +0 -14
  103. package/locales/sv.json +0 -1
  104. package/locales/tr/LC_MESSAGES/volto.po +0 -14
  105. package/locales/tr.json +0 -1
@@ -3,8 +3,8 @@
3
3
  * @module components/theme/Header/Header
4
4
  */
5
5
 
6
- import React, { useCallback, useState } from 'react';
7
- import { Dropdown, Image } from 'semantic-ui-react';
6
+ import React, { useCallback, useMemo, useState } from 'react';
7
+ import { Dropdown, Image, Sticky } from 'semantic-ui-react';
8
8
  import { connect, useDispatch, useSelector } from 'react-redux';
9
9
  import Cookies from 'universal-cookie';
10
10
 
@@ -14,12 +14,10 @@ import {
14
14
  getBaseUrl,
15
15
  hasApiExpander,
16
16
  flattenToAppURL,
17
- normalizeLanguageName,
18
17
  } from '@plone/volto/helpers';
19
18
  import { getNavigation } from '@plone/volto/actions';
20
19
  import { Header, Logo } from '@eeacms/volto-eea-design-system/ui';
21
20
  import { usePrevious } from '@eeacms/volto-eea-design-system/helpers';
22
- import { find } from 'lodash';
23
21
  import globeIcon from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Header/global-line.svg';
24
22
  import eeaFlag from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Header/eea.png';
25
23
 
@@ -49,50 +47,60 @@ function getLanguage() {
49
47
  /**
50
48
  * EEA Specific Header component.
51
49
  */
52
- const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
50
+ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
51
+ const dispatch = useDispatch();
53
52
  const [language, setLanguage] = useState(getLanguage());
53
+ const previousToken = usePrevious(token);
54
+ const { items } = props;
55
+ const { eea } = config.settings;
56
+ const { headerOpts } = eea || {};
57
+ const { logo, logoWhite } = headerOpts || {};
58
+
59
+ const width = useSelector((state) => state.screen?.width);
54
60
 
55
- const translations = useSelector(
56
- (state) => state.content.data?.['@components']?.translations?.items,
61
+ const router_pathname = useSelector(
62
+ (state) => removeTrailingSlash(state.router?.location?.pathname) || '',
57
63
  );
64
+ let pathname = router_pathname;
58
65
 
59
- const router_pathname = useSelector((state) => {
60
- return removeTrailingSlash(state.router?.location?.pathname) || '';
61
- });
66
+ const content_pathname = useMemo(
67
+ () => flattenToAppURL(content.data?.['@id']),
68
+ [content],
69
+ );
62
70
 
63
71
  const isSubsite = subsite?.['@type'] === 'Subsite';
64
72
 
65
- const items = props.items;
73
+ if (content.get.loading && content_pathname !== router_pathname) {
74
+ pathname = content_pathname;
75
+ }
66
76
 
67
- const isHomePageInverse = useSelector((state) => {
68
- const layout = state.content?.data?.layout;
69
- const has_home_layout =
70
- layout === 'homepage_inverse_view' ||
71
- (__CLIENT__ && document.body.classList.contains('homepage-inverse'));
72
- return (
73
- has_home_layout &&
74
- (pathname === router_pathname || router_pathname.endsWith('/edit'))
75
- );
76
- });
77
-
78
- const { eea, bise } = config.settings;
79
- const headerOpts = eea.headerOpts || {};
80
- const { logo, logoWhite } = headerOpts || {};
81
- const width = useSelector((state) => state.screen?.width);
82
- const dispatch = useDispatch();
83
- const previousToken = usePrevious(token);
77
+ const isHomePageInverse = ['', '/', '/edit', '/edit/'].includes(pathname);
84
78
 
85
79
  const isMultilingual =
86
- config.settings.isMultilingual ||
87
- (subsite &&
88
- bise.multilingualSubsites.includes(flattenToAppURL(subsite['@id'])));
80
+ config.settings.isMultilingual || (isSubsite && subsite.isMultilingual);
81
+
82
+ const changeLanguage = useCallback(
83
+ (lang) => {
84
+ setLanguage(lang);
85
+ const cookies = new Cookies();
86
+ cookies.set('LANGUAGE', lang);
87
+ },
88
+ [setLanguage],
89
+ );
89
90
 
90
- const changeLanguage = useCallback((language) => {
91
- const cookies = new Cookies();
91
+ const getSubsiteItems = useCallback(() => {
92
+ if (!subsite) return [];
93
+ const subsiteData = items.filter((item) => item.url === subsite['@id'])[0];
94
+ const subsiteItems = subsiteData?.items || [];
95
+ if (subsite.isMultilingual) {
96
+ const subsiteMultilingualData = subsiteItems.filter(
97
+ (item) => item.url === `${subsite['@id']}/${language}`,
98
+ )[0];
99
+ return subsiteMultilingualData?.items || [];
100
+ }
92
101
 
93
- cookies.set('LANGUAGE', normalizeLanguageName(language) || '');
94
- setLanguage(language);
95
- }, []);
102
+ return subsiteItems;
103
+ }, [items, language, subsite]);
96
104
 
97
105
  React.useEffect(() => {
98
106
  const { settings } = config;
@@ -114,12 +122,12 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
114
122
 
115
123
  return (
116
124
  <Header menuItems={items}>
117
- {isHomePageInverse && <BodyClass className="homepage" />}
125
+ {isHomePageInverse && <BodyClass className="homepage homepage-inverse" />}
118
126
  <Header.TopHeader>
119
127
  <Header.TopItem className="official-union">
120
128
  <Image src={eeaFlag} alt="eea flag"></Image>
121
129
  <Header.TopDropdownMenu
122
- text="An official website of the European Union | How do you Know?"
130
+ text="An official website of the European Union | How do you know?"
123
131
  tabletText="EEA information systems"
124
132
  mobileText=" "
125
133
  icon="chevron down"
@@ -127,10 +135,9 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
127
135
  className=""
128
136
  viewportWidth={width}
129
137
  >
138
+ {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}
130
139
  <div
131
140
  className="content"
132
- role="menu"
133
- tabIndex="0"
134
141
  onClick={(evt) => evt.stopPropagation()}
135
142
  onKeyDown={(evt) => evt.stopPropagation()}
136
143
  >
@@ -142,8 +149,6 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
142
149
  href="https://europa.eu/european-union/contact/institutions-bodies_en"
143
150
  target="_blank"
144
151
  rel="noreferrer"
145
- role="option"
146
- aria-selected="false"
147
152
  >
148
153
  See all EU institutions and bodies
149
154
  </a>
@@ -161,7 +166,7 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
161
166
  <div className="wrapper">
162
167
  <Dropdown.Item>
163
168
  <UniversalLink
164
- href={`/natura2000${language ? `/${language}` : ''}`}
169
+ href={`/natura2000/${language}`}
165
170
  className="site"
166
171
  target="_self"
167
172
  rel="noreferrer"
@@ -187,103 +192,117 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
187
192
  )}
188
193
 
189
194
  {isMultilingual && (
190
- <Header.TopDropdownMenu
191
- id="language-switcher"
192
- className="item"
193
- text={`${language.toUpperCase()}`}
194
- mobileText={`${language.toUpperCase()}`}
195
- icon={
196
- <Image src={globeIcon} alt="language dropdown globe icon"></Image>
197
- }
198
- viewportWidth={width}
199
- >
200
- <ul
201
- className="wrapper language-list"
202
- role="listbox"
203
- aria-label="language switcher"
195
+ <Header.TopItem>
196
+ <Header.TopDropdownMenu
197
+ id="language-switcher"
198
+ className="item"
199
+ text={`${language.toUpperCase()}`}
200
+ mobileText={`${language.toUpperCase()}`}
201
+ hasLanguageDropdown={true}
202
+ icon={
203
+ <Image
204
+ src={globeIcon}
205
+ alt="language dropdown globe icon"
206
+ ></Image>
207
+ }
208
+ viewportWidth={width}
204
209
  >
205
- {eea.languages.map((item, index) => (
206
- <Dropdown.Item
207
- as="li"
208
- key={index}
209
- text={
210
- <span>
211
- {item.name}
212
- <span className="country-code">
213
- {item.code.toUpperCase()}
210
+ <ul
211
+ className="wrapper language-list"
212
+ role="listbox"
213
+ aria-label="language switcher"
214
+ >
215
+ {eea.languages.map((item, index) => (
216
+ <Dropdown.Item
217
+ as="li"
218
+ key={index}
219
+ text={
220
+ <span>
221
+ {item.name}
222
+ <span className="country-code">
223
+ {item.code.toUpperCase()}
224
+ </span>
214
225
  </span>
215
- </span>
216
- }
217
- onClick={() => {
218
- const translation = find(translations, {
219
- language: item.code,
220
- });
221
- const to = translation
222
- ? flattenToAppURL(translation['@id'])
223
- : `/${item.code}`;
224
- changeLanguage(item.code);
225
- history.push(to);
226
- }}
227
- ></Dropdown.Item>
228
- ))}
229
- </ul>
230
- </Header.TopDropdownMenu>
226
+ }
227
+ onClick={() => {
228
+ if (isSubsite && subsite.isMultilingual) {
229
+ for (const language of eea.languages) {
230
+ const multilingualSubsiteRe = new RegExp(
231
+ `^(${subsite['@id']})(/${language.code}($|/))(.*)`,
232
+ 'g',
233
+ );
234
+ const matches = [
235
+ ...router_pathname.matchAll(multilingualSubsiteRe),
236
+ ][0];
237
+ if (matches && matches[2] !== `/${item.code}/`) {
238
+ changeLanguage(item.code);
239
+ history.push(
240
+ `${matches[1]}/${item.code}${
241
+ matches[4] ? '/' + matches[4] : ''
242
+ }`,
243
+ );
244
+ break;
245
+ }
246
+ }
247
+ }
248
+ }}
249
+ ></Dropdown.Item>
250
+ ))}
251
+ </ul>
252
+ </Header.TopDropdownMenu>
253
+ </Header.TopItem>
231
254
  )}
232
255
  </Header.TopHeader>
233
- <Header.Main
234
- pathname={pathname}
235
- inverted={isHomePageInverse ? true : false}
236
- transparency={isHomePageInverse ? true : false}
237
- hideSearch={isSubsite}
238
- logo={
239
- <div {...(isSubsite ? { className: 'logo-wrapper' } : {})}>
256
+ <Sticky
257
+ active={isSubsite && subsite['@id'] === '/natura2000'}
258
+ context={__CLIENT__ && document.querySelector('.content-area')}
259
+ >
260
+ <Header.Main
261
+ pathname={router_pathname}
262
+ inverted={isHomePageInverse ? true : false}
263
+ transparency={isHomePageInverse ? true : false}
264
+ hideSearch={isSubsite}
265
+ logo={
240
266
  <Logo
241
267
  src={isHomePageInverse ? logoWhite : logo}
242
268
  title={eea.websiteTitle}
243
269
  alt={eea.organisationName}
244
270
  url={eea.logoTargetUrl}
245
271
  />
246
-
247
- {!!subsite && subsite.title && (
248
- <UniversalLink
249
- href={`${flattenToAppURL(subsite['@id'])}${
250
- isMultilingual ? `/${language}` : ''
251
- }`}
252
- className="subsite-logo"
253
- >
254
- {subsite.title}
255
- </UniversalLink>
256
- )}
257
- </div>
258
- }
259
- menuItems={items}
260
- renderGlobalMenuItem={(item, { onClick }) => (
261
- <a
262
- href={item.url || '/'}
263
- title={item.title}
264
- onClick={(e) => {
265
- e.preventDefault();
266
- onClick(e, item);
267
- }}
268
- >
269
- {item.title}
270
- </a>
271
- )}
272
- renderMenuItem={(item, options, props) => (
273
- <UniversalLink
274
- href={item.url || '/'}
275
- title={item.title}
276
- {...(options || {})}
277
- className={cx(options?.className, {
278
- active: item.url === router_pathname,
279
- })}
280
- >
281
- {props?.iconPosition !== 'right' && props?.children}
282
- <span>{item.title}</span>
283
- {props?.iconPosition === 'right' && props?.children}
284
- </UniversalLink>
285
- )}
286
- ></Header.Main>
272
+ }
273
+ menuItems={
274
+ isSubsite && !subsite.isRoot
275
+ ? getSubsiteItems()
276
+ : items.filter((item) => item.url !== '/natura2000')
277
+ }
278
+ renderGlobalMenuItem={(item, { onClick }) => (
279
+ <a
280
+ href={item.url || '/'}
281
+ title={item.title}
282
+ onClick={(e) => {
283
+ e.preventDefault();
284
+ onClick(e, item);
285
+ }}
286
+ >
287
+ {item.title}
288
+ </a>
289
+ )}
290
+ renderMenuItem={(item, options, props) => (
291
+ <UniversalLink
292
+ href={item.url || '/'}
293
+ title={item.nav_title || item.title}
294
+ {...(options || {})}
295
+ className={cx(options?.className, {
296
+ active: item.url === router_pathname,
297
+ })}
298
+ >
299
+ {props?.iconPosition !== 'right' && props?.children}
300
+ <span>{item.nav_title || item.title}</span>
301
+ {props?.iconPosition === 'right' && props?.children}
302
+ </UniversalLink>
303
+ )}
304
+ />
305
+ </Sticky>
287
306
  </Header>
288
307
  );
289
308
  };
@@ -294,7 +313,8 @@ export default compose(
294
313
  (state) => ({
295
314
  token: state.userSession.token,
296
315
  items: state.navigation.items,
297
- subsite: state.content.data?.['@components']?.subsite,
316
+ subsite: state.subsite.data,
317
+ content: state.content,
298
318
  }),
299
319
  { getNavigation },
300
320
  ),
package/src/index.js CHANGED
@@ -6,6 +6,8 @@ import installStyles from './components/manage/Styles';
6
6
  import biseLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo.svg';
7
7
  import biseWhiteLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo-white.svg';
8
8
 
9
+ import { getBlocksTocEntries } from '@eeacms/volto-block-toc/Block/TocView';
10
+
9
11
  const applyConfig = (config) => {
10
12
  // Volto specific settings
11
13
  config.settings = {
@@ -17,9 +19,6 @@ const applyConfig = (config) => {
17
19
  config.settings.isMultilingual = false;
18
20
  config.settings.defaultLanguage =
19
21
  config.settings.eea?.defaultLanguage || 'en';
20
- config.settings.supportedLanguages = config.settings.eea?.languages?.map(
21
- (item) => item.code,
22
- ) || ['en'];
23
22
 
24
23
  // EEA customizations
25
24
  config.settings.eea = {
@@ -43,12 +42,22 @@ const applyConfig = (config) => {
43
42
  buttonTitle: 'Go to full site search',
44
43
  },
45
44
  ],
46
- logoTargetUrl: '/en',
45
+ logoTargetUrl: '/',
47
46
  };
48
47
 
49
48
  // BISE config
50
49
  config.settings.bise = {
51
- multilingualSubsites: ['/en/natura2000', '/ro/natura2000'],
50
+ subsites: [
51
+ {
52
+ '@id': '/natura2000',
53
+ '@type': 'Subsite',
54
+ title: 'Natura 2000',
55
+ subsite_css_class: {
56
+ token: 'natura2000',
57
+ },
58
+ },
59
+ ],
60
+ multilingualSubsites: ['/natura2000'],
52
61
  };
53
62
 
54
63
  config.settings.apiExpanders.push({
@@ -68,6 +77,23 @@ const applyConfig = (config) => {
68
77
  toolbarButtons.splice(linkIndex, 1, 'a');
69
78
  toolbarButtons.splice(advancedLinkIndex, 1);
70
79
 
80
+ config.blocks.blocksConfig.columnsBlock.tocEntries = (blockData, data) => {
81
+ const columns = blockData.data.blocks_layout.items || [];
82
+ let entries = [];
83
+
84
+ columns.forEach((column) => {
85
+ const { blocksFormEntries } = getBlocksTocEntries(
86
+ {
87
+ ...blockData.data.blocks[column],
88
+ },
89
+ data,
90
+ );
91
+ entries = [...entries, ...blocksFormEntries];
92
+ });
93
+
94
+ return entries;
95
+ };
96
+
71
97
  return [installBlocks, installStyles].reduce(
72
98
  (acc, apply) => apply(acc),
73
99
  config,
@@ -0,0 +1,10 @@
1
+ .ui.message {
2
+ &.map-info-notice {
3
+ margin-top: 0;
4
+ margin-bottom: 0;
5
+ padding-top: 1.5rem;
6
+ padding-bottom: 1.5rem;
7
+ font-style: italic;
8
+ box-shadow: none;
9
+ }
10
+ }
@@ -0,0 +1,156 @@
1
+ /*******************************
2
+ Container
3
+ *******************************/
4
+
5
+ .has--size--full:not(.block-editor-columnsBlock),
6
+ .full-width {
7
+ width: calc(100vw - var(--scrollbar-width, @scrollbarWidth)) !important;
8
+ margin-left: calc(-50vw + var(--scrollbar-width, @scrollbarWidth) / 2) !important;
9
+ margin-right: calc(-50vw + var(--scrollbar-width, @scrollbarWidth) / 2) !important;
10
+ }
11
+
12
+ @media only screen and (min-width: @largestMobileScreen) {
13
+ body.has-toolbar {
14
+ .has--size--full:not(.block-editor-columnsBlock),
15
+ .full-width {
16
+ width: calc(100vw - @toolbarWidth - var(--scrollbar-width, @scrollbarWidth)) !important;
17
+ margin-left: calc(-50vw + (@toolbarWidth + var(--scrollbar-width, @scrollbarWidth)) / 2) !important;
18
+ margin-right: calc(-50vw + (@toolbarWidth + var(--scrollbar-width, @scrollbarWidth)) / 2) !important;
19
+ }
20
+ }
21
+
22
+ body.has-toolbar-collapsed {
23
+ .has--size--full:not(.block-editor-columnsBlock),
24
+ .full-width {
25
+ width: calc(100vw - @toolbarWidthMin - var(--scrollbar-width, @scrollbarWidth)) !important;
26
+ margin-left: calc(-50vw + (var(--scrollbar-width, @scrollbarWidth) + @toolbarWidthMin) / 2) !important;
27
+ margin-right: calc(-50vw + (var(--scrollbar-width, @scrollbarWidth) + @toolbarWidthMin) / 2) !important;
28
+ }
29
+ }
30
+ }
31
+
32
+ .section-add,
33
+ .section-edit {
34
+ #page-add .container,
35
+ #page-edit .container {
36
+ max-width: @containerWidth !important;
37
+ }
38
+ }
39
+
40
+ /* Mobile */
41
+ @media only screen and (max-width: @largestMobileScreen) {
42
+ .ui.container {
43
+ width: @mobileWidth !important;
44
+ margin-left: @mobileGutter !important;
45
+ margin-right: @mobileGutter !important;
46
+ }
47
+ .ui.grid.container {
48
+ width: @mobileGridWidth !important;
49
+ }
50
+ .ui.relaxed.grid.container {
51
+ width: @mobileRelaxedGridWidth !important;
52
+ }
53
+ .ui.very.relaxed.grid.container {
54
+ width: @mobileVeryRelaxedGridWidth !important;
55
+ }
56
+ }
57
+
58
+ body.has-toolbar {
59
+ /* Tablet */
60
+ @media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) {
61
+ .ui.container {
62
+ width: calc(@tabletWidth - @toolbarWidth);
63
+ }
64
+ .ui.grid.container {
65
+ width: calc(@tabletGridWidth - @toolbarWidth) !important;
66
+ }
67
+ .ui.relaxed.grid.container {
68
+ width: calc(@tabletRelaxedGridWidth - @toolbarWidth) !important;
69
+ }
70
+ .ui.very.relaxed.grid.container {
71
+ width: calc(@tabletVeryRelaxedGridWidth - @toolbarWidth) !important;
72
+ }
73
+ }
74
+
75
+ /* Small Monitor */
76
+ @media only screen and (min-width: @computerBreakpoint) and (max-width: @largestSmallMonitor) {
77
+ .ui.container {
78
+ width: calc(@computerWidth - @toolbarWidth);
79
+ }
80
+ .ui.grid.container {
81
+ width: calc(@computerGridWidth - @toolbarWidth) !important;
82
+ }
83
+ .ui.relaxed.grid.container {
84
+ width: calc(@computerRelaxedGridWidth - @toolbarWidth) !important;
85
+ }
86
+ .ui.very.relaxed.grid.container {
87
+ width: calc(@computerVeryRelaxedGridWidth - @toolbarWidth) !important;
88
+ }
89
+ }
90
+
91
+ /* Large Monitor */
92
+ @media only screen and (min-width: @largeMonitorBreakpoint) {
93
+ .ui.container {
94
+ width: calc(@largeMonitorWidth - @toolbarWidth);
95
+ }
96
+ .ui.grid.container {
97
+ width: calc(@largeMonitorGridWidth - @toolbarWidth) !important;
98
+ }
99
+ .ui.relaxed.grid.container {
100
+ width: calc(@largeMonitorRelaxedGridWidth - @toolbarWidth) !important;
101
+ }
102
+ .ui.very.relaxed.grid.container {
103
+ width: calc(@largeMonitorVeryRelaxedGridWidth - @toolbarWidth) !important;
104
+ }
105
+ }
106
+ }
107
+
108
+ body.has-toolbar-collapsed {
109
+ /* Tablet */
110
+ @media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) {
111
+ .ui.container {
112
+ width: calc(@tabletWidth - @toolbarWidthMin);
113
+ }
114
+ .ui.grid.container {
115
+ width: calc(@tabletGridWidth - @toolbarWidthMin) !important;
116
+ }
117
+ .ui.relaxed.grid.container {
118
+ width: calc(@tabletRelaxedGridWidth - @toolbarWidthMin) !important;
119
+ }
120
+ .ui.very.relaxed.grid.container {
121
+ width: calc(@tabletVeryRelaxedGridWidth - @toolbarWidthMin) !important;
122
+ }
123
+ }
124
+
125
+ /* Small Monitor */
126
+ @media only screen and (min-width: @computerBreakpoint) and (max-width: @largestSmallMonitor) {
127
+ .ui.container {
128
+ width: calc(@computerWidth - @toolbarWidthMin);
129
+ }
130
+ .ui.grid.container {
131
+ width: calc(@computerGridWidth - @toolbarWidthMin) !important;
132
+ }
133
+ .ui.relaxed.grid.container {
134
+ width: calc(@computerRelaxedGridWidth - @toolbarWidthMin) !important;
135
+ }
136
+ .ui.very.relaxed.grid.container {
137
+ width: calc(@computerVeryRelaxedGridWidth - @toolbarWidthMin) !important;
138
+ }
139
+ }
140
+
141
+ /* Large Monitor */
142
+ @media only screen and (min-width: @largeMonitorBreakpoint) {
143
+ .ui.container {
144
+ width: calc(@largeMonitorWidth - @toolbarWidthMin);
145
+ }
146
+ .ui.grid.container {
147
+ width: calc(@largeMonitorGridWidth - @toolbarWidthMin) !important;
148
+ }
149
+ .ui.relaxed.grid.container {
150
+ width: calc(@largeMonitorRelaxedGridWidth - @toolbarWidthMin) !important;
151
+ }
152
+ .ui.very.relaxed.grid.container {
153
+ width: calc(@largeMonitorVeryRelaxedGridWidth - @toolbarWidthMin) !important;
154
+ }
155
+ }
156
+ }
@@ -0,0 +1 @@
1
+ @medium: @fontSize;