File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ const config: Config = {
212212 ] ,
213213 } ,
214214 ] ,
215- copyright : `© T-Systems International GmbH ${ new Date ( ) . getFullYear ( ) } (` + process . env . REACT_APP_VERSION + `) `,
215+ copyright : `© T-Systems International GmbH ${ new Date ( ) . getFullYear ( ) } ` ,
216216 } ,
217217 prism : {
218218 additionalLanguages : [ 'powershell' , 'bash' ] ,
@@ -262,7 +262,7 @@ const config: Config = {
262262 } satisfies Preset . ThemeConfig ,
263263
264264 customFields : {
265- version : `(v` + process . env . REACT_APP_VERSION + `)` ,
265+ version : process . env . REACT_APP_VERSION ,
266266 } ,
267267
268268 plugins : [
Original file line number Diff line number Diff line change 11import type { Props } from '@theme/Footer/Copyright' ;
2+ import useDocusaurusContext from "@docusaurus/useDocusaurusContext" ;
23
34export default function FooterCopyright ( { copyright } : Props ) : JSX . Element {
5+ const { siteConfig } = useDocusaurusContext ( ) ;
6+ const version : string = siteConfig . customFields . version as string ;
7+
8+ let color : string = "orange"
9+ if ( version . startsWith ( "v" ) ) {
10+ color = "cyan"
11+ } else if ( version . includes ( "-development" ) ) {
12+ color = "violet"
13+ }
14+
415 return (
5- < span slot = "notice" > { copyright } </ span >
16+ < >
17+ < span slot = "notice" > { copyright } < scale-tag size = "small" style = { { margin : '0 0 0 8px' } } color = { color } type = "strong" > { version } </ scale-tag > </ span >
18+ </ >
619 ) ;
720}
Original file line number Diff line number Diff line change @@ -5,18 +5,13 @@ import FooterLinks from '@theme/Footer/Links';
55import FooterLogo from '@theme/Footer/Logo' ;
66import FooterCopyright from '@theme/Footer/Copyright' ;
77import FooterLayout from '@theme/Footer/Layout' ;
8- // import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; // get metadata about page
98
109function Footer ( ) : JSX . Element | null {
11- // const context = useDocusaurusContext();
12- // const { siteConfig = {} } = context;
13-
1410 const { footer} = useThemeConfig ( ) ;
1511 if ( ! footer ) {
1612 return null ;
1713 }
1814 const { copyright, links, logo, style} = footer ;
19- // const {version} = siteConfig.customFields["version"];
2015 return (
2116 < FooterLayout
2217 style = { style }
You can’t perform that action at this time.
0 commit comments