|
1 | 1 | import { Box, Typography } from '@mui/material' |
2 | 2 | import { Colors } from 'src/styles/color' |
3 | 3 | import { useTranslation } from 'react-i18next' |
| 4 | +import { useSize } from 'src/modules/common/hooks' |
| 5 | +import { FooterBottom } from 'src/components/organisms/Footer/FooterBottom' |
| 6 | +import { IconTwitter, Link } from 'src/components/atoms' |
4 | 7 |
|
5 | 8 | export const footerHeight = 60 |
6 | 9 |
|
7 | 10 | export const Footer = () => { |
8 | 11 | const { t } = useTranslation() |
| 12 | + const { isTabletOrOver } = useSize() |
| 13 | + |
9 | 14 | return ( |
10 | 15 | <Box |
11 | 16 | sx={{ |
12 | 17 | display: 'flex', |
13 | | - flexDirection: 'column-reverse', |
14 | | - alignItems: 'center', |
15 | | - width: '100%', |
16 | | - height: footerHeight, |
17 | | - backgroundColor: Colors.background.darken_1, |
18 | | - p: 1.5 |
| 18 | + flexDirection: 'column', |
| 19 | + backgroundColor: Colors.background.secondary, |
| 20 | + p: 0 |
19 | 21 | }} |
20 | 22 | > |
21 | | - <Typography variant="caption" color={Colors.text.secondary}> |
22 | | - {t('gopher_copyright')} |
23 | | - </Typography> |
| 23 | + <Box |
| 24 | + sx={{ |
| 25 | + display: 'flex', |
| 26 | + flexDirection: 'column', |
| 27 | + px: isTabletOrOver ? '32px' : '16px' |
| 28 | + }} |
| 29 | + > |
| 30 | + <Box |
| 31 | + sx={{ |
| 32 | + display: 'flex', |
| 33 | + flexDirection: 'row', |
| 34 | + py: isTabletOrOver ? '36px' : '16px', |
| 35 | + gap: isTabletOrOver ? '24px' : '16px' |
| 36 | + }} |
| 37 | + > |
| 38 | + <Box |
| 39 | + sx={{ |
| 40 | + display: 'flex', |
| 41 | + flexDirection: 'column', |
| 42 | + width: isTabletOrOver ? '440px' : '150px', |
| 43 | + flexGrow: 1, |
| 44 | + gap: '16px' |
| 45 | + }} |
| 46 | + > |
| 47 | + <Typography |
| 48 | + sx={{ |
| 49 | + fontWeight: 700, |
| 50 | + fontSize: '16px', |
| 51 | + color: Colors.text.default |
| 52 | + }} |
| 53 | + > |
| 54 | + About |
| 55 | + </Typography> |
| 56 | + <Box |
| 57 | + sx={{ |
| 58 | + display: 'flex', |
| 59 | + flexDirection: 'column', |
| 60 | + gap: '8px' |
| 61 | + }} |
| 62 | + > |
| 63 | + <Link href="https://go.dev/conduct" target="_blank"> |
| 64 | + <Typography |
| 65 | + sx={{ |
| 66 | + fontWeight: 400, |
| 67 | + fontSize: '14px', |
| 68 | + color: Colors.text.default, |
| 69 | + lineHeight: '140%' |
| 70 | + }} |
| 71 | + > |
| 72 | + Code of Conduct |
| 73 | + </Typography> |
| 74 | + </Link> |
| 75 | + <Link href="mailto:[email protected]" target="_blank"> |
| 76 | + <Typography |
| 77 | + sx={{ |
| 78 | + fontWeight: 400, |
| 79 | + fontSize: '14px', |
| 80 | + color: Colors.text.default, |
| 81 | + lineHeight: '140%' |
| 82 | + }} |
| 83 | + > |
| 84 | + |
| 85 | + </Typography> |
| 86 | + </Link> |
| 87 | + </Box> |
| 88 | + </Box> |
| 89 | + <Box |
| 90 | + sx={{ |
| 91 | + display: 'flex', |
| 92 | + flexDirection: 'column', |
| 93 | + width: isTabletOrOver ? '440px' : '150px', |
| 94 | + flexGlow: 1, |
| 95 | + gap: '16px' |
| 96 | + }} |
| 97 | + > |
| 98 | + <Typography |
| 99 | + sx={{ |
| 100 | + fontWeight: 700, |
| 101 | + fontSize: '16px', |
| 102 | + lineHeight: '140%', |
| 103 | + color: Colors.text.default |
| 104 | + }} |
| 105 | + > |
| 106 | + Past Conferences |
| 107 | + </Typography> |
| 108 | + <Box |
| 109 | + sx={{ |
| 110 | + display: 'flex', |
| 111 | + flexDirection: 'column', |
| 112 | + gap: '8px' |
| 113 | + }} |
| 114 | + > |
| 115 | + {[ |
| 116 | + ['2022 Spring', 'https://gocon.jp/2022spring/'], |
| 117 | + ['2021 Autumn', 'https://gocon.jp/2021autumn/'], |
| 118 | + ['2021 Spring', 'https://gocon.jp/2021spring/'] |
| 119 | + ].map(([label, href]) => ( |
| 120 | + <Link href={href} key={label} target="_blank"> |
| 121 | + <Typography |
| 122 | + key={label} |
| 123 | + sx={{ |
| 124 | + fontSize: '14px', |
| 125 | + lineHeight: '140%', |
| 126 | + color: Colors.text.default |
| 127 | + }} |
| 128 | + > |
| 129 | + {label} |
| 130 | + </Typography> |
| 131 | + </Link> |
| 132 | + ))} |
| 133 | + </Box> |
| 134 | + </Box> |
| 135 | + {isTabletOrOver && ( |
| 136 | + <Box |
| 137 | + sx={{ |
| 138 | + width: '440px', |
| 139 | + flexGrow: 1 |
| 140 | + }} |
| 141 | + ></Box> |
| 142 | + )} |
| 143 | + </Box> |
| 144 | + </Box> |
| 145 | + <Box |
| 146 | + sx={{ |
| 147 | + height: '1px', |
| 148 | + backgroundColor: Colors.border.primary.highlight |
| 149 | + }} |
| 150 | + ></Box> |
| 151 | + <FooterBottom> |
| 152 | + <Box |
| 153 | + sx={{ |
| 154 | + display: 'flex', |
| 155 | + flexDirection: 'row', |
| 156 | + aliginItems: 'end', |
| 157 | + width: '150px', |
| 158 | + p: '0px', |
| 159 | + gap: '16px' |
| 160 | + }} |
| 161 | + > |
| 162 | + <Box |
| 163 | + sx={{ |
| 164 | + width: '32px', |
| 165 | + height: '32px' |
| 166 | + }} |
| 167 | + > |
| 168 | + <IconTwitter /> |
| 169 | + </Box> |
| 170 | + <Link href="https://twitter.com/hashtag/gocon" target="_blank"> |
| 171 | + <Typography |
| 172 | + sx={{ |
| 173 | + fontWeight: 400, |
| 174 | + fontSize: '16px', |
| 175 | + lineHeight: '140%', |
| 176 | + color: Colors.text.secondary_default |
| 177 | + }} |
| 178 | + > |
| 179 | + #GOCON |
| 180 | + </Typography> |
| 181 | + </Link> |
| 182 | + </Box> |
| 183 | + <Box |
| 184 | + sx={ |
| 185 | + isTabletOrOver |
| 186 | + ? { |
| 187 | + position: 'absolute', |
| 188 | + right: '0px' |
| 189 | + } |
| 190 | + : {} |
| 191 | + } |
| 192 | + > |
| 193 | + {['Go Conference', 'The Go gopher was designed by Renee French. Illustrations by tottie.'].map(item => ( |
| 194 | + <Typography |
| 195 | + key={item} |
| 196 | + sx={{ |
| 197 | + fontWeight: 400, |
| 198 | + fontSize: isTabletOrOver ? '12px' : '10px', |
| 199 | + lineHeight: '140%', |
| 200 | + color: Colors.text.secondary_default, |
| 201 | + textAlign: isTabletOrOver ? 'right' : 'left' |
| 202 | + }} |
| 203 | + > |
| 204 | + {item} |
| 205 | + </Typography> |
| 206 | + ))} |
| 207 | + </Box> |
| 208 | + </FooterBottom> |
24 | 209 | </Box> |
25 | 210 | ) |
26 | 211 | } |
0 commit comments