mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-30 02:12:38 +03:00
201 lines
5.3 KiB
JavaScript
201 lines
5.3 KiB
JavaScript
import * as React from "react";
|
|
import * as System from "~/components/system";
|
|
import * as Constants from "~/common/constants";
|
|
|
|
import { css } from "@emotion/react";
|
|
|
|
import SystemPage from "~/components/system/SystemPage";
|
|
import CodeBlock from "~/components/system/CodeBlock";
|
|
|
|
const STYLES_CSS_LABEL = css`
|
|
display: block;
|
|
letter-spacing: 0.2px;
|
|
font-size: 12px;
|
|
color: ${Constants.system.grayLight2};
|
|
margin-bottom: 8px;
|
|
`;
|
|
|
|
const STYLES_TYPE_JETBRAINS = css`
|
|
font-family: ${Constants.font.code};
|
|
`;
|
|
|
|
const STYLES_BOLD = css`
|
|
font-family: ${Constants.font.text};
|
|
font-weight: bold;
|
|
`;
|
|
|
|
const STYLES_ITALIC = css`
|
|
font-style: italic;
|
|
`;
|
|
|
|
const STYLES_UNDERLINE = css`
|
|
text-decoration: underline;
|
|
`;
|
|
|
|
export default class SystemPageTypography extends React.Component {
|
|
render() {
|
|
return (
|
|
<SystemPage
|
|
title="SDS: Typography"
|
|
description="..."
|
|
url="https://fps.onrender.com/system/typography"
|
|
>
|
|
<System.H1>
|
|
Typography <System.ViewSourceLink file="system/typography.js" />
|
|
</System.H1>
|
|
<br />
|
|
<br />
|
|
<System.P1>
|
|
The Filecoin Client uses{" "}
|
|
<a href="https://rsms.me/inter/" target="_blank">
|
|
Inter
|
|
</a>{" "}
|
|
and{" "}
|
|
<a href="https://www.jetbrains.com/lp/mono/" target="_blank">
|
|
Jet Brains
|
|
</a>
|
|
.
|
|
</System.P1>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<System.H2>Imports</System.H2>
|
|
<hr />
|
|
<br />
|
|
<System.P1>
|
|
Import React and the typography components. If needed, import the ViewSourceLink
|
|
component.
|
|
</System.P1>
|
|
<br />
|
|
<CodeBlock>
|
|
{`import { H1, H2, H3, H4, P1, UL, OL, LI, ViewSourceLink } from "slate-react-system";`}
|
|
</CodeBlock>
|
|
<br />
|
|
<br />
|
|
<System.H2>Typescale</System.H2>
|
|
<hr />
|
|
<br />
|
|
<span css={STYLES_CSS_LABEL}>1.953rem Semi Bold</span>
|
|
<System.H1>This is heading level 1</System.H1>
|
|
<br />
|
|
<span css={STYLES_CSS_LABEL}>1.563rem Medium</span>
|
|
<System.H2>This is heading level 2</System.H2>
|
|
<br />
|
|
<span css={STYLES_CSS_LABEL}>1.25rem Medium</span>
|
|
<System.H3>This is heading level 3</System.H3>
|
|
<br />
|
|
<span css={STYLES_CSS_LABEL}>1rem Medium</span>
|
|
<System.H4>This is heading level 4</System.H4>
|
|
<br />
|
|
<br />
|
|
<CodeBlock>
|
|
{`<H1>This is heading level 1</H1>
|
|
|
|
<H2>This is heading level 2</H2>
|
|
|
|
<H3>This is heading level 3</H3>
|
|
|
|
<H4>This is heading level 4</H4>`}
|
|
</CodeBlock>
|
|
<br />
|
|
<br />
|
|
<System.H2>Type Styles</System.H2>
|
|
<hr />
|
|
<br />
|
|
<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>
|
|
{`<P1 css={STYLES_BOLD}>This text is bold</P1>
|
|
|
|
<P1 css={STYLES_ITALIC}>This text is italic</P1>
|
|
|
|
<P1 css={STYLES_UNDERLINE}>This text is underlined</P1>`}
|
|
</CodeBlock>
|
|
<br />
|
|
<br />
|
|
<System.H2>Typefaces</System.H2>
|
|
<hr />
|
|
<br />
|
|
<System.H3>Inter</System.H3>
|
|
<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 />
|
|
<br />
|
|
<System.H3>Jet Brains</System.H3>
|
|
<System.P1 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.P1>
|
|
<System.P1 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.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>
|
|
{`<OL>
|
|
<LI>Rainbow</LI>
|
|
<LI>Cloud</LI>
|
|
<LI>Cake</LI>
|
|
</OL>
|
|
|
|
<UL>
|
|
<LI>Cloud</LI>
|
|
<LI>Cake</LI>
|
|
<LI>Rainbow</LI>
|
|
</UL>`}
|
|
</CodeBlock>
|
|
<br />
|
|
<br />
|
|
<System.H2>Hyperlinks</System.H2>
|
|
<hr />
|
|
<br />
|
|
<System.P1>
|
|
Internal References{" "}
|
|
<a href="https://slate.host" target="_blank">
|
|
Link to a page
|
|
</a>
|
|
</System.P1>
|
|
<System.P1>
|
|
External References <System.ViewSourceLink file="system/typography.js" />
|
|
</System.P1>
|
|
<br />
|
|
<br />
|
|
<CodeBlock>
|
|
{`<P1>
|
|
<a href="https://slate.host"
|
|
target="_blank">
|
|
Link to a page
|
|
</a>
|
|
</P1>
|
|
|
|
<P1>
|
|
<ViewSourceLink file="system/typography.js" />
|
|
</P1>`}
|
|
</CodeBlock>
|
|
<br />
|
|
<br />
|
|
</SystemPage>
|
|
);
|
|
}
|
|
}
|