mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-26 18:58:17 +00:00
Add a BLM banner
This commit is contained in:
@@ -15,14 +15,20 @@ import type {Node} from 'react';
|
||||
* This component wraps page content sections (eg header, footer, main).
|
||||
* It provides consistent margin and max width behavior.
|
||||
*/
|
||||
const Container = ({children}: {children: Node}) => (
|
||||
const Container = ({
|
||||
children,
|
||||
grayscale,
|
||||
}: {
|
||||
children: Node,
|
||||
grayscale: boolean,
|
||||
}) => (
|
||||
<div
|
||||
css={{
|
||||
paddingLeft: 20,
|
||||
paddingRight: 20,
|
||||
marginLeft: 'auto',
|
||||
marginRight: 'auto',
|
||||
|
||||
filter: grayscale ? 'grayscale(100%)' : '',
|
||||
[media.greaterThan('medium')]: {
|
||||
width: '90%',
|
||||
},
|
||||
|
||||
@@ -23,6 +23,7 @@ import ossLogoPng from 'images/oss_logo.png';
|
||||
const Footer = ({layoutHasSidebar = false}: {layoutHasSidebar: boolean}) => (
|
||||
<footer
|
||||
css={{
|
||||
filter: 'grayscale(100%)', // BLM
|
||||
backgroundColor: colors.darker,
|
||||
color: colors.white,
|
||||
paddingTop: 10,
|
||||
|
||||
@@ -34,6 +34,31 @@ const Header = ({location}: {location: Location}) => (
|
||||
},
|
||||
}}>
|
||||
<Container>
|
||||
<div
|
||||
css={{
|
||||
height: 60,
|
||||
fontSize: 20,
|
||||
padding: 20,
|
||||
textAlign: 'center',
|
||||
[media.between('small', 'large')]: {
|
||||
height: 60,
|
||||
},
|
||||
[media.lessThan('small')]: {
|
||||
height: 80,
|
||||
},
|
||||
}}>
|
||||
Black Lives Matter.{' '}
|
||||
<a
|
||||
style={{color: colors.brand}}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
rel="noreferrer"
|
||||
href="https://support.eji.org/give/153413/#!/donation/checkout">
|
||||
Support the Equal Justice Initiative.
|
||||
</a>
|
||||
</div>
|
||||
</Container>
|
||||
<Container grayscale={true}>
|
||||
<div
|
||||
css={{
|
||||
display: 'flex',
|
||||
|
||||
@@ -15,15 +15,15 @@ const MarkdownHeader = ({title}: {title: string}) => (
|
||||
css={{
|
||||
color: colors.dark,
|
||||
marginBottom: 0,
|
||||
marginTop: 40,
|
||||
marginTop: 100, // BLM
|
||||
...fonts.header,
|
||||
|
||||
[media.size('medium')]: {
|
||||
marginTop: 60,
|
||||
marginTop: 100, // BLM
|
||||
},
|
||||
|
||||
[media.greaterThan('large')]: {
|
||||
marginTop: 80,
|
||||
marginTop: 100, // BLM
|
||||
},
|
||||
}}>
|
||||
{title}
|
||||
|
||||
@@ -84,7 +84,11 @@ const MarkdownPage = ({
|
||||
<MarkdownHeader title={titlePrefix} />
|
||||
|
||||
{(date || hasAuthors) && (
|
||||
<div css={{marginTop: 15}}>
|
||||
<div
|
||||
css={{
|
||||
marginTop: 15,
|
||||
filter: 'grayscale(100%)', // BLM
|
||||
}}>
|
||||
{date}{' '}
|
||||
{hasAuthors && (
|
||||
<span>
|
||||
|
||||
@@ -13,7 +13,6 @@ html {
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
* {
|
||||
|
||||
@@ -53,7 +53,12 @@ class Home extends Component {
|
||||
title="React – A JavaScript library for building user interfaces"
|
||||
canonicalUrl={createCanonicalUrl('/')}
|
||||
/>
|
||||
<div css={{width: '100%'}}>
|
||||
<div
|
||||
css={{
|
||||
width: '100%',
|
||||
marginTop: 60, // BLM
|
||||
filter: 'grayscale(100%)', // BLM
|
||||
}}>
|
||||
<header
|
||||
css={{
|
||||
backgroundColor: colors.dark,
|
||||
|
||||
@@ -15,6 +15,8 @@ const NavigationFooter = ({next, prev, location}) => {
|
||||
return (
|
||||
<div
|
||||
css={{
|
||||
filter: 'grayscale(100%)', // BLM
|
||||
|
||||
background: colors.dark,
|
||||
color: colors.white,
|
||||
paddingTop: 50,
|
||||
|
||||
@@ -37,6 +37,8 @@ class Sidebar extends Component {
|
||||
direction="column"
|
||||
halign="stretch"
|
||||
css={{
|
||||
filter: 'grayscale(100%)', // BLM
|
||||
|
||||
width: '100%',
|
||||
paddingLeft: 20,
|
||||
position: 'relative',
|
||||
|
||||
@@ -132,6 +132,8 @@ const sharedStyles = {
|
||||
},
|
||||
},
|
||||
content: {
|
||||
filter: 'grayscale(100%)', // BLM
|
||||
|
||||
marginTop: 40,
|
||||
marginBottom: 120,
|
||||
|
||||
@@ -186,6 +188,7 @@ const sharedStyles = {
|
||||
},
|
||||
|
||||
markdown: {
|
||||
filter: 'grayscale(100%)', // BLM
|
||||
lineHeight: '25px',
|
||||
|
||||
'& .gatsby-highlight': {
|
||||
|
||||
Reference in New Issue
Block a user