From 86602a82ebe7366d9d4c3cb2f99db315c85b9866 Mon Sep 17 00:00:00 2001 From: Lachlan Campbell Date: Tue, 30 Jun 2020 10:30:45 -0400 Subject: [PATCH] Add SOM lander --- components/home/slack-events.js | 7 +- components/nav.js | 5 + pages/index.js | 156 +++++++++++++++++++++----------- 3 files changed, 111 insertions(+), 57 deletions(-) diff --git a/components/home/slack-events.js b/components/home/slack-events.js index 767f9125..7cb8f215 100644 --- a/components/home/slack-events.js +++ b/components/home/slack-events.js @@ -124,20 +124,19 @@ const SlackEvents = ({ sx, ...props }) => { {take(events, 7).map(({ timestamp, type, emoji, ...channel }) => ( <> - Someone{' '} {type === 'message' && ( <> - messaged + Message in )} {type === 'typing' && ( <> - is typing in + …typing in )} {type === 'reaction' && ( <> - in reacted with {emoji} + Reaction in : {emoji} )} diff --git a/components/nav.js b/components/nav.js index c7b12539..71efbc91 100644 --- a/components/nav.js +++ b/components/nav.js @@ -169,6 +169,7 @@ class Header extends Component { } static defaultProps = { + // dark: false, color: 'white' } @@ -205,6 +206,9 @@ 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 = () => { @@ -214,6 +218,7 @@ class Header extends Component { render() { 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 diff --git a/pages/index.js b/pages/index.js index 9e789eb4..09d59121 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,5 +1,6 @@ import { Box, + Button, Card, Container, Grid, @@ -10,7 +11,7 @@ import { } from 'theme-ui' import { keyframes } from '@emotion/core' import { Slide } from 'react-reveal' -// import NextLink from 'next/link' +import NextLink from 'next/link' import Head from 'next/head' import Meta from '@hackclub/meta' import Nav from '../components/nav' @@ -115,7 +116,7 @@ export default () => (