Skip to content
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

docs: Moving to use Announcement Banner for the Support Ukraine Initiative #12537

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
8 changes: 8 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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