aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/footer.tsx
blob: be5c075f9f4aaf39688432d49da78e67eb14ef30 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import * as _ from 'lodash';
import * as React from 'react';
import styled from 'styled-components';

import { colors } from 'ts/style/colors';

import { Button } from './button';
import { Section, Wrap, Column } from './layout';
import { Logo } from './logo';

interface FooterInterface {
}

interface LinkInterface {
    text: string;
    url: string;
    newWindow?: boolean;
}

interface LinkRows {
  [key: string]: {
    heading: string;
    links: Array<LinkInterface>;
  }
}

interface LinkListProps {
    links: Array<LinkInterface>;
}

const linkRows: LinkRows = [
    {
        heading: 'Products',
        links: [
            { url: '#', text: '0x Instant' },
            { url: '#', text: '0x Launch Kit' },
        ],
    },
    {
        heading: 'About',
        links: [
            { url: '#', text: 'Mission' },
            { url: '#', text: 'Team' },
            { url: '#', text: 'Jobs' },
            { url: '#', text: 'Press Kit' },
        ],
    },
    {
        heading: 'Community',
        links: [
            { url: '#', text: 'Twitter' },
            { url: '#', text: 'Rocket Chat' },
            { url: '#', text: 'Facebook' },
            { url: '#', text: 'Reddit' },
        ],
    },
];

export const Footer: React.StatelessComponent<FooterInterface> = ({}) => (
  <FooterWrap
    bgColor="#181818"
    noMargin>
    <Wrap>
      <Column colWidth="1/2" noPadding>
        <Logo />
      </Column>

      <Column colWidth="1/2" noPadding>
        <Wrap>
          {_.map(linkRows, (row, index) => (
            <Column
              key={`fc-${index}`}
              colWidth="1/3"
              noPadding>
              <RowHeading>
                { row.heading }
              </RowHeading>

              <LinkList links={row.links} />
            </Column>
          ))}
        </Wrap>
      </Column>
    </Wrap>
  </FooterWrap>
);


const LinkList = (props: LinkListProps) => (
  <ul>
    {_.map(props.links, (link, index) => (
      <li key={`fl-${index}`}>
        <Link href={link.url}>
          { link.text }
        </Link>
      </li>
    ))}
  </ul>
);

const FooterWrap = Section.withComponent('footer');

const RowHeading = styled.h3`
    color: ${colors.white};
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    margin-bottom: 1.25em;
`;

const Link = styled.a`
    color: rgba(255, 255, 255, 0.5);
    display: block;
    font-size: 16px;
    line-height: 20px;
    transition: color 0.25s ease-in-out;
    text-decoration: none;

    &:hover {
        color: rgba(255, 255, 255, 1);
    }
`;