|
| 1 | +/** |
| 2 | + * @license |
| 3 | + * Copyright (C) 2016-present Chi Vinh Le and contributors. |
| 4 | + * |
| 5 | + * This software may be modified and distributed under the terms |
| 6 | + * of the MIT license. See the LICENSE file for details. |
| 7 | + */ |
| 8 | + |
| 9 | +import { |
| 10 | + createClassRules, primaryColor, breakpoints, |
| 11 | + blackTextColor, whiteTextColor, accentColor, |
| 12 | + fontFamily, |
| 13 | +} from "./theme"; |
| 14 | + |
| 15 | +export default createClassRules({ |
| 16 | + root: { |
| 17 | + fontFamily: fontFamily.sansSerif, |
| 18 | + color: blackTextColor, |
| 19 | + paddingBottom: "120px", |
| 20 | + [`@media (max-width: ${breakpoints.md}px)`]: { |
| 21 | + paddingBottom: "40px", |
| 22 | + }, |
| 23 | + }, |
| 24 | + hero: { |
| 25 | + height: "540px", |
| 26 | + background: primaryColor.dark, |
| 27 | + boxShadow: "inset -30px 0px 100px -60px rgba(0,0,0,0.5)", |
| 28 | + padding: "32px", |
| 29 | + [`@media (max-width: ${breakpoints.md}px)`]: { |
| 30 | + height: "480px", |
| 31 | + }, |
| 32 | + }, |
| 33 | + logoContainer: { |
| 34 | + paddingTop: "120px", |
| 35 | + textAlign: "center", |
| 36 | + |
| 37 | + [`@media (max-width: ${breakpoints.sm}px)`]: { |
| 38 | + paddingTop: "60px", |
| 39 | + }, |
| 40 | + }, |
| 41 | + |
| 42 | + logoContainerFlex: { |
| 43 | + display: "flex", |
| 44 | + justifyContent: "center", |
| 45 | + alignItems: "center", |
| 46 | + |
| 47 | + [`@media (max-width: ${breakpoints.sm}px)`]: { |
| 48 | + flexFlow: "column wrap", |
| 49 | + }, |
| 50 | + }, |
| 51 | + logo: { |
| 52 | + fill: "#fff", |
| 53 | + width: "100px", |
| 54 | + verticalAlign: "middle", |
| 55 | + |
| 56 | + [`@media (max-width: ${breakpoints.md}px)`]: { |
| 57 | + width: "90px", |
| 58 | + }, |
| 59 | + |
| 60 | + [`@media (max-width: ${breakpoints.sm}px)`]: { |
| 61 | + marginBottom: "10px", |
| 62 | + }, |
| 63 | + |
| 64 | + [`@media (min-width: ${breakpoints.sm}px)`]: { |
| 65 | + marginRight: "30px", |
| 66 | + }, |
| 67 | + }, |
| 68 | + |
| 69 | + logoText: { |
| 70 | + fontSize: "60px", |
| 71 | + lineHeight: "1.3", |
| 72 | + color: whiteTextColor, |
| 73 | + fontWeight: 400, |
| 74 | + letterSpacing: "-0.02em", |
| 75 | + |
| 76 | + [`@media (max-width: ${breakpoints.md}px)`]: { |
| 77 | + fontSize: "48px", |
| 78 | + }, |
| 79 | + |
| 80 | + [`@media (max-width: ${breakpoints.sm}px)`]: { |
| 81 | + fontSize: "32px", |
| 82 | + }, |
| 83 | + |
| 84 | + [`@media (mix-width: ${breakpoints.sm}px)`]: { |
| 85 | + width: "150px", |
| 86 | + }, |
| 87 | + }, |
| 88 | + |
| 89 | + logoSubtext: { |
| 90 | + fontSize: "20px", |
| 91 | + color: "rgba(255, 255, 255, 0.8)", |
| 92 | + marginLeft: "-69px", |
| 93 | + marginTop: "-20px", |
| 94 | + |
| 95 | + [`@media (max-width: ${breakpoints.md}px)`]: { |
| 96 | + fontSize: "16px", |
| 97 | + marginLeft: "-40px", |
| 98 | + marginTop: "-16px", |
| 99 | + }, |
| 100 | + |
| 101 | + [`@media (max-width: ${breakpoints.sm}px)`]: { |
| 102 | + fontSize: "16px", |
| 103 | + margin: "0", |
| 104 | + }, |
| 105 | + }, |
| 106 | + githubButton: { |
| 107 | + marginTop: "48px", |
| 108 | + }, |
| 109 | + main: { |
| 110 | + margin: "0 auto", |
| 111 | + maxWidth: "1024px", |
| 112 | + textAlign: "left", |
| 113 | + padding: "32px", |
| 114 | + boxSizing: "border-box", |
| 115 | + lineHeight: "1.5", |
| 116 | + |
| 117 | + }, |
| 118 | + |
| 119 | + mainSection: { |
| 120 | + margin: "48px 0", |
| 121 | + |
| 122 | + "& > h2 > a, & > h3 > a, & > h4 > a, & > p > a": { |
| 123 | + color: accentColor.default, |
| 124 | + textDecoration: "none", |
| 125 | + "&:hover": { |
| 126 | + textDecoration: "underline", |
| 127 | + color: accentColor.dark, |
| 128 | + }, |
| 129 | + }, |
| 130 | + |
| 131 | + "& > code, & > p > code": { |
| 132 | + display: "inline-block", |
| 133 | + fontFamily: fontFamily.monospace, |
| 134 | + fontSize: "14px", |
| 135 | + padding: "2px 6px", |
| 136 | + color: "rgba(0, 0, 0, 0.8)", |
| 137 | + }, |
| 138 | + |
| 139 | + "&:first-child": { |
| 140 | + marginTop: "32px", |
| 141 | + }, |
| 142 | + |
| 143 | + "& > h2 + .mainSection": { |
| 144 | + marginTop: "0", |
| 145 | + }, |
| 146 | + |
| 147 | + "& > .mainSection + h2": { |
| 148 | + marginBottom: "0", |
| 149 | + }, |
| 150 | + |
| 151 | + "& > p": { |
| 152 | + margin: "16px 0", |
| 153 | + }, |
| 154 | + |
| 155 | + "& > h2": { |
| 156 | + marginBottom: "16px", |
| 157 | + color: primaryColor.default, |
| 158 | + fontSize: "32px", |
| 159 | + }, |
| 160 | + |
| 161 | + "& > h3": { |
| 162 | + marginBottom: "16px", |
| 163 | + fontSize: "24px", |
| 164 | + color: blackTextColor, |
| 165 | + }, |
| 166 | + |
| 167 | + "& > h4": { |
| 168 | + marginBottom: "16px", |
| 169 | + fontSize: "18px", |
| 170 | + color: blackTextColor, |
| 171 | + }, |
| 172 | + }, |
| 173 | + |
| 174 | + block: { |
| 175 | + margin: "32px 0", |
| 176 | + }, |
| 177 | +}); |
0 commit comments