This repository has been archived by the owner on Dec 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
118 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,50 @@ | ||
import React, { Component } from 'react'; | ||
|
||
import CybLink from './components/CybLink'; | ||
import React, {Component} from 'react'; | ||
|
||
import Home, { | ||
Items, | ||
Item, | ||
ItemTitle, | ||
Image, | ||
Arrow, | ||
LinkList, LinkItem | ||
Items, | ||
Item, | ||
ItemTitle, | ||
Image, | ||
Arrow, | ||
LinkList, LinkItem | ||
} from './components/Home/Home'; | ||
|
||
class HomePage extends Component { | ||
render() { | ||
return ( | ||
<Home> | ||
<Items> | ||
<Item dura='apps.cyb'> | ||
<ItemTitle>App Store</ItemTitle> | ||
<Image type='appStore'/> | ||
<Arrow /> | ||
</Item> | ||
|
||
<Item dura='.chaingear/#/new' > | ||
<ItemTitle>Create Register</ItemTitle> | ||
<Image type='createRegistry'/> | ||
<Arrow /> | ||
</Item> | ||
<Item dura='.help/#/create'> | ||
<ItemTitle>Create App</ItemTitle> | ||
<Image type='createApp'/> | ||
<Arrow /> | ||
</Item> | ||
</Items> | ||
render() { | ||
return ( | ||
<Home> | ||
<Items> | ||
<Item dura='apps.cyb'> | ||
<ItemTitle>App Store</ItemTitle> | ||
<Image type='appStore'/> | ||
<Arrow/> | ||
</Item> | ||
|
||
<Item dura='.chaingear/#/new'> | ||
<ItemTitle>Create Register</ItemTitle> | ||
<Image type='createRegistry'/> | ||
<Arrow/> | ||
</Item> | ||
<Item dura='.help/#/create'> | ||
<ItemTitle>Create App</ItemTitle> | ||
<Image type='createApp'/> | ||
<Arrow/> | ||
</Item> | ||
</Items> | ||
|
||
<LinkList> | ||
|
||
<LinkItem target="_blank" to='https://github.com/cybercongress' icon='github'>GitHub</LinkItem> | ||
<LinkItem target="_blank" to='https://github.com/orgs/cybercongress/projects/1' icon='roadmap'>Roadmap</LinkItem> | ||
<LinkItem target="_blank" to='http://cybersearch.live' icon='cybernode'>Cybernode</LinkItem> | ||
<LinkItem target="_blank" to='https://wiki.cybercongress.ai' icon='knowledge'>Knowledge</LinkItem> | ||
<LinkItem target="_blank" to='https://medium.com/@cybercongress' icon='blog'>Blog</LinkItem> | ||
|
||
</LinkList> | ||
</Home> | ||
); | ||
} | ||
<LinkItem target="_blank" to='https://github.com/cybercongress' icon='github'>GitHub</LinkItem> | ||
<LinkItem target="_blank" to='https://github.com/orgs/cybercongress/projects/1' | ||
icon='roadmap'>Roadmap</LinkItem> | ||
<LinkItem target="_blank" to='http://cybersearch.live' icon='cybernode'>Cybernode</LinkItem> | ||
<LinkItem target="_blank" to='https://wiki.cybercongress.ai' icon='knowledge'>Knowledge</LinkItem> | ||
<LinkItem target="_blank" to='https://medium.com/@cybercongress' icon='blog'>Blog</LinkItem> | ||
|
||
</LinkList> | ||
</Home> | ||
); | ||
} | ||
} | ||
|
||
export default HomePage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,65 @@ | ||
import React from 'react'; | ||
import CybLink from '../CybLink'; | ||
import { Link as LinkRouter} from 'react-router'; | ||
import {Link as LinkRouter} from 'react-router'; | ||
import './Home.css'; | ||
|
||
const Home = (props) => ( | ||
<div {...props} className='home' /> | ||
<div {...props} className='home'/> | ||
); | ||
|
||
|
||
|
||
|
||
|
||
export const Items = ({ children }) => ( | ||
<div className='items'> | ||
{children} | ||
</div> | ||
export const Items = ({children}) => ( | ||
<div className='items'> | ||
{children} | ||
</div> | ||
); | ||
|
||
export const Item = ({ children, dura, ...props }) => ( | ||
props.disabled ? ( | ||
<span className='item' {...props}>{children}</span> | ||
export const Item = ({children, dura, ...props}) => ( | ||
props.disabled ? ( | ||
<span className='item' {...props}>{children}</span> | ||
) : ( | ||
<CybLink dura={dura} className='item' {...props}> | ||
{children} | ||
</CybLink> | ||
) | ||
<CybLink dura={dura} className='item' {...props}> | ||
{children} | ||
</CybLink> | ||
) | ||
); | ||
|
||
export const Arrow = () => ( | ||
<span className='arrow' /> | ||
<span className='arrow'/> | ||
); | ||
|
||
export const ItemTitle = ({ children, gray }) => ( | ||
<span className={'itemTitle' + ' ' + (gray ? 'itemTitleGray' : '')}> | ||
export const ItemTitle = ({children, gray}) => { | ||
const className = 'itemTitle ' + (gray ? 'itemTitleGray' : ''); | ||
return <span className={className}> | ||
{children} | ||
</span> | ||
); | ||
}; | ||
|
||
export const Image = ({ type }) => ( | ||
<div className={`image image${type}`}> | ||
</div> | ||
export const Image = ({type}) => ( | ||
<div className={`image image${type}`}> | ||
</div> | ||
); | ||
|
||
|
||
|
||
const Link = (props) => { | ||
if (/^https?:\/\//.test(props.to)) return <a href={props.to} {...props}/> | ||
|
||
return <LinkRouter {...props} /> | ||
if (/^https?:\/\//.test(props.to)) { | ||
return <a href={props.to} {...props}> </a> | ||
} else { | ||
return <LinkRouter {...props} /> | ||
} | ||
}; | ||
|
||
|
||
export const LinkList = ({ children }) => ( | ||
<nav className='linkList'> | ||
{children} | ||
</nav> | ||
export const LinkList = ({children}) => ( | ||
<nav className='linkList'> | ||
{children} | ||
</nav> | ||
); | ||
|
||
export const LinkItem = ({ children, to, icon, ...props }) => ( | ||
<Link to={to} className={`linkItem linkItem${icon}`} {...props}> | ||
{children} | ||
</Link> | ||
export const LinkItem = ({children, to, icon, ...props}) => ( | ||
<Link to={to} className={`linkItem linkItem${icon}`} {...props}> | ||
{children} | ||
</Link> | ||
); | ||
|
||
|
||
|
||
export default Home; | ||
export default Home; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.