mirror of
https://github.com/System-End/site.git
synced 2026-04-19 19:45:07 +00:00
Remove laptop promotion
This commit is contained in:
parent
331324ed96
commit
4e468628c0
1 changed files with 7 additions and 36 deletions
|
|
@ -169,7 +169,6 @@ class Header extends Component {
|
|||
}
|
||||
|
||||
static defaultProps = {
|
||||
dark: false,
|
||||
color: 'white'
|
||||
}
|
||||
|
||||
|
|
@ -206,9 +205,6 @@ class Header extends Component {
|
|||
if (newState !== oldState) {
|
||||
this.setState({ scrolled: newState })
|
||||
}
|
||||
if (window.location.pathname === '/') {
|
||||
this.setState({ dark: window.scrollY < document.body.clientHeight / 2 })
|
||||
}
|
||||
}
|
||||
|
||||
handleToggleMenu = () => {
|
||||
|
|
@ -216,45 +212,20 @@ class Header extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { color, fixed, bgColor, ...props } = this.props
|
||||
const { color, fixed, bgColor, dark, ...props } = this.props
|
||||
const { mobile, scrolled, toggled } = this.state
|
||||
const dark = this.props.dark || this.state.dark
|
||||
const baseColor = dark
|
||||
? color || 'white'
|
||||
: color === 'white' && scrolled
|
||||
? 'black'
|
||||
: color
|
||||
? 'black'
|
||||
: color
|
||||
const toggleColor = dark
|
||||
? color || 'snow'
|
||||
: toggled || (color === 'white' && scrolled)
|
||||
? 'slate'
|
||||
: color
|
||||
? 'slate'
|
||||
: color
|
||||
|
||||
return [
|
||||
<Box
|
||||
sx={{
|
||||
pt: 5,
|
||||
pb: 3,
|
||||
bg: 'dark',
|
||||
color: 'white',
|
||||
textAlign: 'center',
|
||||
a: { color: 'inherit', fontWeight: 'bold' }
|
||||
}}
|
||||
key="blm"
|
||||
>
|
||||
<Container variant="copy">
|
||||
<Text as="p">
|
||||
<Link href="https://twitter.com/hackclub/status/1266565380820160514?s=21">
|
||||
Black Lives Matter
|
||||
</Link>
|
||||
{'. We’re sending '}
|
||||
<Link href="https://twitter.com/lachlanjc/status/1269702361037058048?s=21">
|
||||
laptops to 80 Black & underserved teenagers
|
||||
</Link>
|
||||
.
|
||||
</Text>
|
||||
</Container>
|
||||
</Box>,
|
||||
return (
|
||||
<Root
|
||||
{...props}
|
||||
key="nav"
|
||||
|
|
@ -287,7 +258,7 @@ class Header extends Component {
|
|||
/>
|
||||
{toggled && <ScrollLock />}
|
||||
</Root>
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue