mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
feat(theme-classic): themeConfig navbar/footer logos accept className/style + update Meta Open-Source Logo (#7643)
This commit is contained in:
parent
a989a1d17e
commit
42ab07f62f
14 changed files with 102 additions and 83 deletions
|
@ -334,8 +334,9 @@ module.exports = {
|
|||
// ... other links
|
||||
],
|
||||
logo: {
|
||||
alt: 'Facebook Open Source Logo',
|
||||
src: 'https://docusaurus.io/img/oss_logo.png',
|
||||
alt: 'Meta Open Source Logo',
|
||||
src: 'img/meta_oss_logo.png',
|
||||
href: 'https://opensource.fb.com',
|
||||
width: 160,
|
||||
height: 51,
|
||||
},
|
||||
|
|
|
@ -199,6 +199,8 @@ Accepted fields:
|
|||
| `width` | <code>string \| number</code> | `undefined` | Specifies the `width` attribute. |
|
||||
| `height` | <code>string \| number</code> | `undefined` | Specifies the `height` attribute. |
|
||||
| `target` | `string` | Calculated based on `href` (external links will open in a new tab, all others in the current one). | The `target` attribute of the link; controls whether the link is opened in a new tab, the current one, or otherwise. |
|
||||
| `className` | `string` | `undefined` | CSS class applied to the image. |
|
||||
| `style` | `object` | `undefined` | CSS inline style object. React/JSX flavor, using camelCase properties. |
|
||||
|
||||
```mdx-code-block
|
||||
</APITable>
|
||||
|
@ -220,6 +222,8 @@ module.exports = {
|
|||
target: '_self',
|
||||
width: 32,
|
||||
height: 32,
|
||||
className: 'custom-navbar-logo-class',
|
||||
style: {border: 'solid red'},
|
||||
},
|
||||
// highlight-end
|
||||
},
|
||||
|
@ -858,9 +862,9 @@ module.exports = {
|
|||
// highlight-start
|
||||
footer: {
|
||||
logo: {
|
||||
alt: 'Facebook Open Source Logo',
|
||||
src: 'img/oss_logo.png',
|
||||
href: 'https://opensource.facebook.com',
|
||||
alt: 'Meta Open Source Logo',
|
||||
src: 'img/meta_oss_logo.png',
|
||||
href: 'https://opensource.fb.com',
|
||||
width: 160,
|
||||
height: 51,
|
||||
},
|
||||
|
|
|
@ -223,8 +223,8 @@ module.exports = {
|
|||
themeConfig: {
|
||||
footer: {
|
||||
logo: {
|
||||
alt: 'Facebook Open Source Logo',
|
||||
src: 'https://docusaurus.io/img/oss_logo.png',
|
||||
alt: 'Meta Open Source Logo',
|
||||
src: '/img/meta_oss_logo.png',
|
||||
href: 'https://opensource.facebook.com/',
|
||||
},
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc.`, // You can also put own HTML here.
|
||||
|
@ -507,8 +507,8 @@ module.exports = {
|
|||
themeConfig: {
|
||||
footer: {
|
||||
logo: {
|
||||
alt: 'Facebook Open Source Logo',
|
||||
src: 'img/oss_logo.png',
|
||||
alt: 'Meta Open Source Logo',
|
||||
src: '/img/meta_oss_logo.png',
|
||||
href: 'https://opensource.facebook.com',
|
||||
},
|
||||
},
|
||||
|
|
|
@ -57,14 +57,5 @@ module.exports = {
|
|||
srcDark: 'img/docusaurus_keytar.svg',
|
||||
},
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
logo: {
|
||||
alt: 'Facebook Open Source Logo',
|
||||
src: 'img/oss_logo.png',
|
||||
href: 'https://opensource.facebook.com',
|
||||
},
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc. Built with Docusaurus.`,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -589,13 +589,11 @@ const config = {
|
|||
},
|
||||
],
|
||||
logo: {
|
||||
alt: 'Facebook Open Source Logo',
|
||||
src: 'img/oss_logo.png',
|
||||
width: 160,
|
||||
height: 51,
|
||||
href: 'https://opensource.facebook.com',
|
||||
alt: 'Meta Open Source Logo',
|
||||
src: '/img/meta_opensource_logo_negative.svg',
|
||||
href: 'https://opensource.fb.com',
|
||||
},
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc. Built with Docusaurus.`,
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Meta Platforms, Inc. Built with Docusaurus.`,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
|
1
website/static/img/meta_opensource_logo.svg
Normal file
1
website/static/img/meta_opensource_logo.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 14 KiB |
1
website/static/img/meta_opensource_logo_negative.svg
Normal file
1
website/static/img/meta_opensource_logo_negative.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue