diff --git a/docs/theming.md b/docs/theming.md index ab30bb50..457bbf12 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -32,6 +32,24 @@ Then, set the `FRONTEND_CSS_URL` environment variable to the URL of your custom ---- +# **Your logo** 📝 + +You can add your own logo in the header from the theme customization file. + +### Settings 🔧 + +```shellscript +THEME_CUSTOMIZATION_FILE_PATH= +``` + +### Example of JSON + +You can activate it with the `header.logo` configuration: https://github.com/suitenumerique/docs/blob/main/src/helm/env.d/dev/configuration/theme/demo.json + +This configuration is optional. If not set, the default logo will be used. + +---- + # **Footer Configuration** 📝 The footer is configurable from the theme customization file. diff --git a/src/backend/impress/configuration/theme/default.json b/src/backend/impress/configuration/theme/default.json index bf141f4e..9f1b718c 100644 --- a/src/backend/impress/configuration/theme/default.json +++ b/src/backend/impress/configuration/theme/default.json @@ -125,12 +125,5 @@ } } } - }, - "header": { - "logo": { - "src": "/assets/icon-docs.svg", - "width": "32px", - "alt": "Docs" - } } } diff --git a/src/frontend/apps/impress/src/core/config/api/useConfig.tsx b/src/frontend/apps/impress/src/core/config/api/useConfig.tsx index 24452f3f..990da403 100644 --- a/src/frontend/apps/impress/src/core/config/api/useConfig.tsx +++ b/src/frontend/apps/impress/src/core/config/api/useConfig.tsx @@ -4,7 +4,7 @@ import { Resource } from 'i18next'; import { APIError, errorCauses, fetchAPI } from '@/api'; import { Theme } from '@/cunningham/'; import { FooterType } from '@/features/footer'; -import { HeaderType } from '@/features/header/types'; +import { HeaderType } from '@/features/header'; import { PostHogConf } from '@/services'; interface ThemeCustomization { diff --git a/src/frontend/apps/impress/src/features/header/components/Header.tsx b/src/frontend/apps/impress/src/features/header/components/Header.tsx index fa00c013..d67aee2d 100644 --- a/src/frontend/apps/impress/src/features/header/components/Header.tsx +++ b/src/frontend/apps/impress/src/features/header/components/Header.tsx @@ -23,8 +23,6 @@ export const Header = () => { const logo = config?.theme_customization?.header?.logo; - const styleWidth = logo?.width || '32px'; - return ( { $height="fit-content" $margin={{ top: 'auto' }} > - {logo?.src && ( - {logo?.alt - )} + {logo?.alt