2020-08-11 08:55:52 +03:00
import * as React from "react" ;
import * as Constants from "~/common/constants" ;
import * as Actions from "~/common/actions" ;
import * as System from "~/components/system" ;
2020-08-14 18:53:09 +03:00
import { motion , useViewportScroll , useTransform } from "framer-motion" ;
2020-08-14 10:09:44 +03:00
import { css , keyframes } from "@emotion/react" ;
2020-08-11 08:55:52 +03:00
import WebsitePrototypeWrapper from "~/components/core/WebsitePrototypeWrapper" ;
2020-08-14 06:41:35 +03:00
import WebsitePrototypeHeader from "~/components/core/NewWebsitePrototypeHeader" ;
import WebsitePrototypeFooter from "~/components/core/NewWebsitePrototypeFooter" ;
import TextLoop from "react-text-loop" ;
import { Fade } from "react-slideshow-image" ;
2020-08-11 08:55:52 +03:00
2020-08-13 13:23:16 +03:00
const STYLES _HERO _SECTION = css `
text - align : center ;
width : 100 vw ;
height : 100 vh ;
padding - top : 30 vh ;
background - image : url ( "" ) ;
background - size : cover ;
background - position : center ;
background - repeat : no - repeat ;
transition : width 2 s , height 4 s ;
` ;
const STYLES _HERO _TEXT = css `
text - align : center ;
2020-08-14 18:53:09 +03:00
color : $ { Constants . system . black } ;
2020-08-13 13:23:16 +03:00
width : 80 vw ;
margin : auto ;
` ;
2020-08-11 08:55:52 +03:00
const STYLES _ROOT = css `
display : flex ;
flex - direction : column ;
justify - content : space - between ;
2020-08-12 04:40:43 +03:00
h1 {
font - size : 4.768 rem ;
padding : 0 px 0 px 32 px 0 px ;
2020-08-13 13:23:16 +03:00
width : 100 % ;
2020-08-12 04:40:43 +03:00
}
h2 {
font - size : 1.953 rem ;
width : 48 % ;
}
p {
font - size : 1 rem ;
color : $ { Constants . system . black } ;
}
2020-08-11 08:55:52 +03:00
@ media ( max - width : $ { Constants . sizes . mobile } px ) {
2020-08-12 04:40:43 +03:00
h1 {
font - size : 2.441 rem ;
}
h2 {
font - size : 1.25 rem ;
}
p {
font - size : 0.78 rem ;
}
2020-08-11 08:55:52 +03:00
}
` ;
2020-08-14 06:41:35 +03:00
const STYLES _FOREGROUND _H1 = css `
font - size : 4.768 rem ;
color : $ { Constants . system . foreground } ;
padding : 0 px 0 px 32 px 0 px ;
width : 64 % ;
` ;
const STYLES _FOREGROUND _H2 = css `
font - size : 1.953 rem ;
color : $ { Constants . system . foreground } ;
width : 48 % ;
` ;
2020-08-12 04:40:43 +03:00
const STYLES _HERO = css `
padding : 88 px 24 px ;
width : 100 vw ;
height : 100 vh ;
background : $ { Constants . system . foreground } ;
` ;
const STYLES _SECTION _WHITE = css `
padding : 88 px 24 px ;
width : 100 vw ;
height : 100 vh ;
background : $ { Constants . system . white } ;
` ;
const STYLES _SECTION _GRAY = css `
padding : 88 px 24 px ;
width : 100 vw ;
height : 100 vh ;
background : $ { Constants . system . gray } ;
` ;
2020-08-11 08:55:52 +03:00
2020-08-12 04:40:43 +03:00
const STYLES _SECTION _FOREGROUND = css `
padding : 88 px 24 px ;
width : 100 vw ;
height : 100 vh ;
background : $ { Constants . system . foreground } ;
2020-08-14 06:41:35 +03:00
position : relative ;
2020-08-11 08:55:52 +03:00
` ;
2020-08-14 06:41:35 +03:00
const STYLES _SECTION _FRONT = css `
padding : 88 px 24 px 24 px 24 px ;
2020-08-14 18:53:09 +03:00
margin : 0 px ;
2020-08-13 13:23:16 +03:00
position : relative ;
2020-08-14 06:41:35 +03:00
z - index : 2 ;
2020-08-14 18:53:09 +03:00
}
` ;
const STYLES _VIEWS _TEXT = css `
display : inline - flex ;
align - items : center ;
font - size : 1.953 rem ;
color : $ { Constants . system . black } ;
text - decoration : none ;
margin : 30 vh 0 px ;
}
` ;
2020-08-14 07:15:28 +03:00
2020-08-14 18:53:09 +03:00
const STYLES _VIEWS _IMAGES = css `
display : inline - flex ;
position : absolute ;
img {
max - width : 500 px ;
height : auto ;
}
}
` ;
2020-08-11 08:55:52 +03:00
2020-08-14 06:41:35 +03:00
const STYLES _SECTION _BACK = css `
margin : 0 px 0 px 0 px 0 px ;
width : 100 vw ;
height : 100 vh ;
padding : 0 px ;
2020-08-13 13:23:16 +03:00
position : absolute ;
2020-08-14 06:41:35 +03:00
background - size : cover ;
background - position : center ;
background - repeat : no - repeat ;
` ;
const STYLES _SECTION _MEDIA = css `
width : 100 % ;
height : 100 vh ;
padding : 0 px ;
margin : 0 px ;
` ;
const STYLES _MEDIA = css `
max - width : 100 % ;
max - height : 100 vh ;
background - size : cover ;
background - position : center ;
background - repeat : no - repeat ;
2020-08-13 13:23:16 +03:00
` ;
2020-08-14 10:09:44 +03:00
const STYLES _SIMPLE _FLOW _CONTAINER = css `
display : flex ;
flex - direction : row ;
width : 100 vw ;
justify - content : space - around ;
padding - top : 20 vh ;
align - items : center ;
` ;
const STYLES _ARROW _CONTAINER = css `
width : 200 px ;
2020-08-14 18:53:09 +03:00
` ;
2020-08-14 10:09:44 +03:00
const STYLES _SECTION _TEXT = css `
display : block ;
max - width : 980 px ;
` ;
const STYLES _SECTION _SVG _CONTAINER = css `
display : flex ;
justify - content : center ;
` ;
const STYLES _STROKE _KF = keyframes `
from { stroke - dashoffset : 1 ; }
to { stroke - dashoffset : 0 ; }
2020-08-14 18:53:09 +03:00
` ;
2020-08-14 10:09:44 +03:00
const STYLES _SVG _AN = css `
animation : $ { STYLES _STROKE _KF } 5 s ease - in - out infinite alternate ;
2020-08-14 18:53:09 +03:00
` ;
2020-08-14 10:09:44 +03:00
const STYLES _CONTR _CONTAINER = css `
display : flex ;
2020-08-14 18:53:09 +03:00
` ;
2020-08-14 10:09:44 +03:00
const STYLES _CONTR _LIST = css `
display : flex ;
justify - content : space - around ;
width : 100 vw ;
list - style : none ;
2020-08-14 18:53:09 +03:00
` ;
2020-08-14 10:09:44 +03:00
const STYLES _CONTR _LI0 = css `
font - size : 1.953 rem ;
color : $ { Constants . system . black } ;
text - decoration : none ;
padding - bottom : 1.5 rem ;
2020-08-14 18:53:09 +03:00
` ;
2020-08-14 10:09:44 +03:00
const STYLES _CONTR _LI1 = css `
font - size : 1.953 rem ;
color : $ { Constants . system . black } ;
text - decoration : none ;
opacity : . 76 ;
padding - bottom : 1.5 rem ;
2020-08-14 18:53:09 +03:00
` ;
2020-08-14 10:09:44 +03:00
const STYLES _CONTR _LI2 = css `
font - size : 1.953 rem ;
color : $ { Constants . system . black } ;
text - decoration : none ;
opacity : . 56 ;
padding - bottom : 1.5 rem ;
2020-08-14 18:53:09 +03:00
` ;
2020-08-14 10:09:44 +03:00
const STYLES _CONTR _LI3 = css `
font - size : 1.953 rem ;
color : $ { Constants . system . black } ;
text - decoration : none ;
opacity : . 26 ;
padding - bottom : 1.5 rem ;
2020-08-14 18:53:09 +03:00
` ;
2020-08-14 06:41:35 +03:00
const STYLES _MEDIA _LEFT = css `
position : absolute ;
right : 16 % ;
bottom : 24 px
` ;
const fadeImages = [
"/static/media/image.jpg" ,
"/static/media/sound.jpg" ,
"/static/media/code.jpg" ,
"/static/media/text.jpg" ,
"/static/media/url.jpg" ,
] ;
2020-08-11 08:55:52 +03:00
2020-08-14 18:53:09 +03:00
const viewsImages = [
"/static/media/slate-views-moodboard.png" ,
"/static/media/slate-views-canvas.png" ,
"/static/media/slate-views-presentation.png" ,
"/static/media/slate-views-blog.png" ,
] ;
2020-08-11 08:55:52 +03:00
export const getServerSideProps = async ( context ) => {
return {
props : { ... context . query } ,
} ;
} ;
2020-08-14 18:53:09 +03:00
export const MyComponent = ( ) => (
< motion . div
animate = { { rotate : 360 } }
transition = { { duration : 2 } }
/ >
)
export const MyMotion = ( ) => {
const { scrollYProgress } = useViewportScroll ( )
return < motion . div style = { { scaleX : scrollYProgress } } / >
}
2020-08-11 08:55:52 +03:00
export default class IndexPage extends React . Component {
async componentDidMount ( ) {
const response = await Actions . health ( ) ;
console . log ( "HEALTH_CHECK" , response ) ;
2020-08-14 18:53:09 +03:00
2020-08-11 08:55:52 +03:00
}
render ( ) {
const title = ` Slate ` ;
const description = "The place for all of your assets. Powered by Textile and Filecoin." ;
const url = "https://slate.host" ;
2020-08-14 18:53:09 +03:00
2020-08-11 08:55:52 +03:00
return (
< WebsitePrototypeWrapper title = { title } description = { description } url = { url } >
< div css = { STYLES _ROOT } >
< WebsitePrototypeHeader / >
2020-08-13 13:23:16 +03:00
< section css = { STYLES _HERO _SECTION } >
2020-08-14 18:53:09 +03:00
2020-08-13 13:23:16 +03:00
< div css = { STYLES _HERO _TEXT } >
2020-08-14 18:53:09 +03:00
< System . H1 > Slate is the gateway to Filecoin . < / S y s t e m . H 1 >
2020-08-13 13:23:16 +03:00
< br / >
< System . H2 > By creating a safe , open , and moddable storage system that is easy to use , we create paths to a new network of designed around trust . < / S y s t e m . H 2 >
2020-08-14 18:53:09 +03:00
2020-08-13 13:23:16 +03:00
< / d i v >
< / s e c t i o n >
< section css = { STYLES _SECTION _WHITE } >
< h1 > Simple , intuitive < / h 1 >
2020-08-14 10:09:44 +03:00
< h2 > Break way from abstract visualizations of your files . < br / > Securely organize your data in a relatable way < / h 2 >
< div css = { STYLES _SIMPLE _FLOW _CONTAINER } >
< div > { /*<ButtonPrimary>Upload File</ButtonPrimary> Figure out hoiw to pull in correctly*/ } < button > Upload File < / b u t t o n > < / d i v >
< div css = { STYLES _ARROW _CONTAINER } >
< svg viewBox = "0 0 350 100" >
< defs >
< marker id = "arrowhead" markerWidth = "10" markerHeight = "7"
refX = "0" refY = "1.5" orient = "auto" fill = "#1b1f23" >
< polygon points = "0 0, 5 1.5, 0 3" / >
< / m a r k e r >
< / d e f s >
< line x1 = "5" y1 = "50" x2 = "250" y2 = "50" stroke = "#1b1f23"
stroke - width = "8" marker - end = "url(#arrowhead)" / >
< / s v g >
< / d i v >
< div > < p > Slate securely stores your file < / p > < / d i v >
< div css = { STYLES _ARROW _CONTAINER } >
< svg viewBox = "0 0 350 100" >
< defs >
< marker id = "arrowhead" markerWidth = "10" markerHeight = "7"
refX = "0" refY = "1.5" orient = "auto" fill = "#1b1f23" >
< polygon points = "0 0, 5 1.5, 0 3" / >
< / m a r k e r >
< / d e f s >
< line x1 = "5" y1 = "50" x2 = "250" y2 = "50" stroke = "#1b1f23"
stroke - width = "8" marker - end = "url(#arrowhead)" / >
< / s v g >
< / d i v >
< div > < p > Share ! < / p > < / d i v >
< / d i v >
2020-08-13 13:23:16 +03:00
< / s e c t i o n >
< section css = { STYLES _SECTION _FOREGROUND } >
< h1 > Private & Secure < / h 1 >
2020-08-14 06:41:35 +03:00
< h2 > All your files are encryped . Only accessible by you and the people you choose to share . < / h 2 >
< div css = { STYLES _MEDIA _LEFT } >
< img src = "/static/privacy.png" / >
< / d i v >
2020-08-13 13:23:16 +03:00
< / s e c t i o n >
2020-08-14 06:41:35 +03:00
2020-08-13 13:23:16 +03:00
2020-08-14 06:41:35 +03:00
< section css = { STYLES _SECTION _MEDIA } >
< div css = { STYLES _SECTION _BACK } >
< Fade
arrows = { false }
duration = { 2400 }
transitionDuration = { 800 }
pauseOnHover = { false }
>
< div className = "each-fade" css = { STYLES _MEDIA } >
2020-08-14 18:53:09 +03:00
< img src = { fadeImages [ 0 ] } / >
2020-08-14 06:41:35 +03:00
< / d i v >
< div className = "each-fade" css = { STYLES _MEDIA } >
2020-08-14 18:53:09 +03:00
< img src = { fadeImages [ 1 ] } / >
2020-08-14 06:41:35 +03:00
< / d i v >
< div className = "each-fade" css = { STYLES _MEDIA } >
2020-08-14 18:53:09 +03:00
< img src = { fadeImages [ 2 ] } / >
2020-08-14 06:41:35 +03:00
< / d i v >
< div className = "each-fade" css = { STYLES _MEDIA } >
2020-08-14 18:53:09 +03:00
< img src = { fadeImages [ 3 ] } / >
2020-08-14 06:41:35 +03:00
< / d i v >
< div className = "each-fade" css = { STYLES _MEDIA } >
2020-08-14 18:53:09 +03:00
< img src = { fadeImages [ 4 ] } / >
2020-08-14 06:41:35 +03:00
< / d i v >
< / F a d e >
< / d i v >
< div css = { STYLES _SECTION _FRONT } >
< h1 css = { STYLES _FOREGROUND _H1 } >
Easily store any { " " }
< TextLoop interval = { 3200 } >
< span > image < / s p a n >
< span > sound < / s p a n >
< span > code < / s p a n >
< span > text < / s p a n >
< span > URL < / s p a n >
< / T e x t L o o p >
< / h 1 >
< h2 css = { STYLES _FOREGROUND _H2 } >
Slate is the first decentralized storage system made for everyone . You can store any form of information on Slate .
< / h 2 >
< / d i v >
2020-08-13 13:23:16 +03:00
< / s e c t i o n >
2020-08-14 06:41:35 +03:00
2020-08-13 13:23:16 +03:00
< section css = { STYLES _SECTION _FOREGROUND } >
< h1 > Making a Slate < / h 1 >
< h2 > Slates give you rich previews and different layouts to view your files . < / h 2 >
2020-08-14 18:53:09 +03:00
< div css = { STYLES _VIEWS _TEXT } >
< TextLoop interval = { 3200 } >
< span > Create moodboards < / s p a n >
< span > Organize research < / s p a n >
< span > Share presentations < / s p a n >
< span > Create a Blog < / s p a n >
< span > URL < / s p a n >
< / T e x t L o o p >
< / d i v >
< div css = { STYLES _VIEWS _IMAGES } >
< Fade
arrows = { false }
duration = { 2400 }
transitionDuration = { 800 }
pauseOnHover = { true }
>
< div className = "each-fade" >
< img src = { viewsImages [ 0 ] } / >
< / d i v >
< div className = "each-fade" >
< img src = { viewsImages [ 1 ] } / >
< / d i v >
< div className = "each-fade" >
< img src = { viewsImages [ 2 ] } / >
< / d i v >
< div className = "each-fade" >
< img src = { viewsImages [ 3 ] } / >
< / d i v >
< / F a d e >
< / d i v >
2020-08-13 13:23:16 +03:00
< / s e c t i o n >
< section css = { STYLES _SECTION _WHITE } >
< h1 > Share with < / h 1 >
< h2 > Words about things < / h 2 >
2020-08-14 18:53:09 +03:00
< div css = { STYLES _VIEWS _IMAGES } >
< img src = "/static/media/slate-share.gif" alt = "" / >
< / d i v >
2020-08-13 13:23:16 +03:00
< / s e c t i o n >
< section css = { STYLES _SECTION _FOREGROUND } >
< h1 > Open Source < / h 1 >
2020-08-14 10:09:44 +03:00
< h2 css = { STYLES _SECTION _TEXT } > "Collaboration makes better software" . < br / > < br / > Pair that with Filecoin 's transparent marketplace as Slates' s foundation . And you got yourself real nice power couple right there . < / h 2 >
< div css = { STYLES _SECTION _SVG _CONTAINER } >
< svg viewBox = "-15 125 750 750" width = "800" height = "800" >
< path css = { STYLES _SVG _AN } stroke = "#b2b2b2" fill = "none" strokeWidth = "3" strokeDasharray = "1 1" pathLength = "1"
d = "m 398.40437,595.27818 c 40.32082,-14.97419 61.36968,-43.81349 61.36968,-93.44762 0,-49.63413 -41.82527,-93.37059 -94.0866,-93.45552 -55.14896,-0.0896 -96.75182,43.64 -96.0866,93.45552 0.66523,49.81551 24.42164,82.95509 62.44642,94.93898 L 264.68924,762.47972 C 174.536,739.14196 82.84508,632.78774 82.84508,501.83056 c 0,-155.10914 124.63284,-280.84993 280.84238,-280.84993 156.20954,0 282.84239,125.74079 282.84239,280.84993 0,132.99462 -90.82075,237.8649 -182.89748,261.11527 z"
/ >
< / s v g >
< / d i v >
< div css = { STYLES _CONTR _CONTAINER } >
< ul css = { STYLES _CONTR _LIST } >
< li css = { STYLES _CONTR _LI0 } > Jimmylee < br / > github . com / jimmylee < / l i >
< li css = { STYLES _CONTR _LI1 } > Martinalong < br / > github . com / martinalong < / l i >
< li css = { STYLES _CONTR _LI2 } > William Felker < br / > github . com / gndclouds < / l i >
< li css = { STYLES _CONTR _LI3 } > Uonai < br / > github . com / uonai < / l i >
< / u l >
< / d i v >
2020-08-13 13:23:16 +03:00
< / s e c t i o n >
2020-08-11 08:55:52 +03:00
< WebsitePrototypeFooter / >
< / d i v >
< / W e b s i t e P r o t o t y p e W r a p p e r >
) ;
}
2020-08-13 13:23:16 +03:00
}