File size: 2,848 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
// @flow

import * as React from "react";
import { Container, Grid, List } from "../../components";

export type Props = {|
  /**
   * An array of the 8 links displayed in the first footer bar
   */
  +links?: Array<React.Node>,
  /**
   * The text block displayed next to the links
   */
  +note?: string,
  /**
   * The content of the very bottom copyright notice space
   */
  +copyright?: React.Node,
  /**
   * The content of the very bottom nav space
   */
  +nav?: React.Node,
|};

/**
 * The footer of your website
 */
const SiteFooter = ({ links, note, copyright, nav }: Props): React.Node => (
  <React.Fragment>
    {(links || note) && (
      <div className="footer">
        <Container>
          <Grid.Row>
            <Grid.Col lg={8}>
              <Grid.Row>
                {links && (
                  <React.Fragment>
                    <Grid.Col width={6} md={3}>
                      <List unstyled={true} className="mb-0">
                        <List.Item>{links[0]}</List.Item>
                        <List.Item>{links[1]}</List.Item>
                      </List>
                    </Grid.Col>
                    <Grid.Col width={6} md={3}>
                      <List unstyled={true} className="mb-0">
                        <List.Item>{links[2]}</List.Item>
                        <List.Item>{links[3]}</List.Item>
                      </List>
                    </Grid.Col>
                    <Grid.Col width={6} md={3}>
                      <List unstyled={true} className="mb-0">
                        <List.Item>{links[4]}</List.Item>
                        <List.Item>{links[5]}</List.Item>
                      </List>
                    </Grid.Col>
                    <Grid.Col width={6} md={3}>
                      <List unstyled={true} className="mb-0">
                        <List.Item>{links[6]}</List.Item>
                        <List.Item>{links[7]}</List.Item>
                      </List>
                    </Grid.Col>
                  </React.Fragment>
                )}
              </Grid.Row>
            </Grid.Col>
            <Grid.Col lg={4} className="mt-4 mt-lg-0">
              {note}
            </Grid.Col>
          </Grid.Row>
        </Container>
      </div>
    )}
    {(nav || copyright) && (
      <footer className="footer">
        <Container>
          <Grid.Row className="align-items-center flex-row-reverse">
            <Grid.Col auto={true} className="ml-auto">
              <Grid.Row className="align-items-center">{nav}</Grid.Row>
            </Grid.Col>
            <Grid.Col width={12} lgAuto className="mt-3 mt-lg-0 text-center">
              {copyright}
            </Grid.Col>
          </Grid.Row>
        </Container>
      </footer>
    )}
  </React.Fragment>
);

SiteFooter.displayName = "Site.Footer";

export default SiteFooter;