|
| 1 | +import { |
| 2 | + Box, |
| 3 | + Divider, |
| 4 | + Icon, |
| 5 | + Link, |
| 6 | + Stack, |
| 7 | + Text, |
| 8 | + useColorModeValue, |
| 9 | +} from "@interchain-ui/react"; |
| 10 | +import { dependencies, products, Project } from "@/config"; |
| 11 | + |
| 12 | +function Product({ name, desc, link }: Project) { |
| 13 | + return ( |
| 14 | + <Link href={link} target="_blank" underline={false}> |
| 15 | + <Stack |
| 16 | + space="$5" |
| 17 | + direction="vertical" |
| 18 | + attributes={{ |
| 19 | + height: "$full", |
| 20 | + minHeight: "$24", |
| 21 | + padding: "$9", |
| 22 | + justifyContent: "center", |
| 23 | + borderRadius: "$xl", |
| 24 | + color: { |
| 25 | + base: "$text", |
| 26 | + hover: useColorModeValue("$purple600", "$purple300"), |
| 27 | + }, |
| 28 | + boxShadow: { |
| 29 | + base: useColorModeValue( |
| 30 | + "0 2px 5px #ccc", |
| 31 | + "0 1px 3px #727272, 0 2px 12px -2px #2f2f2f", |
| 32 | + ), |
| 33 | + hover: useColorModeValue( |
| 34 | + "0 2px 5px #bca5e9", |
| 35 | + "0 0 3px rgba(150, 75, 213, 0.8), 0 3px 8px -2px rgba(175, 89, 246, 0.9)", |
| 36 | + ), |
| 37 | + }, |
| 38 | + }} |
| 39 | + > |
| 40 | + <Text as="h2" fontSize="$xl" color="inherit" attributes={{ margin: 0 }}> |
| 41 | + {name} → |
| 42 | + </Text> |
| 43 | + <Text |
| 44 | + color="inherit" |
| 45 | + as="p" |
| 46 | + fontSize="$md" |
| 47 | + fontWeight="$normal" |
| 48 | + attributes={{ marginY: "$1" }} |
| 49 | + > |
| 50 | + {desc} |
| 51 | + </Text> |
| 52 | + </Stack> |
| 53 | + </Link> |
| 54 | + ); |
| 55 | +} |
| 56 | + |
| 57 | +function Dependency({ name, desc, link }: Project) { |
| 58 | + return ( |
| 59 | + <Link href={link} target="_blank" underline={false}> |
| 60 | + <Stack |
| 61 | + key={name} |
| 62 | + space="$6" |
| 63 | + direction="horizontal" |
| 64 | + attributes={{ |
| 65 | + height: "$full", |
| 66 | + padding: "$8", |
| 67 | + justifyContent: "center", |
| 68 | + borderWidth: "1px", |
| 69 | + borderStyle: "solid", |
| 70 | + borderColor: useColorModeValue("$blackAlpha200", "$whiteAlpha100"), |
| 71 | + borderRadius: "$xl", |
| 72 | + boxShadow: { |
| 73 | + base: "none", |
| 74 | + hover: useColorModeValue( |
| 75 | + "0 2px 5px #ccc", |
| 76 | + "0 1px 3px #727272, 0 2px 12px -2px #2f2f2f", |
| 77 | + ), |
| 78 | + }, |
| 79 | + }} |
| 80 | + > |
| 81 | + <Box |
| 82 | + color={useColorModeValue("$primary500", "$primary200")} |
| 83 | + flex="0 0 auto" |
| 84 | + > |
| 85 | + <Icon name="link" size="$md" attributes={{ mt: "$2" }} /> |
| 86 | + </Box> |
| 87 | + |
| 88 | + <Stack space="$2" direction="vertical"> |
| 89 | + <Text |
| 90 | + as="p" |
| 91 | + fontSize="$lg" |
| 92 | + fontWeight="$semibold" |
| 93 | + attributes={{ marginY: "$1" }} |
| 94 | + > |
| 95 | + {name} |
| 96 | + </Text> |
| 97 | + <Text |
| 98 | + as="p" |
| 99 | + fontSize="$md" |
| 100 | + fontWeight="$light" |
| 101 | + attributes={{ |
| 102 | + color: useColorModeValue("$blackAlpha700", "$whiteAlpha700"), |
| 103 | + lineHeight: "$short", |
| 104 | + marginY: "$1", |
| 105 | + }} |
| 106 | + > |
| 107 | + {desc} |
| 108 | + </Text> |
| 109 | + </Stack> |
| 110 | + </Stack> |
| 111 | + </Link> |
| 112 | + ); |
| 113 | +} |
| 114 | + |
| 115 | +export function Footer() { |
| 116 | + return ( |
| 117 | + <> |
| 118 | + <Box |
| 119 | + display="grid" |
| 120 | + gridTemplateColumns={{ |
| 121 | + tablet: "repeat(2, 1fr)", |
| 122 | + desktop: "repeat(3, 1fr)", |
| 123 | + }} |
| 124 | + mb="$16" |
| 125 | + gap="$12" |
| 126 | + > |
| 127 | + {products.map((product) => ( |
| 128 | + <Product key={product.name} {...product}></Product> |
| 129 | + ))} |
| 130 | + </Box> |
| 131 | + <Box |
| 132 | + display="grid" |
| 133 | + gridTemplateColumns={{ tablet: "repeat(3, 1fr)" }} |
| 134 | + gap="$12" |
| 135 | + mb="$19" |
| 136 | + > |
| 137 | + {dependencies.map((dependency) => ( |
| 138 | + <Dependency key={dependency.name} {...dependency}></Dependency> |
| 139 | + ))} |
| 140 | + </Box> |
| 141 | + <Box mb="$6"> |
| 142 | + <Divider /> |
| 143 | + </Box> |
| 144 | + <Stack |
| 145 | + direction="horizontal" |
| 146 | + space="$2" |
| 147 | + attributes={{ |
| 148 | + justifyContent: "center", |
| 149 | + opacity: 0.5, |
| 150 | + fontSize: "$sm", |
| 151 | + }} |
| 152 | + > |
| 153 | + <Text>Built with</Text> |
| 154 | + <Link href="https://cosmology.zone/" target="_blank"> |
| 155 | + Cosmology |
| 156 | + </Link> |
| 157 | + </Stack> |
| 158 | + </> |
| 159 | + ); |
| 160 | +} |
0 commit comments