feat: Update Docusaurus configuration and theme styles to support Light Theme

- Updated color mode settings to respect user preferences and changed default mode.
- Switched logo source based on theme (light/dark) in the home page component.
- Enhanced banner section styles with CSS variables for better theme support.
- Copied logo asset for dark theme.
- Introduced CSS variables for light and dark theme backgrounds and gradients.

Signed-off-by: Gervais, Raymond <raymond.gervais@rbc.com>
This commit is contained in:
Gervais, Raymond
2025-05-06 12:12:48 -04:00
parent 5cc0ca32e1
commit e01b9cadbe
6 changed files with 62 additions and 36 deletions
+25 -24
View File
@@ -101,23 +101,23 @@ const config: Config = {
sidebarPath: 'sidebars.ts',
...(useVersionedDocs
? {
includeCurrentVersion: true,
lastVersion: 'stable',
versions: {
stable: {
label: 'Stable',
path: '/',
banner: 'none',
badge: false,
},
current: {
label: 'Next',
path: '/next',
banner: 'unreleased',
badge: true,
},
includeCurrentVersion: true,
lastVersion: 'stable',
versions: {
stable: {
label: 'Stable',
path: '/',
banner: 'none',
badge: false,
},
}
current: {
label: 'Next',
path: '/next',
banner: 'unreleased',
badge: true,
},
},
}
: undefined),
docItemComponent: '@theme/ApiItem',
},
@@ -343,13 +343,14 @@ const config: Config = {
],
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
disableSwitch: false,
respectPrefersColorScheme: true
},
navbar: {
logo: {
alt: 'Backstage Software Catalog and Developer Platform',
src: 'img/logo.svg',
src: 'img/logo-black.svg',
srcDark: 'img/logo.svg'
},
items: [
{
@@ -394,11 +395,11 @@ const config: Config = {
},
...(useVersionedDocs
? [
{
type: 'docsVersionDropdown',
position: 'right' as const,
},
]
{
type: 'docsVersionDropdown',
position: 'right' as const,
},
]
: []),
],
},