Skip to content

Commit

Permalink
docs: Moving to use Announcement Banner for the Support Ukraine Initi…
Browse files Browse the repository at this point in the history
…ative (#12537)
  • Loading branch information
dmitryvinn committed Mar 2, 2022
1 parent 3fbf2da commit 3f3aa80
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 16 deletions.
8 changes: 8 additions & 0 deletions website/docusaurus.config.js
Expand Up @@ -145,6 +145,14 @@ module.exports = {
],
],
themeConfig: {
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,
},
navbar: {
title: 'Jest',
items: [
Expand Down
9 changes: 0 additions & 9 deletions website/src/pages/index.js
Expand Up @@ -301,15 +301,6 @@ class Index extends React.Component {
{siteConfig.title} {siteConfig.titleDelimiter} {siteConfig.tagline}
</title>
</Head>
<Container background="light">
<div className={styles.banner}>
Support Ukraine 🇺🇦{' '}
<Link to="https://opensource.facebook.com/support-ukraine">
Help Provide Humanitarian Aid to Ukraine
</Link>
.
</div>
</Container>
<HeroInteractive config={siteConfig} />
<div className="mainContainerV1" style={{padding: 0}}>
<Container
Expand Down
44 changes: 37 additions & 7 deletions website/src/pages/index.module.css
Expand Up @@ -5,15 +5,45 @@
* LICENSE file in the root directory of this source tree.
*/

/* Social Banner */
/* Announcement banner */

.banner {
font-weight: bold;
: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;
padding: 20px;
max-width: 768px;
margin: 0 auto;
text-align: center;
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;
}
}

/* Twitter Follow Button */
Expand Down

0 comments on commit 3f3aa80

Please sign in to comment.