Skip to content

docs: add homepage banner in support of Ukraine #12113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docusaurus/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ const siteConfig = {
],
themeConfig: {
image: 'img/logo-og.png',
announcementBar: {
id: 'support_ukraine',
content:
'Support Ukraine 🇺🇦 <a target="_blank" rel="noopener noreferrer" \
href="https://opensource.facebook.com/support-ukraine"> Help Provide Humanitarian Aid to Ukraine</a>.',
backgroundColor: '#20232a',
textColor: '#fff',
isCloseable: false,
},
algolia: {
appId: 'create-react-app',
apiKey: '3be60f4f8ffc24c75da84857d6323791',
indexName: 'create-react-app',
},
Expand Down
42 changes: 42 additions & 0 deletions docusaurus/website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,45 @@
flex-shrink: 0;
max-width: 100%;
}


/* Announcement banner */

:root {
--docusaurus-announcement-bar-height: auto !important;
}

div[class^="announcementBar"][role="banner"] {
border-bottom-color: var(--deepdark);
}

div[class^="announcementBarContent"] {
line-height: 40px;
font-size: 20px;
font-weight: bold;
padding: 8px 30px;
}

div[class^="announcementBarContent"] a {
text-decoration: underline;
display: inline-block;
color: var(--ifm-color-primary) !important;
}

div[class^="announcementBarContent"] a:hover {
color: var(--brand) !important;
}

@media only screen and (max-width: 768px) {
.announcement {
font-size: 18px;
}
}

@media only screen and (max-width: 500px) {
.announcement {
font-size: 15px;
line-height: 22px;
padding: 6px 30px;
}
}