slate/pages/_/system/typography.js

201 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";
2020-11-30 08:24:22 +03:00
import { css } from "@emotion/react";
2020-07-17 10:03:20 +03:00
import SystemPage from "~/components/system/SystemPage";
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;
2021-07-07 22:58:14 +03:00
color: ${Constants.system.grayLight2};
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>
2021-03-08 13:13:56 +03:00
Typography <System.ViewSourceLink file="system/typography.js" />
2020-07-17 10:03:20 +03:00
</System.H1>
<br />
<br />
2021-07-07 23:50:57 +03:00
<System.P1>
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>
.
2021-07-07 23:50:57 +03:00
</System.P1>
2020-07-17 10:03:20 +03:00
<br />
<br />
<br />
<System.H2>Imports</System.H2>
<hr />
<br />
2021-07-07 23:50:57 +03:00
<System.P1>
Import React and the typography components. If needed, import the ViewSourceLink
component.
2021-07-07 23:50:57 +03:00
</System.P1>
2020-07-17 10:03:20 +03:00
<br />
<CodeBlock>
2021-07-07 23:50:57 +03:00
{`import { H1, H2, H3, H4, P1, UL, OL, LI, ViewSourceLink } from "slate-react-system";`}
</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 />
2021-07-07 23:50:57 +03:00
<System.P1 css={STYLES_BOLD}>This text is bold</System.P1>
<System.P1 css={STYLES_ITALIC}>This text is italic</System.P1>
<System.P1 css={STYLES_UNDERLINE}>This text is underlined</System.P1>
<br />
<br />
<CodeBlock>
2021-07-07 23:50:57 +03:00
{`<P1 css={STYLES_BOLD}>This text is bold</P1>
2021-07-07 23:50:57 +03:00
<P1 css={STYLES_ITALIC}>This text is italic</P1>
2021-07-07 23:50:57 +03:00
<P1 css={STYLES_UNDERLINE}>This text is underlined</P1>`}
</CodeBlock>
<br />
<br />
<System.H2>Typefaces</System.H2>
<hr />
<br />
<System.H3>Inter</System.H3>
2021-07-07 23:50:57 +03:00
<System.P1>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.P1>
<System.P1>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.P1>
<System.P1>0 1 2 3 4 5 6 7 8 9</System.P1>
<br />
2020-07-24 11:45:02 +03:00
<br />
<System.H3>Jet Brains</System.H3>
2021-07-07 23:50:57 +03:00
<System.P1 css={STYLES_TYPE_JETBRAINS}>
2020-07-24 11:45:02 +03:00
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
2021-07-07 23:50:57 +03:00
</System.P1>
<System.P1 css={STYLES_TYPE_JETBRAINS}>
2020-07-24 11:45:02 +03:00
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
2021-07-07 23:50:57 +03:00
</System.P1>
<System.P1 css={STYLES_TYPE_JETBRAINS}>0 1 2 3 4 5 6 7 8 9</System.P1>
<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 />
2021-07-07 23:50:57 +03:00
<System.P1>
2020-07-24 11:45:02 +03:00
Internal References{" "}
<a href="https://slate.host" target="_blank">
Link to a page
</a>
2021-07-07 23:50:57 +03:00
</System.P1>
<System.P1>
2021-03-08 13:13:56 +03:00
External References <System.ViewSourceLink file="system/typography.js" />
2021-07-07 23:50:57 +03:00
</System.P1>
2020-07-17 10:03:20 +03:00
<br />
<br />
<CodeBlock>
2021-07-07 23:50:57 +03:00
{`<P1>
2020-07-17 10:03:20 +03:00
<a href="https://slate.host"
target="_blank">
Link to a page
</a>
2021-07-07 23:50:57 +03:00
</P1>
2021-07-07 23:50:57 +03:00
<P1>
<ViewSourceLink file="system/typography.js" />
2021-07-07 23:50:57 +03:00
</P1>`}
</CodeBlock>
<br />
<br />
2020-07-17 10:03:20 +03:00
</SystemPage>
);
}
}