|
| 1 | +import { cssObj } from '@fuel-ui/css'; |
| 2 | +import { |
| 3 | + Box, |
| 4 | + FuelLogo, |
| 5 | + Heading, |
| 6 | + IconButton, |
| 7 | + Link, |
| 8 | + List, |
| 9 | + Text, |
| 10 | +} from '@fuel-ui/react'; |
| 11 | +import Image from 'next/image'; |
| 12 | + |
| 13 | +type FooterNavProps = { |
| 14 | + title: string; |
| 15 | + img: string; |
| 16 | + alt: string; |
| 17 | + links: { |
| 18 | + href: string; |
| 19 | + label: string; |
| 20 | + }[]; |
| 21 | +}; |
| 22 | + |
| 23 | +function FooterNav({ title, links, img, alt }: FooterNavProps) { |
| 24 | + return ( |
| 25 | + <Box.VStack as="nav" css={styles.nav}> |
| 26 | + <Image src={img} alt={alt} width={40} height={40} /> |
| 27 | + <Heading as="h4">{title}</Heading> |
| 28 | + <List> |
| 29 | + {links.map((link) => ( |
| 30 | + <List.Item key={link.href}> |
| 31 | + <Link href={link.href} isExternal> |
| 32 | + {link.label} |
| 33 | + </Link> |
| 34 | + </List.Item> |
| 35 | + ))} |
| 36 | + </List> |
| 37 | + </Box.VStack> |
| 38 | + ); |
| 39 | +} |
| 40 | + |
| 41 | +export function Footer() { |
| 42 | + return ( |
| 43 | + <Box as="footer" css={styles.root}> |
| 44 | + <Box.VStack css={styles.brand} gap="$6" justify="center"> |
| 45 | + <Box.HStack align="center"> |
| 46 | + <FuelLogo size={24} /> |
| 47 | + <Heading as="h2">FUEL</Heading> |
| 48 | + </Box.HStack> |
| 49 | + <Text>© All rights reserved Fuel Labs</Text> |
| 50 | + <Box.HStack gap="$6"> |
| 51 | + <IconButton |
| 52 | + size="md" |
| 53 | + variant="link" |
| 54 | + as="a" |
| 55 | + href="https://twitter.com/fuel_network" |
| 56 | + target="_blank" |
| 57 | + rel="noopener noreferrer" |
| 58 | + aria-label="Twitter" |
| 59 | + icon="BrandTwitter" |
| 60 | + iconSize={30} |
| 61 | + /> |
| 62 | + <IconButton |
| 63 | + variant="link" |
| 64 | + as="a" |
| 65 | + href="https://github.com/FuelLabs" |
| 66 | + target="_blank" |
| 67 | + rel="noopener noreferrer" |
| 68 | + aria-label="Github" |
| 69 | + icon="BrandGithub" |
| 70 | + iconSize={30} |
| 71 | + /> |
| 72 | + <IconButton |
| 73 | + variant="link" |
| 74 | + as="a" |
| 75 | + href="https://discord.com/invite/xfpK4Pe" |
| 76 | + target="_blank" |
| 77 | + rel="noopener noreferrer" |
| 78 | + aria-label="Discord" |
| 79 | + icon="BrandDiscord" |
| 80 | + iconSize={30} |
| 81 | + /> |
| 82 | + </Box.HStack> |
| 83 | + </Box.VStack> |
| 84 | + |
| 85 | + <Box css={styles.navs}> |
| 86 | + <FooterNav |
| 87 | + title="Resources" |
| 88 | + img="/icons/fuel_icon_brandbook.svg" |
| 89 | + alt="Brandbook Icon" |
| 90 | + links={[ |
| 91 | + { |
| 92 | + href: 'https://fuellabs.notion.site/27f2a32606044179bab5e2ac8e85ab0e?v=c4dfd88031f14e5da0f1845e6de8b623&pvs=4', |
| 93 | + label: 'AMAs', |
| 94 | + }, |
| 95 | + { |
| 96 | + href: 'https://fuel-brand-guide.webflow.io/', |
| 97 | + label: 'Brand Guide', |
| 98 | + }, |
| 99 | + { |
| 100 | + href: 'https://fuellabs.notion.site/Podcasts-9f829504cafd4ae5bc7e81d682070965?pvs=4', |
| 101 | + label: 'Podcasts', |
| 102 | + }, |
| 103 | + { |
| 104 | + href: 'https://fuellabs.notion.site/Articles-25490e91c34743e7bb0c53f0d45917b8?pvs=4', |
| 105 | + label: 'Articles', |
| 106 | + }, |
| 107 | + { |
| 108 | + href: 'https://fuellabs.notion.site/Workshops-Presentations-b0fb9a20de4c448cac2823be3448f149?pvs=4', |
| 109 | + label: 'Presentations', |
| 110 | + }, |
| 111 | + { |
| 112 | + href: 'https://fuellabs.notion.site/People-to-follow-bff175ae0a1b4eecb837b40a6e96a547?pvs=4', |
| 113 | + label: 'Accounts to follow', |
| 114 | + }, |
| 115 | + { |
| 116 | + href: 'https://fuellabs.notion.site/Tweets-82449686e63e424fb8ec9a9d4a91f147?pvs=4', |
| 117 | + label: 'Best Tweets', |
| 118 | + }, |
| 119 | + ]} |
| 120 | + /> |
| 121 | + <FooterNav |
| 122 | + title="About us" |
| 123 | + img="/icons/fuel_icon_about.svg" |
| 124 | + alt="About Icon" |
| 125 | + links={[ |
| 126 | + { |
| 127 | + href: 'https://github.com/FuelLabs/awesome-fuel#upcoming-events-and-hackathons', |
| 128 | + label: 'Events', |
| 129 | + }, |
| 130 | + { |
| 131 | + href: 'https://forum.fuel.network/', |
| 132 | + label: 'Forum', |
| 133 | + }, |
| 134 | + { |
| 135 | + href: 'https://jobs.lever.co/fuellabs', |
| 136 | + label: 'Jobs', |
| 137 | + }, |
| 138 | + { |
| 139 | + href: 'https://fuel-labs.ghost.io/fuel-q4-grant-program/', |
| 140 | + label: 'Apply for a Grant', |
| 141 | + }, |
| 142 | + ]} |
| 143 | + /> |
| 144 | + <FooterNav |
| 145 | + title="Developers" |
| 146 | + img="/icons/fuel_icon_code.svg" |
| 147 | + alt="Code Icon" |
| 148 | + links={[ |
| 149 | + { |
| 150 | + href: 'https://docs.fuel.network/', |
| 151 | + label: 'Documentation', |
| 152 | + }, |
| 153 | + { |
| 154 | + href: 'https://fuellabs.github.io/sway/master/reference/contributing_to_sway.html', |
| 155 | + label: 'Contributors Guide', |
| 156 | + }, |
| 157 | + { |
| 158 | + href: 'https://fuellabs.github.io/sway', |
| 159 | + label: 'Learn Sway', |
| 160 | + }, |
| 161 | + { |
| 162 | + href: 'https://github.com/FuelLabs/sway-applications', |
| 163 | + label: 'Example Apps', |
| 164 | + }, |
| 165 | + { |
| 166 | + href: 'https://github.com/FuelLabs/fuel-specs', |
| 167 | + label: 'Fuel Specs', |
| 168 | + }, |
| 169 | + { |
| 170 | + href: 'https://fuellabs.github.io/fuel-indexer/master/', |
| 171 | + label: 'Fuel Indexer', |
| 172 | + }, |
| 173 | + { |
| 174 | + href: 'https://www.fuel.network/about-us/fuel-v1', |
| 175 | + label: 'Fuel V1', |
| 176 | + }, |
| 177 | + ]} |
| 178 | + /> |
| 179 | + </Box> |
| 180 | + </Box> |
| 181 | + ); |
| 182 | +} |
| 183 | + |
| 184 | +const styles = { |
| 185 | + root: cssObj({ |
| 186 | + py: '$8', |
| 187 | + px: '$8', |
| 188 | + background: 'url(/logo-faded.svg) no-repeat -40px center', |
| 189 | + backgroundSize: 'auto 100%', |
| 190 | + display: 'grid', |
| 191 | + gridTemplateColumns: '1fr', |
| 192 | + gridTemplateRows: 'auto 1fr', |
| 193 | + gridGap: '$10', |
| 194 | + |
| 195 | + '@lg': { |
| 196 | + gridTemplateColumns: '1fr 2fr', |
| 197 | + gridTemplateRows: 'auto', |
| 198 | + py: '$14', |
| 199 | + px: '$16', |
| 200 | + }, |
| 201 | + }), |
| 202 | + brand: cssObj({ |
| 203 | + alignItems: 'center', |
| 204 | + pb: '$10', |
| 205 | + borderBottom: '1px solid $border', |
| 206 | + |
| 207 | + '@lg': { |
| 208 | + pb: '$0', |
| 209 | + alignItems: 'flex-start', |
| 210 | + borderBottom: 'none', |
| 211 | + }, |
| 212 | + |
| 213 | + '.fuel_Heading': { |
| 214 | + margin: 0, |
| 215 | + }, |
| 216 | + |
| 217 | + '.fuel_IconButton .fuel_Icon': { |
| 218 | + transition: 'color 0.2s ease-in-out', |
| 219 | + }, |
| 220 | + |
| 221 | + '.fuel_IconButton:hover .fuel_Icon': { |
| 222 | + color: '$brand !important', |
| 223 | + }, |
| 224 | + }), |
| 225 | + navs: cssObj({ |
| 226 | + display: 'flex', |
| 227 | + flexDirection: 'column', |
| 228 | + gap: '$10', |
| 229 | + justifyContent: 'space-between', |
| 230 | + |
| 231 | + '@md': { |
| 232 | + flexDirection: 'row', |
| 233 | + textAlign: 'center', |
| 234 | + }, |
| 235 | + }), |
| 236 | + nav: cssObj({ |
| 237 | + flex: 1, |
| 238 | + |
| 239 | + '@md': { |
| 240 | + alignItems: 'center', |
| 241 | + }, |
| 242 | + |
| 243 | + '@lg': { |
| 244 | + textAlign: 'left', |
| 245 | + alignItems: 'flex-start', |
| 246 | + }, |
| 247 | + |
| 248 | + '.fuel_Heading': { |
| 249 | + mb: '$0', |
| 250 | + }, |
| 251 | + |
| 252 | + '.fuel_List': { |
| 253 | + display: 'flex', |
| 254 | + flexDirection: 'column', |
| 255 | + gap: '$1', |
| 256 | + }, |
| 257 | + '.fuel_Link': { |
| 258 | + color: '$textColor', |
| 259 | + }, |
| 260 | + '.fuel_Link .fuel_Icon': { |
| 261 | + display: 'none', |
| 262 | + }, |
| 263 | + }), |
| 264 | +}; |
0 commit comments