2020-07-02 09:38:39 +03:00
|
|
|
import Head from "next/head";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
2020-07-02 09:38:39 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import * as SVG from "~/common/svg";
|
|
|
|
import * as Constants from "~/common/constants";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
2020-07-02 09:38:39 +03:00
|
|
|
import { css } from "@emotion/react";
|
2020-07-23 08:19:14 +03:00
|
|
|
import { GoogleScript } from "~/common/analytics";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
|
|
|
const STYLES_PAGE = css`
|
2020-06-22 14:00:51 +03:00
|
|
|
background-color: ${Constants.system.foreground};
|
2020-04-09 00:29:13 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_BODY = css`
|
|
|
|
max-width: 960px;
|
|
|
|
width: 100%;
|
|
|
|
margin: 0 auto 0 auto;
|
2020-07-21 02:51:16 +03:00
|
|
|
padding: 88px 24px 128px 336px;
|
2020-07-02 12:39:57 +03:00
|
|
|
|
|
|
|
@media (max-width: 568px) {
|
|
|
|
padding: 88px 24px 128px 24px;
|
|
|
|
}
|
2020-06-22 14:00:51 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_ICON_ELEMENT = css`
|
2020-07-29 02:40:16 +03:00
|
|
|
height: 48px;
|
|
|
|
width: 48px;
|
|
|
|
border-radius: 4px;
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
2020-06-22 14:00:51 +03:00
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
background-color: ${Constants.system.brand};
|
2020-07-23 08:19:14 +03:00
|
|
|
background-image: url("/static/social.png");
|
2020-07-21 04:45:21 +03:00
|
|
|
background-size: cover;
|
2020-06-22 14:00:51 +03:00
|
|
|
color: ${Constants.system.white};
|
|
|
|
user-select: none;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_SIDEBAR = css`
|
2020-07-29 02:40:16 +03:00
|
|
|
padding: 88px 24px 128px 24px;
|
2020-06-22 14:00:51 +03:00
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
2020-07-21 02:51:16 +03:00
|
|
|
width: 312px;
|
2020-06-22 14:00:51 +03:00
|
|
|
background-color: ${Constants.system.foreground};
|
|
|
|
overflow-y: scroll;
|
|
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
width: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
background: ${Constants.system.gray};
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
background: ${Constants.system.darkGray};
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
|
|
background: ${Constants.system.brand};
|
|
|
|
}
|
2020-07-02 12:39:57 +03:00
|
|
|
|
|
|
|
@media (max-width: 568px) {
|
|
|
|
width: 100%;
|
|
|
|
position: relative;
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
2020-06-22 14:00:51 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_LINK = css`
|
2020-07-02 11:24:14 +03:00
|
|
|
font-family: ${Constants.font.semiBold};
|
2020-06-22 14:00:51 +03:00
|
|
|
color: ${Constants.system.pitchBlack};
|
|
|
|
text-decoration: none;
|
|
|
|
font-weight: 400;
|
|
|
|
display: block;
|
|
|
|
margin-top: 8px;
|
|
|
|
|
|
|
|
:hover {
|
|
|
|
color: ${Constants.system.brand};
|
|
|
|
}
|
2020-06-30 21:44:12 +03:00
|
|
|
`;
|
2020-06-22 14:00:51 +03:00
|
|
|
|
2020-06-30 21:44:12 +03:00
|
|
|
const STYLES_LINK_ACTIVE = css`
|
2020-07-02 11:24:14 +03:00
|
|
|
font-family: ${Constants.font.semiBold};
|
2020-06-30 21:44:12 +03:00
|
|
|
color: ${Constants.system.brand};
|
|
|
|
text-decoration: none;
|
|
|
|
font-weight: 400;
|
|
|
|
display: block;
|
|
|
|
margin-top: 8px;
|
2020-06-22 14:00:51 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_DESCRIPTION = css`
|
|
|
|
font-weight: 400;
|
|
|
|
margin-top: 4px;
|
|
|
|
display: block;
|
|
|
|
margin-bottom: 16px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_LABEL = css`
|
2020-07-02 11:24:14 +03:00
|
|
|
font-family: ${Constants.font.semiBold};
|
2020-06-22 14:00:51 +03:00
|
|
|
display: block;
|
|
|
|
font-size: 11px;
|
|
|
|
text-transform: uppercase;
|
|
|
|
color: ${Constants.system.darkGray};
|
|
|
|
letter-spacing: 0.6px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const SidebarLink = (props) => {
|
|
|
|
return (
|
|
|
|
<React.Fragment>
|
2020-07-01 10:31:55 +03:00
|
|
|
<a
|
|
|
|
css={props.url.includes(props.href) ? STYLES_LINK_ACTIVE : STYLES_LINK}
|
|
|
|
href={props.href}
|
2020-07-02 09:38:39 +03:00
|
|
|
target={props.target}
|
|
|
|
>
|
2020-06-22 14:00:51 +03:00
|
|
|
{props.title}
|
|
|
|
</a>
|
2020-07-02 09:38:39 +03:00
|
|
|
{props.children ? (
|
|
|
|
<div css={STYLES_DESCRIPTION}>{props.children}</div>
|
|
|
|
) : null}
|
2020-06-22 14:00:51 +03:00
|
|
|
</React.Fragment>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
const STYLES_SMALL_LINK = css`
|
|
|
|
padding: 0 16px 0 0px;
|
|
|
|
font-size: 14px;
|
2020-07-02 09:38:39 +03:00
|
|
|
font-family: "inter-semi-bold";
|
2020-06-22 14:00:51 +03:00
|
|
|
margin-top: 11px;
|
|
|
|
color: #666;
|
|
|
|
transition: 200ms ease all;
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
:hover {
|
|
|
|
color: ${Constants.system.brand};
|
|
|
|
}
|
2020-04-09 00:29:13 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
export default class SystemPage extends React.Component {
|
|
|
|
render() {
|
|
|
|
const { title, description, url, children } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div css={STYLES_PAGE}>
|
|
|
|
<Head>
|
|
|
|
<title>{title}</title>
|
|
|
|
<meta name="title" content={title} />
|
|
|
|
<meta name="description" content={description} />
|
|
|
|
|
|
|
|
<meta property="og:type" content="website" />
|
|
|
|
<meta property="og:url" content={url} />
|
|
|
|
<meta property="og:title" content={title} />
|
|
|
|
<meta property="og:description" content={description} />
|
2020-07-21 04:45:21 +03:00
|
|
|
<meta property="og:image" content="/static/social.png" />
|
2020-04-09 00:29:13 +03:00
|
|
|
|
|
|
|
<meta property="twitter:card" content="summary_large_image" />
|
|
|
|
<meta property="twitter:url" content={url} />
|
|
|
|
<meta property="twitter:title" content={title} />
|
|
|
|
<meta property="twitter:description" content={description} />
|
2020-07-21 04:45:21 +03:00
|
|
|
<meta property="twitter:image" content="/static/social.png" />
|
2020-04-09 00:29:13 +03:00
|
|
|
|
2020-07-02 09:38:39 +03:00
|
|
|
<link
|
|
|
|
rel="icon"
|
|
|
|
type="image/png"
|
|
|
|
sizes="32x32"
|
|
|
|
href="/static/favicon-32x32.png"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="icon"
|
|
|
|
type="image/png"
|
|
|
|
sizes="96x96"
|
|
|
|
href="/static/favicon-96x96.png"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="icon"
|
|
|
|
type="image/png"
|
|
|
|
sizes="16x16"
|
|
|
|
href="/static/favicon-16x16.png"
|
|
|
|
/>
|
2020-04-09 00:29:13 +03:00
|
|
|
|
|
|
|
<link rel="shortcut icon" href="/static/favicon.ico" />
|
2020-07-23 08:19:14 +03:00
|
|
|
|
|
|
|
<GoogleScript id="UA-52930282-7" />
|
2020-04-09 00:29:13 +03:00
|
|
|
</Head>
|
2020-07-02 12:39:57 +03:00
|
|
|
<div css={STYLES_BODY}>{children}</div>
|
2020-06-22 14:00:51 +03:00
|
|
|
<div css={STYLES_SIDEBAR}>
|
2020-07-11 00:02:10 +03:00
|
|
|
<a css={STYLES_ICON_ELEMENT} href="/system" />
|
2020-06-22 14:00:51 +03:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
|
2020-07-01 10:31:55 +03:00
|
|
|
<span css={STYLES_LABEL}>Experiences</span>
|
2020-07-02 09:38:39 +03:00
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
|
|
|
href="/experiences/create-address"
|
2020-07-16 20:41:49 +03:00
|
|
|
title="CreateFilecoinAddress"
|
2020-07-02 09:38:39 +03:00
|
|
|
/>
|
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
|
|
|
href="/experiences/make-storage-deal"
|
2020-07-16 20:41:49 +03:00
|
|
|
title="CreateFilecoinStorageDeal"
|
2020-07-02 09:38:39 +03:00
|
|
|
/>
|
2020-07-06 23:29:17 +03:00
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
|
|
|
href="/experiences/generate-powergate-token"
|
2020-07-16 20:41:49 +03:00
|
|
|
title="CreateToken"
|
2020-07-06 23:29:17 +03:00
|
|
|
/>
|
2020-07-10 08:30:52 +03:00
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
2020-07-16 20:41:49 +03:00
|
|
|
href="/experiences/filecoin-wallet-balances"
|
|
|
|
title="FilecoinBalancesList"
|
2020-07-10 08:30:52 +03:00
|
|
|
/>
|
2020-07-10 09:12:54 +03:00
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
2020-07-28 23:27:53 +03:00
|
|
|
href="/experiences/list-filecoin-deals"
|
|
|
|
title="FilecoinDealsList"
|
2020-07-16 20:41:49 +03:00
|
|
|
/>
|
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
2020-07-28 23:27:53 +03:00
|
|
|
href="/experiences/filecoin-settings"
|
|
|
|
title="FilecoinSettings"
|
2020-07-10 09:12:54 +03:00
|
|
|
/>
|
2020-07-19 07:47:19 +03:00
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
2020-07-28 23:27:53 +03:00
|
|
|
href="/experiences/peers-list"
|
|
|
|
title="PeersList"
|
2020-07-19 07:47:19 +03:00
|
|
|
/>
|
2020-07-23 06:42:22 +03:00
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
2020-07-28 23:27:53 +03:00
|
|
|
href="/experiences/send-address-filecoin"
|
|
|
|
title="SendAddressFilecoin"
|
2020-07-23 06:42:22 +03:00
|
|
|
/>
|
2020-06-22 14:00:51 +03:00
|
|
|
|
|
|
|
<span css={STYLES_LABEL}>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
Components
|
|
|
|
</span>
|
2020-07-02 09:38:39 +03:00
|
|
|
<SidebarLink url={url} href="/system/buttons" title="Buttons" />
|
2020-07-28 23:27:53 +03:00
|
|
|
<SidebarLink url={url} href="/system/card-tabs" title="Card Tabs" />
|
|
|
|
<SidebarLink url={url} href="/system/carousel" title="Carousel" />
|
2020-07-02 09:38:39 +03:00
|
|
|
<SidebarLink url={url} href="/system/checkboxes" title="Checkboxes" />
|
2020-07-28 23:27:53 +03:00
|
|
|
<SidebarLink url={url} href="/system/colors" title="Colors" />
|
2020-07-07 04:14:30 +03:00
|
|
|
<SidebarLink url={url} href="/system/datepicker" title="Datepicker" />
|
2020-07-28 23:27:53 +03:00
|
|
|
<SidebarLink url={url} href="/system/dropdowns" title="Dropdowns" />
|
|
|
|
<SidebarLink url={url} href="/system/globe" title="Globe" />
|
|
|
|
<SidebarLink url={url} href="/system/icons" title="Icons" />
|
|
|
|
<SidebarLink url={url} href="/system/inputs" title="Inputs" />
|
2020-07-23 08:19:14 +03:00
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
|
|
|
href="/system/list-editor"
|
|
|
|
title="List Editor"
|
|
|
|
/>
|
2020-07-28 23:27:53 +03:00
|
|
|
<SidebarLink url={url} href="/system/loaders" title="Loaders" />
|
|
|
|
<SidebarLink url={url} href="/system/modals" title="Modals" />
|
2020-07-23 08:19:14 +03:00
|
|
|
<SidebarLink
|
|
|
|
url={url}
|
|
|
|
href="/system/notifications"
|
|
|
|
title="Notifications"
|
|
|
|
/>
|
2020-07-28 23:27:53 +03:00
|
|
|
<SidebarLink url={url} href="/system/radios" title="Radios" />
|
|
|
|
<SidebarLink url={url} href="/system/sliders" title="Sliders" />
|
|
|
|
<SidebarLink url={url} href="/system/stats" title="Stats" />
|
|
|
|
<SidebarLink url={url} href="/system/tables" title="Tables" />
|
|
|
|
<SidebarLink url={url} href="/system/tabs" title="Tabs" />
|
|
|
|
<SidebarLink url={url} href="/system/toggles" title="Toggles" />
|
|
|
|
<SidebarLink url={url} href="/system/tooltips" title="Tooltips" />
|
2020-07-17 10:03:20 +03:00
|
|
|
<SidebarLink url={url} href="/system/typography" title="Typography" />
|
2020-06-22 14:00:51 +03:00
|
|
|
|
|
|
|
<div
|
|
|
|
css={STYLES_SMALL_LINK}
|
2020-07-02 09:38:39 +03:00
|
|
|
style={{ marginTop: 48 }}
|
2020-06-22 14:00:51 +03:00
|
|
|
onClick={() => {
|
2020-07-07 09:22:06 +03:00
|
|
|
window.open("https://github.com/filecoin-project/slate");
|
2020-07-02 09:38:39 +03:00
|
|
|
}}
|
|
|
|
>
|
2020-06-22 14:28:14 +03:00
|
|
|
<SVG.ExpandBox height="12px" style={{ marginRight: 10 }} />
|
|
|
|
View source
|
|
|
|
</div>
|
2020-06-24 12:45:44 +03:00
|
|
|
<div
|
|
|
|
css={STYLES_SMALL_LINK}
|
|
|
|
onClick={() => {
|
2020-07-02 09:38:39 +03:00
|
|
|
window.open(
|
|
|
|
"https://github.com/filecoin-shipyard/js-lotus-client"
|
|
|
|
);
|
|
|
|
}}
|
|
|
|
>
|
2020-06-24 12:45:44 +03:00
|
|
|
<SVG.ExpandBox height="12px" style={{ marginRight: 10 }} />
|
|
|
|
JS Lotus Client
|
|
|
|
</div>
|
2020-06-22 14:28:14 +03:00
|
|
|
<div
|
|
|
|
css={STYLES_SMALL_LINK}
|
|
|
|
onClick={() => {
|
2020-07-02 09:38:39 +03:00
|
|
|
window.open("https://github.com/textileio/js-powergate-client");
|
|
|
|
}}
|
|
|
|
>
|
2020-06-22 14:28:14 +03:00
|
|
|
<SVG.ExpandBox height="12px" style={{ marginRight: 10 }} />
|
|
|
|
JS Powergate Client
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
css={STYLES_SMALL_LINK}
|
|
|
|
onClick={() => {
|
2020-07-02 09:38:39 +03:00
|
|
|
window.open("https://docs.textile.io/");
|
|
|
|
}}
|
|
|
|
>
|
2020-06-22 14:28:14 +03:00
|
|
|
<SVG.ExpandBox height="12px" style={{ marginRight: 10 }} />
|
|
|
|
Textile Documentation
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
css={STYLES_SMALL_LINK}
|
|
|
|
onClick={() => {
|
2020-07-02 09:38:39 +03:00
|
|
|
window.open("https://docs.lotu.sh/");
|
|
|
|
}}
|
|
|
|
>
|
2020-06-22 14:28:14 +03:00
|
|
|
<SVG.ExpandBox height="12px" style={{ marginRight: 10 }} />
|
|
|
|
Lotus Documentation
|
2020-06-22 14:00:51 +03:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
css={STYLES_SMALL_LINK}
|
|
|
|
onClick={() => {
|
2020-07-02 09:38:39 +03:00
|
|
|
window.open("https://docs.filecoin.io/");
|
|
|
|
}}
|
|
|
|
>
|
2020-06-22 14:28:14 +03:00
|
|
|
<SVG.ExpandBox height="12px" style={{ marginRight: 10 }} />
|
|
|
|
Filecoin Documentation
|
2020-06-22 14:00:51 +03:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
css={STYLES_SMALL_LINK}
|
|
|
|
onClick={() => {
|
2020-07-02 09:38:39 +03:00
|
|
|
window.open("https://filecoin.io/#community");
|
|
|
|
}}
|
|
|
|
>
|
2020-06-22 14:28:14 +03:00
|
|
|
<SVG.ExpandBox height="12px" style={{ marginRight: 10 }} />
|
2020-06-22 14:00:51 +03:00
|
|
|
Community
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-09 00:29:13 +03:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|