@kitconcept/volto-light-theme 2.1.0 → 3.0.0-alpha.0

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
@@ -8,6 +8,46 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 3.0.0-alpha.0 (2023-12-27)
12
+
13
+ ### Breaking
14
+
15
+ - Upgraded the dependency on `@kitconcept/volto-slider-block` to use `6.0.0`.
16
+
17
+ This is a drop-in replacement, so no action is required for the existing slider blocks you may have already in your sites.
18
+ However, the CSS classes of the structural slider block elements changed in this version.
19
+ The inner (visible objects) CSS classes remain unchanged.
20
+ If you have customized them in your project, you may have to update them, although the structural class names are rarely customized aside from vertical spacing properties.
21
+ They are mapped 1:1 with the previous ones, following this table correspondence:
22
+
23
+ | Old className | New className |
24
+ | --------------- | ---------------- |
25
+ | slick-slider | slider-wrapper |
26
+ | slick-list | slider-viewport |
27
+ | slick-track | slider-container |
28
+ | slick-slide | slider-slide |
29
+ | slick-arrow | slider-button |
30
+ | slick-prev | slider-button-prev |
31
+ | slick-next | slider-slide-next |
32
+ | slick-next | slider-slide-next |
33
+ | slick-dots | slider-dots |
34
+ | slick-dot | slider-dot |
35
+
36
+ For more information, please check the https://github.com/kitconcept/volto-slider-block/blob/main/README.md [#288](https://github.com/kitconcept/volto-light-theme/pull/288)
37
+
38
+ ### Bugfix
39
+
40
+ - Fix showing up uploaded logo from site controlpanel. @iFlameing [#291](https://github.com/kitconcept/volto-light-theme/pull/291)
41
+ - Un-pin `eslint-plugin-jsx-a11y` version @sneridagh [#299](https://github.com/kitconcept/volto-light-theme/pull/299)
42
+ - Fix Blocks chooser styling @iRohitSingh [#307](https://github.com/kitconcept/volto-light-theme/pull/307)
43
+ - Remove id selector from listings because of css specificity @steffenri [#309](https://github.com/kitconcept/volto-light-theme/pull/309)
44
+ - Fix margins of h1 in sitemap view @steffenri [#312](https://github.com/kitconcept/volto-light-theme/pull/312)
45
+ - Fix homepage link for all language codes (#298) @steffenri [#313](https://github.com/kitconcept/volto-light-theme/pull/313)
46
+
47
+ ### Internal
48
+
49
+ - Upgrade slider to 6.1.0 @sneridagh [#316](https://github.com/kitconcept/volto-light-theme/pull/316)
50
+
11
51
  ## 2.1.0 (2023-12-13)
12
52
 
13
53
  ### Feature
package/Makefile CHANGED
@@ -22,7 +22,7 @@ RESET=`tput sgr0`
22
22
  YELLOW=`tput setaf 3`
23
23
 
24
24
  PLONE_VERSION=6.0.8
25
- VOLTO_VERSION=17.5.0
25
+ VOLTO_VERSION=17.7.0
26
26
 
27
27
  ADDON_NAME='@kitconcept/volto-light-theme'
28
28
  ADDON_PATH='volto-light-theme'
package/README.md CHANGED
@@ -118,14 +118,15 @@ It is recommended that your project or policy add-on `package.json` include the
118
118
 
119
119
  ```json
120
120
  "dependencies": {
121
- "@eeacms/volto-accordion-block": "9.0.0",
122
- "@kitconcept/volto-button-block": "2.1.0",
123
- "@kitconcept/volto-dsgvo-banner": "1.3.0",
124
- "@kitconcept/volto-heading-block": "2.2.0",
125
- "@kitconcept/volto-introduction-block": "1.0.0",
126
- "@kitconcept/volto-light-theme": "1.0.0",
127
- "@kitconcept/volto-separator-block": "4.0.0",
128
- "@kitconcept/volto-highlight-block": "3.0.0",
121
+ "@eeacms/volto-accordion-block": "^10.4.0",
122
+ "@kitconcept/volto-button-block": "^2.3.1",
123
+ "@kitconcept/volto-dsgvo-banner": "^1.3.0",
124
+ "@kitconcept/volto-heading-block": "^2.4.0",
125
+ "@kitconcept/volto-highlight-block": "^3.0.0",
126
+ "@kitconcept/volto-introduction-block": "^1.0.0",
127
+ "@kitconcept/volto-separator-block": "^4.0.0",
128
+ "@kitconcept/volto-slider-block": "^6.0.0",
129
+ "@kitconcept/volto-light-theme": "^2.0.0",
129
130
  }
130
131
  ```
131
132
 
@@ -155,7 +156,7 @@ Then, declare the theme in your project `package.json`:
155
156
  "theme": "@kitconcept/volto-light-theme",
156
157
  ```
157
158
 
158
- Alternativelly, you can also declare it in your project's `volto.config.js`:
159
+ Alternatively, you can also declare it in your project's `volto.config.js`:
159
160
 
160
161
  ```js
161
162
  const addons = [];
@@ -169,9 +170,9 @@ module.exports = {
169
170
 
170
171
  You can specify your project add-ons in `volto.config.js`, but sometimes is better to have them all in one place (in your policy add-on) for portability.
171
172
 
172
- ## Feature flags
173
+ ## Feature Flags
173
174
 
174
- ### Enable fat menu
175
+ ### Enable Fat Menu
175
176
 
176
177
  Since 2.0.0, the light theme has a fat menu (below the main site sections) triggered clickin on one of them.
177
178
  It's behind a feature flag, as opt-out:
@@ -220,7 +221,7 @@ Run `make help` to list the available commands.
220
221
  - Docker
221
222
  - Node 18 (e.g. via nvm)
222
223
 
223
- ### Development environment Setup
224
+ ### Development Environment Setup
224
225
 
225
226
  Run once
226
227
 
@@ -231,7 +232,7 @@ make dev
231
232
  which will build and launch the backend and frontend containers.
232
233
  There's no need to build them again after doing it the first time unless something has changed from the container setup.
233
234
 
234
- In order to make the local IDE play well with this setup, is it required to run once `yarn` to install locally the required packages (ESlint, Prettier, Stylelint).
235
+ To make the local IDE play well with this setup, it is required to run `yarn` once to install the required packages (ESlint, Prettier, Stylelint).
235
236
 
236
237
  Run
237
238
 
@@ -260,7 +261,7 @@ This will start both the frontend and backend containers.
260
261
 
261
262
  ### Stop Backend (Docker)
262
263
 
263
- After developing, in order to stop the running backend, don't forget to run:
264
+ After developing, to stop the running backend, don't forget to run:
264
265
 
265
266
  Run
266
267
 
@@ -324,7 +325,7 @@ Run
324
325
  make test-acceptance
325
326
  ```
326
327
 
327
- To run Cypress tests afterwards.
328
+ To run Cypress tests afterward.
328
329
 
329
330
  When finished, don't forget to shutdown the backend server.
330
331
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitconcept/volto-light-theme",
3
- "version": "2.1.0",
3
+ "version": "3.0.0-alpha.0",
4
4
  "description": "Volto Light Theme by kitconcept",
5
5
  "main": "src/index.js",
6
6
  "repository": {
@@ -41,7 +41,7 @@
41
41
  "eslint-import-resolver-alias": "1.1.2",
42
42
  "eslint-import-resolver-babel-plugin-root-import": "1.1.1",
43
43
  "eslint-plugin-import": "2.28.1",
44
- "eslint-plugin-jsx-a11y": "6.7.1",
44
+ "eslint-plugin-jsx-a11y": "^6.7.1",
45
45
  "eslint-plugin-prettier": "5.0.0",
46
46
  "eslint-plugin-react": "7.33.2",
47
47
  "eslint-plugin-react-hooks": "4.6.0",
@@ -71,7 +71,7 @@
71
71
  "@kitconcept/volto-highlight-block": "^3.0.0",
72
72
  "@kitconcept/volto-introduction-block": "^1.0.0",
73
73
  "@kitconcept/volto-separator-block": "^4.0.0",
74
- "@kitconcept/volto-slider-block": "5.1.1",
75
- "@plone/volto": "^17.5.0"
74
+ "@kitconcept/volto-slider-block": "^6.1.0",
75
+ "@plone/volto": "^17.6.1"
76
76
  }
77
77
  }
@@ -5,6 +5,7 @@ import config from '@plone/volto/registry';
5
5
  import { UniversalLink } from '@plone/volto/components';
6
6
  import { toBackendLang } from '@plone/volto/helpers';
7
7
  import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg';
8
+ import { flattenToAppURL } from '@plone/volto/helpers';
8
9
 
9
10
  const messages = defineMessages({
10
11
  site: {
@@ -21,6 +22,7 @@ const Logo = () => {
21
22
  const { settings } = config;
22
23
  const lang = useSelector((state) => state.intl.locale);
23
24
  const intl = useIntl();
25
+ const site = useSelector((state) => state.site.data);
24
26
 
25
27
  return (
26
28
  <UniversalLink
@@ -28,7 +30,11 @@ const Logo = () => {
28
30
  title={intl.formatMessage(messages.site)}
29
31
  >
30
32
  <img
31
- src={LogoImage}
33
+ src={
34
+ site['plone.site_logo']
35
+ ? flattenToAppURL(site['plone.site_logo'])
36
+ : LogoImage
37
+ }
32
38
  alt={intl.formatMessage(messages.plonesite)}
33
39
  title={intl.formatMessage(messages.plonesite)}
34
40
  />
@@ -6,7 +6,9 @@ import cx from 'classnames';
6
6
 
7
7
  import { CSSTransition } from 'react-transition-group';
8
8
 
9
+ import config from '@plone/volto/registry';
9
10
  import { Icon } from '@plone/volto/components';
11
+ import { toBackendLang } from '@plone/volto/helpers';
10
12
  import arrowRightSVG from '@plone/volto/icons/right-key.svg';
11
13
  import arrowLeftSVG from '@plone/volto/icons/left-key.svg';
12
14
  import { MobileToolsFooter } from './MobileToolsFooter';
@@ -38,6 +40,7 @@ const MobileNavigation = (props) => {
38
40
  tertiaryMenuOpened,
39
41
  isTertiaryMobileMenuOpen,
40
42
  } = menuState;
43
+ const { settings } = config;
41
44
  const intl = useIntl();
42
45
  const menus = React.useRef(null);
43
46
  const currentLang = useSelector((state) => state.intl.locale);
@@ -163,7 +166,14 @@ const MobileNavigation = (props) => {
163
166
  <div className="menu-drawer">
164
167
  <ul className="sections">
165
168
  <li className="header">
166
- <Link to={`/${currentLang}`} onClick={closeMenus}>
169
+ <Link
170
+ to={
171
+ settings.isMultilingual
172
+ ? `/${toBackendLang(currentLang)}`
173
+ : '/'
174
+ }
175
+ onClick={closeMenus}
176
+ >
167
177
  <FormattedMessage id="Home" defaultMessage="Home" />
168
178
  </Link>
169
179
  </li>
@@ -51,6 +51,19 @@
51
51
  }
52
52
  }
53
53
 
54
+ // Slider
55
+ #page-document .blocks-group-wrapper.grey:has(.block.slider:first-child) {
56
+ padding-top: 0;
57
+ padding-bottom: 0px; // Adjust for the padding from the slider itself
58
+ }
59
+
60
+ #page-document .blocks-group-wrapper.grey .block.slider,
61
+ .block-editor-slider.has--backgroundColor--grey {
62
+ .slider-dot:not(.slider-dot--selected)::after {
63
+ background: #fff;
64
+ }
65
+ }
66
+
54
67
  // Edit mode adjustments
55
68
  .block-editor-gridBlock.has--backgroundColor--grey .block h2.headline {
56
69
  padding-top: $spacing-xlarge;
@@ -0,0 +1,3 @@
1
+ .blocks-chooser .ui.form .searchbox.field {
2
+ height: unset !important;
3
+ }
@@ -3,6 +3,8 @@
3
3
  #page-sitemap {
4
4
  h1 {
5
5
  @include page-title();
6
+ @include vertical-space-h1();
7
+ @include word-break();
6
8
  }
7
9
 
8
10
  ul {
@@ -1,5 +1,5 @@
1
1
  // Listing Block
2
- #main .block.listing,
2
+ .block.listing,
3
3
  .column > .block.listing,
4
4
  .block.search,
5
5
  .block-editor-search {
@@ -1,8 +1,4 @@
1
1
  // Slider Block
2
- :root {
3
- --slider-block-edit-width-adjustment: 40px;
4
- }
5
-
6
2
  $sliderImagesAspectRatio: var(--slider-images-aspect-ratio, 16/9);
7
3
 
8
4
  .block.slider {
@@ -11,84 +7,33 @@ $sliderImagesAspectRatio: var(--slider-images-aspect-ratio, 16/9);
11
7
  padding-bottom: 0;
12
8
  }
13
9
 
14
- .highlight-image-wrapper img {
15
- // Override Volto's Image Component inline style aspect ratio.
16
- aspect-ratio: $sliderImagesAspectRatio !important;
10
+ .slider-viewport {
11
+ margin-bottom: 0;
17
12
  }
18
13
 
19
- .teaser-item,
20
- .grid-teaser-item {
21
- flex-direction: column;
22
- }
23
- .teaser-item {
24
- padding-bottom: $spacing-xlarge;
14
+ .slider-dots {
15
+ padding-bottom: 40px;
25
16
  }
26
17
 
27
- .slide-wrapper:not(.empty-slide) {
28
- padding-bottom: $spacing-xlarge;
29
- }
18
+ .highlight-image-wrapper {
19
+ display: flex; // Small gap was appearing between the wrapper and the image (??)
30
20
 
31
- .slick-arrow {
32
- width: 50px;
33
- // Equal to the space we give at the bottom to place the buttons
34
- height: calc(100% - $spacing-xlarge);
35
- background-color: rgba(0, 0, 0, 0.15);
36
- color: $white;
37
- // border: 2px solid red;
38
- opacity: 0;
39
- transition: opacity 0.2s ease-in;
40
- &:hover {
41
- opacity: 1;
21
+ img {
22
+ // Override Volto's Image Component inline style aspect ratio.
23
+ aspect-ratio: $sliderImagesAspectRatio !important;
42
24
  }
43
25
  }
44
26
 
45
- .slick-next,
46
- .slick-prev {
47
- top: initial;
48
- }
49
-
50
- .slick-next {
51
- right: 0;
52
- // Equal to the space we give at the bottom to place the buttons
53
- bottom: $spacing-xlarge;
54
- @media only screen and (max-width: $computer-width) {
55
- display: none !important;
56
- }
27
+ .teaser-item,
28
+ .grid-teaser-item {
29
+ flex-direction: column;
57
30
  }
58
-
59
- .slick-prev {
60
- z-index: 9;
61
- left: 0;
62
- @media only screen and (max-width: $computer-width) {
63
- display: none !important;
64
- }
31
+ .teaser-item {
32
+ padding-bottom: $spacing-medium;
65
33
  }
66
34
 
67
- .slick-dots {
68
- bottom: 34px;
69
- line-height: 0;
70
-
71
- li,
72
- button {
73
- width: 46px;
74
- height: 6px;
75
- padding: 0;
76
- background-color: $secondary-grey;
77
- }
78
-
79
- li.slick-active button {
80
- background-color: $black;
81
- }
82
-
83
- li {
84
- margin-right: 13px;
85
- margin-left: 0;
86
- }
87
-
88
- button:before {
89
- display: none;
90
- content: '';
91
- }
35
+ .slide-wrapper:not(.empty-slide) {
36
+ padding-bottom: $spacing-xlarge;
92
37
  }
93
38
 
94
39
  .teaser-item.top {
@@ -31,6 +31,7 @@
31
31
  @import 'blocks/toc';
32
32
  @import 'blocks/table';
33
33
  @import 'blocks/maps';
34
+ @import 'blocks-chooser';
34
35
 
35
36
  @import 'temp';
36
37