@kitconcept/volto-light-theme 6.0.1 → 6.1.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.draft CHANGED
@@ -1,7 +1,8 @@
1
- ## 6.0.1 (2025-05-15)
1
+ ## 6.1.0 (2025-05-20)
2
2
 
3
- ### Bugfix
3
+ ### Feature
4
4
 
5
- - Removed background color specification in the whole footer. We only want it in some areas of it, and depending if some sections are present or not. @sneridagh
5
+ - Improve Footer color handling. @danalvrz [#551](https://github.com/kitconcept/volto-light-theme/pull/551)
6
+ - Added support for a customizable colophon footer. @sneridagh
6
7
 
7
8
 
package/CHANGELOG.md CHANGED
@@ -8,6 +8,13 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 6.1.0 (2025-05-20)
12
+
13
+ ### Feature
14
+
15
+ - Improve Footer color handling. @danalvrz [#551](https://github.com/kitconcept/volto-light-theme/pull/551)
16
+ - Added support for a customizable colophon footer. @sneridagh
17
+
11
18
  ## 6.0.1 (2025-05-15)
12
19
 
13
20
  ### Bugfix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitconcept/volto-light-theme",
3
- "version": "6.0.1",
3
+ "version": "6.1.0",
4
4
  "description": "Volto Light Theme by kitconcept",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -33,7 +33,7 @@
33
33
  "@types/react": "^18.3.12",
34
34
  "@types/react-dom": "^18.3.1",
35
35
  "release-it": "^17.7.0",
36
- "@plone/types": "1.4.4"
36
+ "@plone/types": "1.4.5"
37
37
  },
38
38
  "dependencies": {
39
39
  "@dnd-kit/core": "6.0.8",
@@ -20,7 +20,9 @@ const Footer = () => {
20
20
 
21
21
  return (
22
22
  <footer id="footer">
23
- <SlotRenderer name="preFooter" content={content} />
23
+ <div className="pre-footer">
24
+ <SlotRenderer name="preFooter" content={content} />
25
+ </div>
24
26
  <SlotRenderer name="footer" content={content} />
25
27
  <Container className="post-footer">
26
28
  <SlotRenderer name="postFooter" content={content} />
@@ -3,7 +3,7 @@ import Copyright from './Copyright';
3
3
  import Logo from '../../Logo/Logo';
4
4
  import type { Content } from '@plone/types';
5
5
  import { useLiveData } from '@kitconcept/volto-light-theme/helpers/useLiveData';
6
- import type { SiteHeaderSettings } from '../../../types';
6
+ import type { SiteFooterSettings, SiteHeaderSettings } from '../../../types';
7
7
 
8
8
  const Colophon = ({ content }: { content: Content }) => {
9
9
  const logo = useLiveData<SiteHeaderSettings['logo']>(
@@ -12,11 +12,23 @@ const Colophon = ({ content }: { content: Content }) => {
12
12
  'logo',
13
13
  );
14
14
 
15
+ const footer_colophon_text = useLiveData<
16
+ SiteFooterSettings['footer_colophon_text']
17
+ >(content, 'voltolighttheme.footer', 'footer_colophon_text');
18
+
15
19
  return (
16
20
  <Container className="colophon">
17
- <div className="powered-by">Powered by Plone and Volto Light Theme</div>
18
- <Copyright />
19
- {!logo && <Logo />}
21
+ {footer_colophon_text ? (
22
+ <>{footer_colophon_text}</>
23
+ ) : (
24
+ <>
25
+ <div className="powered-by">
26
+ Powered by Plone and Volto Light Theme
27
+ </div>
28
+ <Copyright />
29
+ {!logo && <Logo />}
30
+ </>
31
+ )}
20
32
  </Container>
21
33
  );
22
34
  };
@@ -34,7 +34,7 @@ const CoreFooter = ({ content }: { content: Content }) => {
34
34
  >(content, 'kitconcept.footer', 'footer_column_right');
35
35
 
36
36
  return (
37
- <Container className="footer">
37
+ <Container className="main-footer">
38
38
  <Container className="default">
39
39
  <div className="footer-grid">
40
40
  <div className="address-column">
@@ -1,21 +1,41 @@
1
1
  #footer {
2
- padding-top: $footer-vertical-spacing-top;
2
+ margin-top: 1rem;
3
+
4
+ background: var(--footer-background);
5
+ color: var(--footer-foreground, $black);
3
6
  text-align: center;
4
7
 
8
+ &:has(.main-footer) {
9
+ --footer-background: var(--primary-color, $white);
10
+ --footer-foreground: var(--primary-foreground-color, $black);
11
+ }
12
+
5
13
  .container {
6
14
  padding: 0 1rem;
7
15
  }
8
16
 
9
- .post-footer {
10
- padding: $spacing-xlarge 2rem;
11
- background: var(--footer-background);
17
+ & > :first-child:not(:empty) {
18
+ padding-top: $footer-vertical-spacing-top;
19
+ }
20
+
21
+ .pre-footer {
22
+ &:has(.logos-container) {
23
+ --footer-background: var(--primary-color, $white);
24
+ --footer-foreground: var(--primary-foreground-color, $black);
25
+ }
26
+
27
+ background: var(--footer-background, $white);
12
28
  color: var(--footer-foreground, $black);
13
- font-size: 18px;
14
29
  }
15
30
 
16
- .footer {
31
+ .main-footer {
32
+ --footer-background: var(--secondary-color, $white);
33
+ --footer-foreground: var(--secondary-foreground-color, $black);
34
+
17
35
  padding: $spacing-xlarge 2rem;
36
+ background: var(--footer-background);
18
37
  color: var(--footer-foreground, $black);
38
+
19
39
  font-size: 18px;
20
40
 
21
41
  a {
@@ -56,6 +76,18 @@
56
76
  justify-content: center;
57
77
  }
58
78
  }
79
+ .address-column {
80
+ & > a:has(img) {
81
+ display: block;
82
+ max-width: 200px;
83
+
84
+ img {
85
+ max-width: 100%;
86
+ height: auto;
87
+ object-fit: contain;
88
+ }
89
+ }
90
+ }
59
91
 
60
92
  .logo {
61
93
  display: flex;
@@ -132,6 +164,13 @@
132
164
  }
133
165
  }
134
166
 
167
+ .post-footer {
168
+ padding: $spacing-xlarge 2rem;
169
+ background: var(--footer-background);
170
+ color: var(--footer-foreground, $black);
171
+ font-size: 18px;
172
+ }
173
+
135
174
  .follow-us-links-and-logo {
136
175
  display: flex;
137
176
  margin-bottom: 50px;
@@ -299,8 +338,9 @@
299
338
  }
300
339
  }
301
340
 
302
- .footer + .post-footer {
303
- background-color: transparent;
341
+ .main-footer + .post-footer {
342
+ background-color: var(--primary-color, $white);
343
+ color: var(--primary-foreground-color, $black);
304
344
  }
305
345
  }
306
346
 
package/src/types.d.ts CHANGED
@@ -73,6 +73,7 @@ export type SiteFooterSettings = {
73
73
  footer_column_right: Array<Link>;
74
74
  footer_logo: Image & { data?: string };
75
75
  footer_links: Array<Link>;
76
+ footer_colophon_text: string;
76
77
  };
77
78
 
78
79
  export type StickyMenuSettings = {