Skip to content

Commit fd8c5f7

Browse files
authored
docs: add homepage banner in support of Ukraine (#12113)
1 parent 428ddb6 commit fd8c5f7

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

docusaurus/website/docusaurus.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@ const siteConfig = {
3333
],
3434
themeConfig: {
3535
image: 'img/logo-og.png',
36+
announcementBar: {
37+
id: 'support_ukraine',
38+
content:
39+
'Support Ukraine 🇺🇦 <a target="_blank" rel="noopener noreferrer" \
40+
href="https://opensource.facebook.com/support-ukraine"> Help Provide Humanitarian Aid to Ukraine</a>.',
41+
backgroundColor: '#20232a',
42+
textColor: '#fff',
43+
isCloseable: false,
44+
},
3645
algolia: {
46+
appId: 'create-react-app',
3747
apiKey: '3be60f4f8ffc24c75da84857d6323791',
3848
indexName: 'create-react-app',
3949
},

docusaurus/website/src/css/custom.css

+42
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,45 @@
3131
flex-shrink: 0;
3232
max-width: 100%;
3333
}
34+
35+
36+
/* Announcement banner */
37+
38+
:root {
39+
--docusaurus-announcement-bar-height: auto !important;
40+
}
41+
42+
div[class^="announcementBar"][role="banner"] {
43+
border-bottom-color: var(--deepdark);
44+
}
45+
46+
div[class^="announcementBarContent"] {
47+
line-height: 40px;
48+
font-size: 20px;
49+
font-weight: bold;
50+
padding: 8px 30px;
51+
}
52+
53+
div[class^="announcementBarContent"] a {
54+
text-decoration: underline;
55+
display: inline-block;
56+
color: var(--ifm-color-primary) !important;
57+
}
58+
59+
div[class^="announcementBarContent"] a:hover {
60+
color: var(--brand) !important;
61+
}
62+
63+
@media only screen and (max-width: 768px) {
64+
.announcement {
65+
font-size: 18px;
66+
}
67+
}
68+
69+
@media only screen and (max-width: 500px) {
70+
.announcement {
71+
font-size: 15px;
72+
line-height: 22px;
73+
padding: 6px 30px;
74+
}
75+
}

0 commit comments

Comments
 (0)