slate/pages/index.js

501 lines
14 KiB
JavaScript
Raw Normal View History

2020-07-09 06:19:08 +03:00
import * as React from "react";
2020-07-16 08:48:51 +03:00
import * as Constants from "~/common/constants";
2020-07-09 06:19:08 +03:00
import WebsitePrototypeWrapper from "~/components/core/WebsitePrototypeWrapper";
2021-06-09 01:53:30 +03:00
import WebsitePrototypeHeader from "~/components/core/NewWebsitePrototypeHeader";
import WebsitePrototypeFooter from "~/components/core/NewWebsitePrototypeFooter";
2020-11-30 08:24:22 +03:00
import { css } from "@emotion/react";
2020-12-01 21:12:22 +03:00
import { ButtonPrimary } from "~/components/system/components/Buttons";
const USER_SLATES = [
{
2020-12-14 02:51:13 +03:00
name: "Architecture",
url: "https://slate.host/cw/architecture",
username: "@cw",
2020-10-07 23:54:53 +03:00
preview:
2020-12-14 02:51:13 +03:00
"https://slate.textile.io/ipfs/bafybeiee6hshzmxfafytbtnnx3fawrhiq5qflz5pmpsaelq7jrchgkwk2m",
},
{
name: "Oldschool PC font",
url: "https://slate.host/int10h/oldschool-pc-font-aspect-corrected",
username: "@int10h",
2020-10-07 23:54:53 +03:00
preview:
2021-04-24 05:59:06 +03:00
"https://slate.textile.io/ipfs/bafkreieessvfn3ozxgaktvfaodvnqnh3g2rpert4h3mfsynrrgazc43ljq",
},
{
2020-10-06 22:16:21 +03:00
name: "Cartography",
url: "https://slate.host/atlas/cartography",
username: "@atlas",
2020-10-07 23:54:53 +03:00
preview:
"https://slate.textile.io/ipfs/bafybeihfrqvfcetmeimpfbacf2tntlgg3xbvgxekoti4tdz2ketczlqp2a",
},
{
2020-12-14 02:51:13 +03:00
name: "Retro Japanese Toy Advertisements",
url: "https://slate.host/haris/retro-japanese-toy-advertisements",
username: "@haris",
2020-10-07 23:54:53 +03:00
preview:
2020-12-14 02:51:13 +03:00
"https://slate.textile.io/ipfs/bafybeibtftpdszmwgg6mzagjkz6jyja2obeujujgdmzlx5yhr7gaeub7da",
},
{
2020-10-07 23:54:53 +03:00
name: "Get started with Slate →",
2020-10-06 22:16:21 +03:00
url: "/_",
username: "",
preview: "",
2021-07-07 22:14:51 +03:00
style: { backgroundColor: Constants.system.blue, color: Constants.system.white },
},
{
2020-12-14 02:51:13 +03:00
name: "Cryptovoxels History",
url: "https://slate.host/jin/cryptovoxels-history",
username: "@jin",
2020-10-07 23:54:53 +03:00
preview:
2020-12-14 02:51:13 +03:00
"https://slate.textile.io/ipfs/bafybeibuva545milenwi72roifwdssgchkpqyl4auuavyqjkhujixlvxjm",
},
{
2020-10-06 22:16:21 +03:00
name: "American currency",
url: "https://slate.host/harvardmuseum/american-currency",
username: "@harvardmuseum",
2020-10-07 23:54:53 +03:00
preview:
"https://slate.textile.io/ipfs/bafybeifmf4ibwik5fepgjodfzalzfdgjgvgevmn5av3xbwhoj64kvnu5te",
},
{
2020-10-06 22:16:21 +03:00
name: "Andrew Garrett's Fish of the South Seas 1909-1910",
url: "https://slate.host/biodivlibrary/andrew-garrett-s-fische-der-suedsee-bd-3",
username: "@biodiversity",
2020-10-07 23:54:53 +03:00
preview:
"https://slate.textile.io/ipfs/bafybeicckw3yjfidmihhzkzmwyqcjius54rt2swtala24taizwznqnx3mu",
},
{
name: "Papers",
url: "https://slate.host/slate/papers",
2020-10-06 22:16:21 +03:00
username: "@slate",
2020-10-07 23:54:53 +03:00
preview:
"https://slate.textile.io/ipfs/bafkreif7l2vxkvdyrydcjwjjrrmqq73id3tdrdkf3z54tp2fotc75wkdwm",
},
];
2020-07-16 08:48:51 +03:00
const STYLES_ROOT = css`
2020-10-06 22:16:21 +03:00
padding: 0 88px;
margin: -88px auto 0 auto;
width: 100%;
2021-07-07 22:58:14 +03:00
background-color: ${Constants.system.grayLight6};
2020-10-06 22:16:21 +03:00
@media (max-width: ${Constants.sizes.mobile}px) {
padding: 48px 24px 0 24px;
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_CONTAINER = css`
max-width: 1440px;
width: 100%;
2020-10-06 22:16:21 +03:00
margin: 0 auto;
2020-07-16 08:48:51 +03:00
`;
2020-10-06 22:16:21 +03:00
const STYLES_H1 = css`
2020-09-13 05:47:06 +03:00
font-family: ${Constants.font.medium};
font-weight: 400;
2020-10-06 22:16:21 +03:00
font-size: ${Constants.typescale.lvl4};
letter-spacing: -0.022rem;
line-height: 1.3;
2021-07-07 22:58:14 +03:00
color: ${Constants.system.grayDark6};
2020-10-06 22:16:21 +03:00
margin-bottom: 16px;
@media (max-width: ${Constants.sizes.tablet}px) {
font-size: ${Constants.typescale.lvl3};
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_P = css`
font-family: ${Constants.font.text};
2020-09-13 05:47:06 +03:00
font-weight: 400;
2020-10-06 22:16:21 +03:00
font-size: ${Constants.typescale.lvl1};
letter-spacing: -0.011rem;
line-height: 1.5;
2020-10-06 22:16:21 +03:00
margin: 4px 0 0 0;
2021-07-07 22:58:14 +03:00
color: ${Constants.system.grayDark6};
2020-10-06 22:16:21 +03:00
width: 64%;
@media (max-width: ${Constants.sizes.tablet}px) {
2020-10-06 22:16:21 +03:00
width: 100%;
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_TEXT_BLOCK = css`
display: block;
width: 50%;
@media (max-width: ${Constants.sizes.mobile}px) {
2020-10-06 22:16:21 +03:00
width: 100%;
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_TEXT_BLOCK_CENTER = css`
display: block;
2020-12-01 21:12:22 +03:00
margin: 0 auto 80px auto;
2020-10-06 22:16:21 +03:00
width: 50%;
text-align: center;
@media (max-width: ${Constants.sizes.mobile}px) {
2020-12-01 21:12:22 +03:00
margin: 48px auto 64px auto;
2020-10-06 22:16:21 +03:00
width: 100%;
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_SECTION_WRAPPER = css`
max-width: 1440px;
width: 100%;
height: 100%;
padding: 120px 0;
display: flex;
2020-10-06 22:16:21 +03:00
align-items: flex-start;
2020-10-06 22:16:21 +03:00
@media (max-width: ${Constants.sizes.tablet}px) {
padding: 88px 0;
}
@media (max-width: ${Constants.sizes.mobile}px) {
2020-10-06 22:16:21 +03:00
padding: 48px 0;
display: block;
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_SECTIONCTA_WRAPPER = css`
padding: 88px 0 240px 0;
width: 100%;
2020-10-06 22:16:21 +03:00
height: 100%;
@media (max-width: ${Constants.sizes.tablet}px) {
2020-10-06 22:16:21 +03:00
padding: 48px 0 160px 0;
}
@media (max-width: ${Constants.sizes.mobile}px) {
2020-10-06 22:16:21 +03:00
padding: 0 0px 88px 0px;
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_LINK = css`
2021-07-07 22:14:51 +03:00
color: ${Constants.system.blue};
2020-10-06 22:16:21 +03:00
text-decoration: none;
transition: 200ms ease none;
font-family: ${Constants.font.medium};
font-weight: 400;
font-size: ${Constants.typescale.lvl1};
letter-spacing: -0.011rem;
line-height: 1.5;
margin: 4px 0 0 0;
2020-10-06 22:16:21 +03:00
:hover {
opacity: 0.9;
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_LIST = css`
list-style-type: none;
font-family: ${Constants.font.medium};
font-weight: 400;
font-size: ${Constants.typescale.lvl1};
letter-spacing: -0.011rem;
line-height: 1.5;
margin: 4px 0 0 0;
2021-07-07 22:58:14 +03:00
color: ${Constants.system.grayDark6};
2020-09-07 01:18:40 +03:00
padding: 0;
`;
2020-10-06 22:16:21 +03:00
const STYLES_HIGHLIGHT_GREEN = css`
2021-07-07 22:14:51 +03:00
color: ${Constants.system.green};
2020-07-16 08:48:51 +03:00
`;
2020-10-06 22:16:21 +03:00
const STYLES_HIGHLIGHT_YELLOW = css`
2021-07-07 22:14:51 +03:00
color: ${Constants.system.yellow};
`;
2020-10-06 22:16:21 +03:00
const STYLES_HIGHLIGHT_BLUE = css`
2021-07-07 22:14:51 +03:00
color: ${Constants.system.blue};
`;
2020-10-06 22:16:21 +03:00
const STYLES_HIGHLIGHT_RED = css`
2021-07-07 22:14:51 +03:00
color: ${Constants.system.red};
`;
2020-10-06 22:16:21 +03:00
const STYLES_HR_GREEN = css`
border: 0;
2021-07-07 22:14:51 +03:00
border-top: 1px solid ${Constants.system.green};
2020-10-06 22:16:21 +03:00
@media (max-width: ${Constants.sizes.mobile}px) {
margin-left: 0;
width: 10%;
2021-07-07 22:14:51 +03:00
border-top: 2px solid ${Constants.system.green};
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_HR_YELLOW = css`
border: 0;
2021-07-07 22:14:51 +03:00
border-top: 1px solid ${Constants.system.yellow};
@media (max-width: ${Constants.sizes.mobile}px) {
2020-10-06 22:16:21 +03:00
margin-left: 0;
width: 10%;
2021-07-07 22:14:51 +03:00
border-top: 2px solid ${Constants.system.yellow};
}
2020-07-16 08:48:51 +03:00
`;
2020-10-06 22:16:21 +03:00
const STYLES_IMG = css`
width: 100%;
margin: 48px -88px 0 0;
overflow: hidden;
box-shadow: 0px 10px 50px 20px rgba(0, 0, 0, 0.2);
`;
2020-10-08 03:45:09 +03:00
const STYLES_IMG_WEB = css`
${STYLES_IMG}
margin: 48px auto;
@media (max-width: ${Constants.sizes.mobile}px) {
display: none;
}
`;
const STYLES_IMG_MOBILE = css`
${STYLES_IMG}
margin: 48px auto;
display: none;
@media (max-width: ${Constants.sizes.mobile}px) {
display: block;
}
`;
const STYLES_SLATE_CARD_GROUP = css`
2020-10-06 22:16:21 +03:00
width: 100%;
display: flex;
flex-wrap: wrap;
margin-top: 48px;
`;
const STYLES_SLATE_CARD = css`
2020-10-06 22:16:21 +03:00
width: calc(33.33% - 1px);
height: 20vh;
margin: -1px -1px 0 0;
transition: 200ms ease box-shadow;
2021-07-07 22:58:14 +03:00
border: 1px solid ${Constants.system.grayLight2};
:hover {
transition: 200ms ease box-shadow;
box-shadow: 0px 10px 40px 20px rgba(0, 0, 0, 0.1);
}
@media (max-width: ${Constants.sizes.mobile}px) {
2020-10-06 22:16:21 +03:00
width: 100%;
height: 10vh;
}
`;
2020-10-06 22:16:21 +03:00
const STYLES_SLATE_CARD_LINK = css`
text-decoration: none;
`;
const STYLES_SLATE_CARD_TEXT = css`
display: flex;
justify-content: space-between;
2020-10-06 22:16:21 +03:00
padding: 8px 16px;
width: 100%;
2020-10-06 22:16:21 +03:00
height: 100%;
`;
2020-10-06 22:16:21 +03:00
const STYLES_CARDP = css`
font-family: ${Constants.font.text};
font-weight: 400;
font-size: ${Constants.typescale.lvl1};
letter-spacing: -0.011rem;
line-height: 1.5;
margin: 4px 0 0 0;
2021-07-07 22:58:14 +03:00
color: ${Constants.system.grayDark6};
2020-10-06 22:16:21 +03:00
@media (max-width: ${Constants.sizes.tablet}px) {
font-size: ${Constants.typescale.lvl0};
}
`;
2020-10-06 22:16:21 +03:00
const SlateCard = (props) => {
return (
2020-10-06 22:16:21 +03:00
<div css={STYLES_SLATE_CARD} style={props.style}>
<a css={STYLES_SLATE_CARD_LINK} href={props.url} target="_blank">
<div
css={css`
transition: 200ms ease all;
height: 100%;
background-color: transparent;
background-position: 50% 50%;
background-size: cover;
:hover {
background-image: url("${props.preview}");
opacity: 0.9;
}
`}
>
<div css={STYLES_SLATE_CARD_TEXT}>
2020-10-08 07:55:44 +03:00
<p css={STYLES_CARDP} style={{ ...props.style, paddingRight: 16 }}>
2020-10-06 22:16:21 +03:00
{props.name}
</p>
<p css={STYLES_CARDP} style={{ opacity: 0.7 }}>{`${props.username}`}</p>
</div>
2020-10-06 22:16:21 +03:00
</div>
</a>
</div>
);
};
2020-02-19 09:30:47 +03:00
export default class IndexPage extends React.Component {
render() {
2020-07-16 08:48:51 +03:00
const title = `Slate`;
2020-10-07 23:54:53 +03:00
const description =
"Welcome to the future of file sharing. Powered by Textile, Filecoin, and IPFS.";
2020-07-16 08:48:51 +03:00
const url = "https://slate.host";
2020-10-07 23:54:53 +03:00
const image =
"https://slate.textile.io/ipfs/bafkreiddhzzwu5l6i7cikmydvumgnqwoml4rsurzftkopcvgcnwhndo7fa";
2020-02-19 09:30:47 +03:00
return (
2020-10-07 23:54:53 +03:00
<WebsitePrototypeWrapper title={title} description={description} url={url} image={image}>
<WebsitePrototypeHeader />
<div css={STYLES_ROOT}>
2020-10-06 22:16:21 +03:00
<div css={STYLES_CONTAINER}>
<div css={STYLES_SECTION_WRAPPER} style={{ display: `block` }}>
<div css={STYLES_TEXT_BLOCK_CENTER}>
<h1 css={STYLES_H1} style={{ width: `100%` }}>
2020-10-08 00:01:41 +03:00
Use <span css={STYLES_HIGHLIGHT_BLUE}>decentralized storage</span>
2020-10-06 22:16:21 +03:00
</h1>
<p css={STYLES_P} style={{ width: `100%` }}>
2020-10-07 23:54:53 +03:00
Slate is a new file-sharing network that makes it possible for people to collect,
organize, and link files together.
2020-10-06 22:16:21 +03:00
</p>
2020-12-01 21:12:22 +03:00
<br />
2021-06-09 01:53:30 +03:00
<a style={{ textDecoration: `none` }} href="/_">
<ButtonPrimary>Try it out</ButtonPrimary>
2020-12-01 21:12:22 +03:00
</a>
2020-09-13 00:21:24 +03:00
</div>
2020-12-01 21:12:22 +03:00
<video
width="100%"
loop={true}
autoPlay={false}
2020-12-01 21:12:22 +03:00
src="https://slate.textile.io/ipfs/bafybeie6w5nljl3apsby7wuaanq7k34qavcv2g77c3cqp2fwdpqqsg7my4"
type="video/mp4"
muted={true}
playsInline={true}
2020-12-01 21:12:22 +03:00
style={{
backgroundImage: `url('https://slate.textile.io/ipfs/bafybeifgbcn4b6somtwbraiuz4ujoyuycp4hq5kqp47glyjit4a2gtuzje')`,
borderRadius: `4px`,
width: `100%`,
boxShadow: `0px 10px 50px 20px rgba(0, 0, 0, 0.1)`,
backgroundSize: `cover`,
}}
/>
</div>
2020-10-06 22:16:21 +03:00
<div css={STYLES_SECTION_WRAPPER}>
<div css={STYLES_TEXT_BLOCK}>
2020-10-08 03:45:09 +03:00
<h2 css={STYLES_H1}>
2020-10-07 23:54:53 +03:00
<span css={STYLES_HIGHLIGHT_GREEN}>Store, annotate, cite, and link</span> <br />
2020-10-06 22:16:21 +03:00
your files
2020-10-08 03:45:09 +03:00
</h2>
2020-10-06 22:16:21 +03:00
<p css={STYLES_P} style={{ opacity: 0.7 }}>
2020-10-08 07:55:44 +03:00
Slate is a new home for information that matters to you.
2020-10-06 22:16:21 +03:00
</p>
<br />
<hr css={STYLES_HR_GREEN} />
<ul css={STYLES_LIST}>
<li>Books</li>
<li>White papers</li>
<li>Writing notes</li>
<li>Films</li>
<li>Videos</li>
<li>Photographs</li>
<li>Illustrations</li>
<li>Data graphs</li>
<li>Maps</li>
<li>Designs</li>
<li>Music albums</li>
<li>Podcasts</li>
<li>Games</li>
<li>Code</li>
</ul>
</div>
<img
css={STYLES_IMG}
src="https://slate.textile.io/ipfs/bafybeidagkcnwti4ndspssvfzquuqfdib5ak2yq4kghdfcsybahm2v64me"
/>
2020-09-13 00:21:24 +03:00
</div>
2020-10-06 22:16:21 +03:00
<div css={STYLES_SECTION_WRAPPER}>
<div css={STYLES_TEXT_BLOCK}>
2020-10-08 03:45:09 +03:00
<h2 css={STYLES_H1}>
<span css={STYLES_HIGHLIGHT_YELLOW}>Collect, organize and share</span> <br />
your collections
2020-10-08 03:45:09 +03:00
</h2>
2020-10-06 22:16:21 +03:00
<p css={STYLES_P} style={{ opacity: 0.7 }}>
2020-10-08 07:55:44 +03:00
A modular interface for your files, an interface that gives you complete
flexibility.
2020-10-06 22:16:21 +03:00
</p>
<br />
<hr css={STYLES_HR_YELLOW} />
<ul css={STYLES_LIST}>
2020-10-08 03:45:09 +03:00
<li>Arrange moodboards</li>
2020-10-06 22:16:21 +03:00
<li>Organize research</li>
2020-10-08 03:45:09 +03:00
<li>Share presentations</li>
2020-10-06 22:16:21 +03:00
</ul>
</div>
<img
css={STYLES_IMG}
style={{ boxShadow: `0px 4px 100px 10px rgba(0, 0, 0, 0.1)` }}
src="https://slate.textile.io/ipfs/bafybeihihnvl4gzh6vysjwwhzo2i4f5ed7qrh4e4iwaz7y6b3ua3hb5upm"
/>
</div>
2020-10-06 22:16:21 +03:00
<div css={STYLES_SECTION_WRAPPER} style={{ display: `block` }}>
2020-10-08 03:45:09 +03:00
<h2 css={STYLES_H1}>
2020-10-06 22:16:21 +03:00
<span css={STYLES_HIGHLIGHT_RED}>Connect to think, learn and discuss </span> <br />
with others
2020-10-08 03:45:09 +03:00
</h2>
2020-10-06 22:16:21 +03:00
<div css={STYLES_TEXT_BLOCK}>
<p css={STYLES_P} style={{ opacity: 0.7 }}>
2020-10-08 07:55:44 +03:00
Connect with trusted peers and use Slate as a space to think together.
2020-10-06 22:16:21 +03:00
</p>
</div>
<img
2020-10-08 03:45:09 +03:00
css={STYLES_IMG_WEB}
style={{ boxShadow: `none` }}
2020-10-08 04:02:43 +03:00
src="https://slate.textile.io/ipfs/bafkreigygwwhu35cynyg7b53l3e6qkp3qxu7yytr46uldnpjgs23ml3bli"
2020-10-06 22:16:21 +03:00
/>
2020-10-08 03:45:09 +03:00
<img
css={STYLES_IMG_MOBILE}
style={{ boxShadow: `none` }}
2020-10-08 04:02:43 +03:00
src="https://slate.textile.io/ipfs/bafybeid6li7wgf42dls6m355k3362qrbp3omwisisawfg3u7uggpcqyhk4"
2020-10-08 03:45:09 +03:00
/>
</div>
2020-10-06 22:16:21 +03:00
<div css={STYLES_SECTIONCTA_WRAPPER}>
<div css={STYLES_TEXT_BLOCK_CENTER}>
2020-10-08 03:45:09 +03:00
<h2 css={STYLES_H1}>
<span css={STYLES_HIGHLIGHT_BLUE}>Get started with Slate</span> <br />
2020-10-06 22:16:21 +03:00
to experience the file sharing network
2020-10-08 03:45:09 +03:00
</h2>
2020-10-06 22:16:21 +03:00
<br />
</div>
2020-12-01 02:37:07 +03:00
<div css={STYLES_SLATE_CARD_GROUP}>
{USER_SLATES.map((each) => (
<SlateCard
key={each.name}
preview={each.preview}
url={each.url}
name={each.name}
username={each.username}
style={each.style}
/>
))}
2020-10-06 22:16:21 +03:00
</div>
</div>
2020-09-09 17:35:28 +03:00
</div>
2020-07-16 08:48:51 +03:00
</div>
<WebsitePrototypeFooter />
2020-07-16 08:48:51 +03:00
</WebsitePrototypeWrapper>
2020-02-19 09:30:47 +03:00
);
}
}