Skip to content

Commit 64b3b29

Browse files
committed
🏗️(frontend) Footer configurable
The content of the footer is now configurable via a JSON file. The JSON file is loaded from the FRONTEND_PATH_JSON_FOOTER environment variable. It is probably not the final solution, but it is a first step to make the footer configurable. In the future, we will probably have a backend service to manage the footer content.
1 parent 5d0174c commit 64b3b29

File tree

10 files changed

+436
-253
lines changed

10 files changed

+436
-253
lines changed

CHANGELOG.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ and this project adheres to
1111
## Added
1212

1313
- ✨(back) allow theme customnization using a configuration file #948
14-
- ✨ Add a custom callout block to the editor #892
14+
-(frontend) Add a custom callout block to the editor #892
1515
- 🚩(frontend) version MIT only #911
1616
- ✨(backend) integrate maleware_detection from django-lasuite #936
17+
- 🏗️(frontend) Footer configurable #959
1718

1819
## Changed
1920

20-
- 📝(frontend) Update documentation
21-
- ✅(frontend) Improve tests coverage
21+
- 📝(frontend) Update documentation #949
22+
- ✅(frontend) Improve tests coverage #949
2223

2324
### Removed
2425

25-
- 🔥(back) remove footer endpoint
26+
- 🔥(back) remove footer endpoint #948
2627

2728
## [3.2.1] - 2025-05-06
2829

docs/assets/footer-configurable.png

19.4 KB
Loading

docs/theming.md

+23
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,27 @@ body {
3030

3131
Then, set the `FRONTEND_CSS_URL` environment variable to the URL of your custom CSS file. Once you've done this, our application will load your custom CSS file and apply the styles, changing the background color to the custom color you specified.
3232

33+
----
34+
35+
# **Footer Configuration** 📝
36+
37+
The footer is configurable from the theme customization file.
38+
39+
### Settings 🔧
40+
41+
```shellscript
42+
THEME_CUSTOMIZATION_FILE_PATH=<path>
43+
```
44+
45+
### Example of JSON
46+
47+
The json must follow some rules: https://github.com/suitenumerique/docs/blob/main/src/backend/impress/configuration/theme/default.json
48+
49+
`footer.default` is the fallback if the language is not supported.
50+
51+
---
52+
Below is a visual example of a configured footer ⬇️:
53+
54+
![Footer Configuration Example](./assets/footer-configurable.png)
55+
3356

Original file line numberDiff line numberDiff line change
@@ -1,124 +1,129 @@
11
{
2-
"footer": {
3-
"default": {
4-
"externalLinks": [
5-
{
6-
"label": "Github",
7-
"href": "https://github.com/suitenumerique/docs/"
8-
},
9-
{
10-
"label": "DINUM",
11-
"href": "https://www.numerique.gouv.fr/dinum/"
12-
},
13-
{
14-
"label": "ZenDiS",
15-
"href": "https://zendis.de/"
16-
},
17-
{
18-
"label": "BlockNote.js",
19-
"href": "https://www.blocknotejs.org/"
20-
}
21-
],
22-
"bottomInformation": {
23-
"label": "Unless otherwise stated, all content on this site is under",
24-
"link": {
25-
"label": "licence etalab-2.0",
26-
"href": "https://github.com/etalab/licence-ouverte/blob/master/LO.md"
27-
}
28-
}
2+
"footer": {
3+
"default": {
4+
"logo": {
5+
"src": "/assets/icon-docs.svg",
6+
"width": "54px",
7+
"alt": "Docs Logo",
8+
"withTitle": true
299
},
30-
"en": {
31-
"legalLinks": [
32-
{
33-
"label": "Legal Notice",
34-
"href": "#"
35-
},
36-
{
37-
"label": "Personal data and cookies",
38-
"href": "#"
39-
},
40-
{
41-
"label": "Accessibility",
42-
"href": "#"
43-
}
44-
],
45-
"bottomInformation": {
46-
"label": "Unless otherwise stated, all content on this site is under",
47-
"link": {
48-
"label": "licence MIT",
49-
"href": "https://github.com/suitenumerique/docs/blob/main/LICENSE"
50-
}
10+
"externalLinks": [
11+
{
12+
"label": "Github",
13+
"href": "https://github.com/suitenumerique/docs/"
14+
},
15+
{
16+
"label": "DINUM",
17+
"href": "https://www.numerique.gouv.fr/dinum/"
18+
},
19+
{
20+
"label": "ZenDiS",
21+
"href": "https://zendis.de/"
22+
},
23+
{
24+
"label": "BlockNote.js",
25+
"href": "https://www.blocknotejs.org/"
5126
}
52-
},
53-
"fr": {
54-
"legalLinks": [
55-
{
56-
"label": "Mentions légales",
57-
"href": "#"
58-
},
59-
{
60-
"label": "Données personnelles et cookies",
61-
"href": "#"
62-
},
63-
{
64-
"label": "Accessibilité",
65-
"href": "#"
66-
}
67-
],
68-
"bottomInformation": {
69-
"label": "Sauf mention contraire, tout le contenu de ce site est sous",
70-
"link": {
71-
"label": "licence MIT",
72-
"href": "https://github.com/suitenumerique/docs/blob/main/LICENSE"
73-
}
27+
],
28+
"bottomInformation": {
29+
"label": "Unless otherwise stated, all content on this site is under",
30+
"link": {
31+
"label": "licence etalab-2.0",
32+
"href": "https://github.com/etalab/licence-ouverte/blob/master/LO.md"
7433
}
75-
},
76-
"de": {
77-
"legalLinks": [
78-
{
79-
"label": "Impressum",
80-
"href": "#"
81-
},
82-
{
83-
"label": "Personenbezogene Daten und Cookies",
84-
"href": "#"
85-
},
86-
{
87-
"label": "Barrierefreiheit",
88-
"href": "#"
89-
}
90-
],
91-
"bottomInformation": {
92-
"label": "Sofern nicht anders angegeben, steht der gesamte Inhalt dieser Website unter",
93-
"link": {
94-
"label": "licence MIT",
95-
"href": "https://github.com/suitenumerique/docs/blob/main/LICENSE"
96-
}
34+
}
35+
},
36+
"en": {
37+
"legalLinks": [
38+
{
39+
"label": "Legal Notice",
40+
"href": "#"
41+
},
42+
{
43+
"label": "Personal data and cookies",
44+
"href": "#"
45+
},
46+
{
47+
"label": "Accessibility",
48+
"href": "#"
9749
}
98-
},
99-
"nl": {
100-
"legalLinks": [
101-
{
102-
"label": "Wettelijke bepalingen",
103-
"href": "#"
104-
},
105-
{
106-
"label": "Persoonlijke gegevens en cookies",
107-
"href": "#"
108-
},
109-
{
110-
"label": "Toegankelijkheid",
111-
"href": "#"
112-
}
113-
],
114-
"bottomInformation": {
115-
"label": "Tenzij anders vermeld, is alle inhoud van deze site ondergebracht onder",
116-
"link": {
117-
"label": "licence MIT",
118-
"href": "https://github.com/suitenumerique/docs/blob/main/LICENSE"
119-
}
50+
],
51+
"bottomInformation": {
52+
"label": "Unless otherwise stated, all content on this site is under",
53+
"link": {
54+
"label": "licence MIT",
55+
"href": "https://github.com/suitenumerique/docs/blob/main/LICENSE"
56+
}
57+
}
58+
},
59+
"fr": {
60+
"legalLinks": [
61+
{
62+
"label": "Mentions légales",
63+
"href": "#"
64+
},
65+
{
66+
"label": "Données personnelles et cookies",
67+
"href": "#"
68+
},
69+
{
70+
"label": "Accessibilité",
71+
"href": "#"
72+
}
73+
],
74+
"bottomInformation": {
75+
"label": "Sauf mention contraire, tout le contenu de ce site est sous",
76+
"link": {
77+
"label": "licence MIT",
78+
"href": "https://github.com/suitenumerique/docs/blob/main/LICENSE"
79+
}
80+
}
81+
},
82+
"de": {
83+
"legalLinks": [
84+
{
85+
"label": "Impressum",
86+
"href": "#"
87+
},
88+
{
89+
"label": "Personenbezogene Daten und Cookies",
90+
"href": "#"
91+
},
92+
{
93+
"label": "Barrierefreiheit",
94+
"href": "#"
95+
}
96+
],
97+
"bottomInformation": {
98+
"label": "Sofern nicht anders angegeben, steht der gesamte Inhalt dieser Website unter",
99+
"link": {
100+
"label": "licence MIT",
101+
"href": "https://github.com/suitenumerique/docs/blob/main/LICENSE"
102+
}
103+
}
104+
},
105+
"nl": {
106+
"legalLinks": [
107+
{
108+
"label": "Wettelijke bepalingen",
109+
"href": "#"
110+
},
111+
{
112+
"label": "Persoonlijke gegevens en cookies",
113+
"href": "#"
114+
},
115+
{
116+
"label": "Toegankelijkheid",
117+
"href": "#"
118+
}
119+
],
120+
"bottomInformation": {
121+
"label": "Tenzij anders vermeld, is alle inhoud van deze site ondergebracht onder",
122+
"link": {
123+
"label": "licence MIT",
124+
"href": "https://github.com/suitenumerique/docs/blob/main/LICENSE"
120125
}
121126
}
122127
}
123128
}
124-
129+
}

0 commit comments

Comments
 (0)