Skip to content

Commit 73662ed

Browse files
authored
Merge pull request #250 from bettistein/color-refactor
Color Refactor and some small layout adjustments
2 parents df23f2a + c254c0d commit 73662ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+511
-491
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@mdx-js/loader": "^1.5.5",
1313
"@next/mdx": "^8.1.0",
1414
"@octokit/graphql-schema": "^7.4.0",
15+
"@rescript/react": "^0.10.1",
1516
"@ryyppy/rescript-promise": "^0.0.2",
1617
"@zeit/next-css": "^1.0.1",
1718
"bs-fetch": "^0.3.1",
@@ -29,7 +30,6 @@
2930
"prettier": "^1.18.2",
3031
"react": "^16.12.0",
3132
"react-dom": "^16.12.0",
32-
"@rescript/react": "^0.10.1",
3333
"remark-parse": "^7.0.1",
3434
"remark-slug": "^5.1.2",
3535
"remark-stringify": "^7.0.3",

pages/brand.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div className="p-4">
1717
</div>
1818

19-
<div className="bg-onyx p-4">
19+
<div className="bg-gray-95 p-4">
2020
<img className="h-24" src="/static/brand/rescript-logo-white.svg" />
2121
</div>
2222

src/Blog.js

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Blog.res

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ module Badge = {
2828
let make = (~badge: BlogFrontmatter.Badge.t) => {
2929
let bgColor = switch badge {
3030
| Preview | Roadmap | Release => "bg-turtle"
31-
| Testing => "bg-code-1"
31+
| Testing => "bg-orange"
3232
}
3333

3434
let text = badge->BlogFrontmatter.Badge.toString
3535

3636
<div
37-
className={bgColor ++ " flex items-center h-6 font-medium tracking-tight text-onyx-80 text-14 px-2 rounded-sm"}>
37+
className={bgColor ++ " flex items-center h-6 font-medium tracking-tight text-gray-80-tr text-14 px-2 rounded-sm"}>
3838
<div> <img className="h-3 block mr-1" src="/static/star.svg" /> </div>
3939
<div> {React.string(text)} </div>
4040
</div>
@@ -47,12 +47,12 @@ module CategorySelector = {
4747
| Category(BlogFrontmatter.Category.t)
4848

4949
let renderTab = (~text: string, ~isActive: bool, ~onClick) => {
50-
let active = "bg-snow-dark text-onyx rounded py-1"
50+
let active = "bg-gray-10 text-gray-80 rounded py-1"
5151
<div
5252
key=text
5353
onClick
5454
className={(
55-
isActive ? active : "hover:cursor-pointer hover:text-onyx"
55+
isActive ? active : "hover:cursor-pointer hover:text-gray-80"
5656
) ++ " px-4 inline-block"}>
5757
{React.string(text)}
5858
</div>
@@ -66,7 +66,7 @@ module CategorySelector = {
6666
) => {
6767
let tabs = [All, Archived]->Js.Array2.concat(Belt.Array.map(categories, cat => Category(cat)))
6868

69-
<div className="text-16 w-full flex items-center justify-between text-onyx-50">
69+
<div className="text-16 w-full flex items-center justify-between text-gray-60">
7070
{Belt.Array.map(tabs, tab => {
7171
let onClick = evt => {
7272
evt->ReactEvent.Mouse.preventDefault
@@ -121,7 +121,7 @@ module BlogCard = {
121121
<Link href="/blog/[slug]" _as={"/blog/" ++ slug}>
122122
<a> <h2 className=Text.H3.default> {React.string(title)} </h2> </a>
123123
</Link>
124-
<div className="text-night-light text-sm">
124+
<div className="text-gray-60 text-14">
125125
{switch category {
126126
| Some(category) => <> {React.string(category)} {React.string(j` · `)} </>
127127
| None => React.null
@@ -182,13 +182,13 @@ module FeatureCard = {
182182
<div className="max-w-400 ">
183183
<h2 className=Text.H2.default> {React.string(title)} </h2>
184184
<div className="mb-6">
185-
<div className="flex items-center font-medium text-onyx-50 text-sm my-2">
185+
<div className="flex items-center font-medium text-gray-40 text-sm mt-2 mb-5">
186186
<div className="inline-block w-4 h-4 mr-2"> authorImg </div>
187187
<div>
188188
{switch author.twitter->Js.Null.toOption {
189189
| Some(handle) =>
190190
<a
191-
className="hover:text-onyx-80"
191+
className="hover:text-gray-80"
192192
href={"https://twitter.com/" ++ handle}
193193
rel="noopener noreferrer"
194194
target="_blank">
@@ -207,7 +207,7 @@ module FeatureCard = {
207207
{date->Util.Date.toDayMonthYear->React.string}
208208
</div>
209209
</div>
210-
<p className="text-night-dark text-16"> {React.string(firstParagraph)} </p>
210+
<p className="text-gray-90 antialiased tracking-tight text-16"> {React.string(firstParagraph)} </p>
211211
</div>
212212
</div>
213213
<Link href="/blog/[slug]" _as={"/blog/" ++ slug}>
@@ -264,7 +264,7 @@ let default = (props: props): React.element => {
264264
let errorBox = if ProcessEnv.env === ProcessEnv.development && Belt.Array.length(malformed) > 0 {
265265
<div className="mb-12">
266266
<Markdown.Warn>
267-
<h2 className="font-bold text-night-dark text-2xl mb-2">
267+
<h2 className="font-bold text-gray-95 text-2xl mb-2">
268268
{React.string("Some Blog Posts are Malformed!")}
269269
</h2>
270270
<p>
@@ -381,7 +381,7 @@ let default = (props: props): React.element => {
381381
description="News, Announcements, Release Notes and more"
382382
/>
383383
<div className="mt-16 pt-2">
384-
<div className="text-night text-lg">
384+
<div className="text-gray-80 text-lg">
385385
<Navigation overlayState />
386386
<div className="flex justify-center overflow-hidden">
387387
<main className="min-w-320 lg:align-center w-full lg:px-0 max-w-1280 pb-48">

src/BlogArticle.js

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/BlogArticle.res

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module BlogComponent = {
4141

4242
module Line = {
4343
@react.component
44-
let make = () => <div className="block border-t border-snow-darker" />
44+
let make = () => <div className="block border-t border-gray-20" />
4545
}
4646

4747
module AuthorBox = {
@@ -56,19 +56,19 @@ module AuthorBox = {
5656

5757
<div className="flex items-center">
5858
<div className="w-12 h-12 bg-berry-40 block rounded-full mr-3"> authorImg </div>
59-
<div className="text-14 font-medium text-night-dark">
59+
<div className="text-14 font-medium text-gray-95">
6060
{switch author.twitter->Js.Null.toOption {
6161
| Some(handle) =>
6262
<a
6363
href={"https://twitter.com/" ++ handle}
64-
className="hover:text-night"
64+
className="hover:text-gray-80"
6565
rel="noopener noreferrer"
6666
target="_blank">
6767
{React.string(displayName)}
6868
</a>
6969
| None => React.string(displayName)
7070
}}
71-
<div className="text-night-light"> {React.string(author.role)} </div>
71+
<div className="text-gray-60"> {React.string(author.role)} </div>
7272
</div>
7373
</div>
7474
}
@@ -90,8 +90,8 @@ module BlogHeader = {
9090
let authors = Belt.Array.concat([author], co_authors)
9191

9292
<div className="flex flex-col items-center">
93-
<div className="w-full max-w-705">
94-
<div className="text-night-light text-lg mb-5">
93+
<div className="w-full max-w-740">
94+
<div className="text-gray-60 text-lg mb-5">
9595
{switch category {
9696
| Some(category) => <> {React.string(category)} {React.string(middleDotSpacer)} </>
9797
| None => React.null
@@ -103,7 +103,7 @@ module BlogHeader = {
103103
switch desc {
104104
| "" => <div className="mb-8" />
105105
| desc =>
106-
<div className="my-8 text-onyx">
106+
<div className="my-8 text-gray-95">
107107
<Markdown.Intro> {React.string(desc)} </Markdown.Intro>
108108
</div>
109109
}
@@ -121,14 +121,14 @@ module BlogHeader = {
121121
</div>
122122
{switch articleImg {
123123
| Some(articleImg) =>
124-
<div className="-mx-8 sm:mx-0 sm:w-full bg-night-10 md:mt-24">
124+
<div className="-mx-8 sm:mx-0 sm:w-full bg-gray-5-tr md:mt-24">
125125
<img
126126
className="h-full w-full object-cover"
127127
src=articleImg
128128
style={ReactDOMStyle.make(~maxHeight="33.625rem", ())}
129129
/>
130130
</div>
131-
| None => <div className="max-w-705 w-full"> <Line /> </div>
131+
| None => <div className="max-w-740 w-full"> <Line /> </div>
132132
}}
133133
</div>
134134
}
@@ -200,7 +200,7 @@ let default = (props: props) => {
200200
/>
201201
</div>
202202
<div className="flex justify-center">
203-
<div className="max-w-705 w-full">
203+
<div className="max-w-740 w-full">
204204
archivedNote
205205
children
206206
{switch canonical->Js.Null.toOption {
@@ -216,11 +216,11 @@ let default = (props: props) => {
216216
<div className="mt-12">
217217
<Line />
218218
<div className="pt-20 flex flex-col items-center">
219-
<div className="text-3xl sm:text-4xl text-center text-night-dark font-medium">
219+
<div className="text-3xl sm:text-4xl text-center text-gray-95 font-medium">
220220
{React.string("Want to read more?")}
221221
</div>
222222
<Next.Link href="/blog">
223-
<a className="text-fire hover:text-fire-80">
223+
<a className="text-fire hover:text-fire-70">
224224
{React.string("Back to Overview")}
225225
<Icon.ArrowRight className="ml-2 inline-block" />
226226
</a>
@@ -234,7 +234,7 @@ let default = (props: props) => {
234234
| Error(msg) =>
235235
<div>
236236
<Markdown.Warn>
237-
<h2 className="font-bold text-night-dark text-2xl mb-2">
237+
<h2 className="font-bold text-gray-95 text-28 mb-2">
238238
{React.string("Could not parse file '_blogposts/" ++ (fullslug ++ ".mdx'"))}
239239
</h2>
240240
<p>

0 commit comments

Comments
 (0)