slate/pages/_/system/typography.js

203 lines
5.3 KiB
JavaScript
Raw Normal View History

2020-07-17 10:03:20 +03:00
import * as React from "react";
import * as System from "~/components/system";
import * as Constants from "~/common/constants";
import { css } from "@emotion/react";
2020-07-17 10:03:20 +03:00
import SystemPage from "~/components/system/SystemPage";
import ViewSourceLink from "~/components/system/ViewSourceLink";
import CodeBlock from "~/components/system/CodeBlock";
2020-07-17 10:03:20 +03:00
const STYLES_CSS_LABEL = css`
display: block;
letter-spacing: 0.2px;
font-size: 12px;
color: ${Constants.system.darkGray};
margin-bottom: 8px;
`;
2020-07-19 11:49:45 +03:00
const STYLES_TYPE_JETBRAINS = css`
font-family: ${Constants.font.code};
`;
2020-07-19 11:49:45 +03:00
const STYLES_BOLD = css`
2020-07-17 10:03:20 +03:00
font-family: ${Constants.font.text};
2020-07-19 11:49:45 +03:00
font-weight: bold;
`;
2020-07-19 11:49:45 +03:00
const STYLES_ITALIC = css`
font-style: italic;
2020-07-19 11:49:45 +03:00
`;
2020-07-19 11:49:45 +03:00
const STYLES_UNDERLINE = css`
text-decoration: underline;
`;
export default class SystemPageTypography extends React.Component {
2020-07-17 10:03:20 +03:00
render() {
return (
<SystemPage
title="SDS: Typography"
description="..."
url="https://fps.onrender.com/system/typography"
>
<System.H1>
Typography <ViewSourceLink file="system/typography.js" />
</System.H1>
<br />
<br />
<System.P>
2020-07-28 23:27:53 +03:00
The Filecoin Client uses{" "}
2020-07-24 11:45:02 +03:00
<a href="https://rsms.me/inter/" target="_blank">
Inter
</a>{" "}
and{" "}
<a href="https://www.jetbrains.com/lp/mono/" target="_blank">
Jet Brains
</a>
.
2020-07-17 10:03:20 +03:00
</System.P>
<br />
<br />
<br />
<System.H2>Imports</System.H2>
<hr />
<br />
<System.P>
2020-07-24 11:45:02 +03:00
Import React and the typography components. If needed, import the
ViewSourceLink component.
2020-07-17 10:03:20 +03:00
</System.P>
<br />
<CodeBlock>
2020-07-28 23:27:53 +03:00
{`import { H1, H2, H3, H4, P, UL, OL, LI } from "slate-react-system";
import ViewSourceLink from "~/components/system/ViewSourceLink";`}
</CodeBlock>
2020-07-17 10:03:20 +03:00
<br />
<br />
<System.H2>Typescale</System.H2>
2020-07-17 10:03:20 +03:00
<hr />
<br />
<span css={STYLES_CSS_LABEL}>1.953rem &nbsp; Semi Bold</span>
2020-07-24 11:45:02 +03:00
<System.H1>This is heading level 1</System.H1>
<br />
<span css={STYLES_CSS_LABEL}>1.563rem &nbsp; Medium</span>
2020-07-24 11:45:02 +03:00
<System.H2>This is heading level 2</System.H2>
<br />
<span css={STYLES_CSS_LABEL}>1.25rem &nbsp; Medium</span>
2020-07-24 11:45:02 +03:00
<System.H3>This is heading level 3</System.H3>
<br />
<span css={STYLES_CSS_LABEL}>1rem &nbsp; Medium</span>
2020-07-24 11:45:02 +03:00
<System.H4>This is heading level 4</System.H4>
<br />
2020-07-17 10:03:20 +03:00
<br />
<CodeBlock>
2020-07-28 23:27:53 +03:00
{`<H1>This is heading level 1</H1>
2020-07-17 10:03:20 +03:00
2020-07-28 23:27:53 +03:00
<H2>This is heading level 2</H2>
2020-07-17 10:03:20 +03:00
2020-07-28 23:27:53 +03:00
<H3>This is heading level 3</H3>
2020-07-17 10:03:20 +03:00
2020-07-28 23:27:53 +03:00
<H4>This is heading level 4</H4>`}
</CodeBlock>
<br />
<br />
<System.H2>Type Styles</System.H2>
<hr />
<br />
<System.P css={STYLES_BOLD}>This text is bold</System.P>
<System.P css={STYLES_ITALIC}>This text is italic</System.P>
<System.P css={STYLES_UNDERLINE}>This text is underlined</System.P>
<br />
<br />
<CodeBlock>
2020-07-28 23:27:53 +03:00
{`<P css={STYLES_BOLD}>This text is bold</P>
2020-07-28 23:27:53 +03:00
<P css={STYLES_ITALIC}>This text is italic</P>
2020-07-28 23:27:53 +03:00
<P css={STYLES_UNDERLINE}>This text is underlined</P>`}
</CodeBlock>
<br />
<br />
<System.H2>Typefaces</System.H2>
<hr />
<br />
<System.H3>Inter</System.H3>
<System.P>a b c d e f g h i j k l m n o p q r s t u v w x y z</System.P>
<System.P>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</System.P>
<System.P>0 1 2 3 4 5 6 7 8 9</System.P>
<br />
2020-07-24 11:45:02 +03:00
<br />
<System.H3>Jet Brains</System.H3>
2020-07-24 11:45:02 +03:00
<System.P css={STYLES_TYPE_JETBRAINS}>
a b c d e f g h i j k l m n o p q r s t u v w x y z
</System.P>
<System.P css={STYLES_TYPE_JETBRAINS}>
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
</System.P>
<System.P css={STYLES_TYPE_JETBRAINS}>0 1 2 3 4 5 6 7 8 9</System.P>
<br />
<br />
<System.H2>Ordered and Unordered Lists</System.H2>
<hr />
<br />
<System.OL>
<System.LI>Rainbow</System.LI>
<System.LI>Cloud</System.LI>
<System.LI>Cake</System.LI>
</System.OL>
<br />
<System.UL>
<System.LI>Cloud</System.LI>
<System.LI>Cake</System.LI>
<System.LI>Rainbow</System.LI>
</System.UL>
<br />
<br />
<CodeBlock>
2020-07-28 23:27:53 +03:00
{`<OL>
<LI>Rainbow</LI>
<LI>Cloud</LI>
<LI>Cake</LI>
</OL>
2020-07-17 10:03:20 +03:00
2020-07-28 23:27:53 +03:00
<UL>
<LI>Cloud</LI>
<LI>Cake</LI>
<LI>Rainbow</LI>
</UL>`}
</CodeBlock>
2020-07-17 10:03:20 +03:00
<br />
<br />
2020-07-19 11:49:45 +03:00
<System.H2>Hyperlinks</System.H2>
<hr />
<br />
2020-07-24 11:45:02 +03:00
<System.P>
Internal References{" "}
<a href="https://slate.host" target="_blank">
Link to a page
</a>
</System.P>
<System.P>
External References <ViewSourceLink file="system/typography.js" />
</System.P>
2020-07-17 10:03:20 +03:00
<br />
<br />
<CodeBlock>
2020-07-28 23:27:53 +03:00
{`<P>
2020-07-17 10:03:20 +03:00
<a href="https://slate.host"
target="_blank">
Link to a page
</a>
2020-07-28 23:27:53 +03:00
</P>
2020-07-28 23:27:53 +03:00
<P>
<ViewSourceLink file="system/typography.js" />
2020-07-28 23:27:53 +03:00
</P>`}
</CodeBlock>
<br />
<br />
2020-07-17 10:03:20 +03:00
</SystemPage>
);
}
}