Skip to content

Commit 027bdf9

Browse files
committed
fixup! 🏗️(frontend) Footer configurable
1 parent 19516f4 commit 027bdf9

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

docs/theming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ THEME_CUSTOMIZATION_FILE_PATH=<path>
4444

4545
### Example of JSON
4646

47-
The json must follow some rules: https://github.com/suitenumerique/docs/blob/main/src/backend/impress/configuration/theme/default.json
47+
The json must follow some rules: https://github.com/suitenumerique/docs/blob/main/src/helm/env.d/dev/configuration/theme/demo.json
4848

4949
`footer.default` is the fallback if the language is not supported.
5050

src/frontend/apps/impress/src/features/footer/Footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const BlueStripe = styled.div`
2222
export const Footer = () => {
2323
const { data: config } = useConfig();
2424
const footerJson = config?.theme_customization?.footer;
25-
const { i18n } = useTranslation();
25+
const { i18n, t } = useTranslation();
2626
const [legalLinks, setLegalLinks] = useState<Link[]>();
2727
const [externalLinks, setExternalLinks] = useState<Link[]>();
2828
const [bottomInformation, setBottomInformation] =
@@ -82,7 +82,7 @@ export const Footer = () => {
8282
<Image
8383
priority
8484
src={logo.src}
85-
alt={logo?.alt || 'Logo'}
85+
alt={logo?.alt || t('Logo')}
8686
width={0}
8787
height={0}
8888
style={{ width: logo?.width || 'auto', height: 'auto' }}

src/helm/env.d/dev/configuration/theme/demo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"footer": {
33
"default": {
4+
"logo": {
5+
"src": "/assets/icon-docs.svg",
6+
"width": "54px",
7+
"alt": "Docs Logo",
8+
"withTitle": true
9+
},
410
"externalLinks": [
511
{
612
"label": "Github",

0 commit comments

Comments
 (0)