Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: new branding #215

Merged
merged 6 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.0.0
Binary file added assets/.DS_Store
Binary file not shown.
25 changes: 15 additions & 10 deletions assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions website/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ id: getting-started
slug: /getting-started
---

## Quick start
## Quick start 🚀

The following code excerpt demonstrates a quick start example:

```rescript
// UserForm.res
```ocaml title="UserForm.res"

module FormFields = %lenses(
type state = {
Expand All @@ -31,7 +30,6 @@ let make = (~email) => {
}},
~initialState={
name: "",
// Initialize from external values if you want
email,
},
~schema={
Expand Down
2 changes: 1 addition & 1 deletion website/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ id: installation
slug: /installation
---

## Dependencies
## Dependencies 📦

Install `reform` and `reschema`:

Expand Down
6 changes: 3 additions & 3 deletions website/docs/what-and-why.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ id: what-and-why
slug: /
---

## What is this?
## What is this? 🤔

As you might know, you can use any existing React / JavaScript libraries with ReScript,
including **form libraries** like Formik, react-hook-form, Final Form, since you install or create bindings for these libraries.
ReForm is not a set of bindings for an existing form library, it was created from scratch to use with ReScript and React.


## Why?
## Why? 🧐

Code that deals with strongly typed forms can quickly become walls of repeated text.
We created ReForm to be both deadly simple and to make forms sound good leveraging ReScript's powerful typesytem.
Even the schemas we use are nothing more than constructors built-in in the language itself with a small size footprint.

## Features
## Features 📦

- Hook API
- Schema API
Expand Down
13 changes: 9 additions & 4 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('@docusaurus/types').DocusaurusConfig} */
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");

module.exports = {
title: "ReForm",
tagline: "Reasonably making forms sound good",
Expand All @@ -15,7 +17,7 @@ module.exports = {
disableSwitch: true,
},
navbar: {
title: "ReForm",
title: "",
logo: {
alt: "ReForm Logo",
src: "img/logo.svg",
Expand All @@ -28,8 +30,7 @@ module.exports = {
position: "left",
},
{
href:
"https://github.com/rescriptbr/reform/blob/master/reform/CHANGELOG.md",
href: "https://github.com/rescriptbr/reform/blob/master/reform/CHANGELOG.md",
label: "Changelog",
position: "left",
},
Expand Down Expand Up @@ -80,6 +81,10 @@ module.exports = {
],
copyright: `Copyright © ${new Date().getFullYear()} ReForm. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
},
presets: [
[
Expand Down
8 changes: 6 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "website",
"version": "0.0.0",
"engine": {
"node": ">=14"
},
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -14,10 +17,11 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.72",
"@docusaurus/preset-classic": "2.0.0-alpha.72",
"@docusaurus/core": "2.0.0-beta.14",
"@docusaurus/preset-classic": "2.0.0-beta.14",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
Expand Down
4 changes: 4 additions & 0 deletions website/src/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

:root {
--red: #DD1350;
--red-hover: #C11347;
Expand All @@ -14,6 +16,8 @@
--ifm-color-primary-lighter: rgb(102, 212, 189);
--ifm-color-primary-lightest: rgb(146, 224, 208);
--ifm-code-font-size: 95%;
--ifm-font-family-base: 'DM Sans', sans-serif;
--ifm-footer-link-hover-color: #000;
}

html[data-theme="dark"] {
Expand Down
14 changes: 7 additions & 7 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export default function Home() {
<main>
<div className={clsx(styles["main-wrapper"])}>
<div className={clsx(styles.hero)}>
<img src="/img/hero-logo.svg" />
<h1 className={styles["hero-title"]}>
<h1 className={styles["hero-title"]}>Powerful and type-safe</h1>
<p className={styles["hero-text"]}>
Reasonably making forms with <span>ReScript</span> and{" "}
<span>React</span> sound good
</h1>
React sound good
</p>
<div>
<Link
className={clsx("button button--primary button--lg")}
Expand All @@ -37,7 +37,7 @@ export default function Home() {
<div className={clsx("row", styles.highlights)}>
<section className="col margin-bottom--xl">
<img src="/img/focus.svg" />
<h2>Focused in ReScript</h2>
<h2 className={styles["highlight-title"]}>Focused in ReScript</h2>
<p className=" padding-horiz--md">
We created ReForm to be both deadly simple and to make forms
sound good leveraging ReScript's powerful typesytem. Even the
Expand All @@ -47,7 +47,7 @@ export default function Home() {
</section>
<section className="col margin-bottom--xl">
<img src="/img/powerful.svg" />
<h2>Powerful and type-safe</h2>
<h2 className={styles["highlight-title"]}>Powerful and type-safe</h2>
<p className=" padding-horiz--md">
ReForm is a powerful, type-safe and fully-featured form
library that includes hooks api, schema api, context provider,
Expand All @@ -56,7 +56,7 @@ export default function Home() {
</section>
<section className="col margin-bottom--xl">
<img src="/img/activity.svg" />
<h2>Actively maintained</h2>
<h2 className={styles["highlight-title"]}>Actively maintained</h2>
<p className=" padding-horiz--md">
ReForm is used in production projects. This incentivizes us to
regularly improving the library and to keep breaking changes
Expand Down
64 changes: 50 additions & 14 deletions website/src/pages/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,26 @@
text-align: center;
}

.hero {
padding: 0 24px;
}

.hero > img {
margin-bottom: 1.6rem;
}

.hero-text {
margin: 0;
color: rgba(0, 0, 0, 0.6);
letter-spacing: -0.06em;
margin-bottom: 16px;
}

.hero-title {
letter-spacing: -0.06em;
font-weight: bold;
}

.hero-title > span {
color: var(--red);
}
Expand All @@ -27,12 +43,16 @@
}

.main-wrapper {
padding: 4rem 0;
padding: 3rem 0;
}

.hero-title {
font-size: 1.8rem;
margin-bottom: 1.6rem;
font-size: 2.4rem;
margin-bottom: 8px;
}

.hero-text {
font-size: 1.6rem;
}
}

Expand All @@ -43,14 +63,19 @@
}

.main-wrapper {
padding: 4rem 0;
padding: 3rem 0;
max-width: 600px;
}

.hero-title {
font-size: 2.4rem;
margin-bottom: 1.6rem;
font-size: 3.0rem;
margin-bottom: 10px;
}

.hero-text {
font-size: 1.8rem;
}

}


Expand All @@ -61,14 +86,19 @@
}

.main-wrapper {
padding: 5rem 0;
padding: 4rem 0;
max-width: 700px;
}

.hero-title {
font-size: 2.6rem;
margin-bottom: 1.6rem;
font-size: 3.0rem;
margin-bottom: 10px;
}

.hero-text {
font-size: 1.8rem;
}

}


Expand All @@ -81,14 +111,20 @@
}

.main-wrapper {
padding: 6rem 0;
padding: 5rem 0;
max-width: 800px;
}

.hero-title {
font-size: 2.4rem;
margin-bottom: 1.6rem;
.hero-title {
font-size: 3.0rem;
margin-bottom: 10px;
}
}

.hero-text {
font-size: 1.8rem;
}
}

.highlight-title {
letter-spacing: -0.06em;
}
Binary file modified website/static/img/favicon.ico
Binary file not shown.
16 changes: 11 additions & 5 deletions website/static/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading