mirror of
https://github.com/status-im/pluto.git
synced 2025-02-25 00:48:16 +00:00
141 lines
3.3 KiB
JavaScript
141 lines
3.3 KiB
JavaScript
/**
|
|
* Copyright (c) 2017-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
const React = require('react');
|
|
|
|
const CompLibrary = require('../../core/CompLibrary.js');
|
|
const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
|
|
const Container = CompLibrary.Container;
|
|
const GridBlock = CompLibrary.GridBlock;
|
|
|
|
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
|
|
|
function imgUrl(img) {
|
|
return siteConfig.baseUrl + 'img/' + img;
|
|
}
|
|
|
|
function docUrl(doc, language) {
|
|
return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
|
|
}
|
|
|
|
function pageUrl(page, language) {
|
|
return siteConfig.baseUrl + (language ? language + '/' : '') + page;
|
|
}
|
|
|
|
class Button extends React.Component {
|
|
render() {
|
|
return (
|
|
<div className="pluginWrapper buttonWrapper">
|
|
<a className="button" href={this.props.href} target={this.props.target}>
|
|
{this.props.children}
|
|
</a>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
Button.defaultProps = {
|
|
target: '_self',
|
|
};
|
|
|
|
const SplashContainer = props => (
|
|
<div className="homeContainer">
|
|
<div className="homeSplashFade">
|
|
<div className="wrapper homeWrapper">{props.children}</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
|
|
const Logo = props => (
|
|
<div className="projectLogo">
|
|
<img src={props.img_src} />
|
|
</div>
|
|
);
|
|
|
|
const ProjectTitle = props => (
|
|
<h2 className="projectTitle">
|
|
{siteConfig.title}
|
|
<small>{siteConfig.tagline}</small>
|
|
</h2>
|
|
);
|
|
|
|
const PromoSection = props => (
|
|
<div className="section promoSection">
|
|
<div className="promoRow">
|
|
<div className="pluginRowBlock">{props.children}</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
|
|
class HomeSplash extends React.Component {
|
|
render() {
|
|
let language = this.props.language || '';
|
|
return (
|
|
<SplashContainer>
|
|
<div className="inner">
|
|
<ProjectTitle />
|
|
<PromoSection>
|
|
<Button href={docUrl('Manifesto', language)}>Getting started</Button>
|
|
<Button href={docUrl('Roadmap', language)}>Roadmap</Button>
|
|
</PromoSection>
|
|
</div>
|
|
</SplashContainer>
|
|
);
|
|
}
|
|
}
|
|
|
|
const Block = props => (
|
|
<Container
|
|
padding={['bottom', 'top']}
|
|
id={props.id}
|
|
background={props.background}>
|
|
<GridBlock align="center" contents={props.children} layout={props.layout} />
|
|
</Container>
|
|
);
|
|
|
|
const Features = props => (
|
|
<Block layout="fourColumn">
|
|
{[
|
|
{
|
|
content: 'Simple model: static UI definition, queries and events',
|
|
//image: imgUrl('docusaurus.svg'),
|
|
imageAlign: 'top',
|
|
title: 'Unidirectional flow',
|
|
},
|
|
{
|
|
content: 'Fine grain permission model - pure data',
|
|
//image: imgUrl('docusaurus.svg'),
|
|
imageAlign: 'top',
|
|
title: 'Security and privacy first',
|
|
},
|
|
{
|
|
content: 'Great performance, smooth ',
|
|
//image: imgUrl('docusaurus.svg'),
|
|
imageAlign: 'top',
|
|
title: 'Native UX',
|
|
},
|
|
]}
|
|
</Block>
|
|
);
|
|
|
|
class Index extends React.Component {
|
|
render() {
|
|
let language = this.props.language || '';
|
|
|
|
return (
|
|
<div>
|
|
<HomeSplash language={language} />
|
|
<div className="mainContainer">
|
|
<Features />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
module.exports = Index;
|