forked from vesoft-inc/nebula-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
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
7 changed files
with
241 additions
and
7 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
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 |
---|---|---|
@@ -0,0 +1,105 @@ | ||
.studio-doc { | ||
margin-top: 50px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
.welcome-label { | ||
font-family: Roboto-Light, sans-serif; | ||
font-weight: 300; | ||
font-size: 64px; | ||
|
||
color: #000000; | ||
> span { | ||
font-family: Roboto-Bold, sans-serif; | ||
} | ||
} | ||
.doc-box { | ||
width: 100%; | ||
margin-bottom: 36px; | ||
.header { | ||
font-family: Roboto-Regular, sans-serif; | ||
font-size: 18px; | ||
padding-bottom: 12px; | ||
border-bottom: 1px solid #D5DDEB; | ||
} | ||
.module-intro { | ||
padding: 14px; | ||
display: flex; | ||
.module-item { | ||
padding: 27px 30px; | ||
display: inline-flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
font-family: Roboto-Regular, sans-serif; | ||
.anticon > svg { | ||
width: 50px; | ||
height: 50px; | ||
fill: #0091FF; | ||
} | ||
.title { | ||
color: #0091FF; | ||
font-weight: 500; | ||
font-size: 24px; | ||
margin: 20px 0 15px; | ||
} | ||
.tip { | ||
font-weight: 300; | ||
font-size: 14px; | ||
color: #4F4F4F; | ||
padding-right: 5px; | ||
} | ||
} | ||
} | ||
.doc-carousel { | ||
width: 100%; | ||
padding: 20px; | ||
.doc-group { | ||
display: flex !important; | ||
} | ||
.doc-item { | ||
height: 295px; | ||
background: #FFFFFF; | ||
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15); | ||
padding: 30px 20px 15px 20px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
font-family: Roboto-Regular, sans-serif; | ||
.doc-title { | ||
font-weight: 500; | ||
font-size: 24px; | ||
height: 72px; | ||
} | ||
.doc-tip { | ||
font-weight: 300; | ||
font-size: 14px; | ||
color: #4F4F4F; | ||
} | ||
.ant-btn { | ||
width: 100%; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.ant-carousel .slick-dots-bottom { | ||
bottom: -30px; | ||
margin: 0; | ||
|
||
li { | ||
width: 24px; | ||
} | ||
|
||
li button { | ||
width: 10px; | ||
height: 10px; | ||
border-radius: 10px; | ||
background-color: #E0E0E0; | ||
} | ||
|
||
li.slick-active button { | ||
width: 10px; | ||
background-color: #0091FF; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
import { Button, Carousel, Col, Row } from 'antd'; | ||
import React, { useEffect } from 'react'; | ||
import intl from 'react-intl-universal'; | ||
import { observer } from 'mobx-react-lite'; | ||
import { trackPageView } from '@app/utils/stat'; | ||
import Icon from '@app/components/Icon'; | ||
import { chunk } from 'lodash'; | ||
|
||
import './index.less'; | ||
|
||
const MODULES = [ | ||
{ | ||
icon: 'icon-studio-nav-schema', | ||
title: 'common.schema', | ||
tip: 'doc.schemaIntro' | ||
}, | ||
{ | ||
icon: 'icon-studio-nav-import', | ||
title: 'import.importData', | ||
tip: 'doc.importIntro' | ||
}, | ||
{ | ||
icon: 'icon-studio-nav-console', | ||
title: 'common.console', | ||
tip: 'doc.consoleIntro' | ||
}, | ||
]; | ||
|
||
const DOCS = [ | ||
{ | ||
title: 'doc.getStarted', | ||
tip: 'doc.getStartedTip', | ||
link: 'link.mannualHref' | ||
}, | ||
{ | ||
title: 'doc.useGuide', | ||
tip: 'doc.useGuideTip', | ||
link: 'link.startStudioHref' | ||
}, | ||
{ | ||
title: 'doc.ngqlIntro', | ||
tip: 'doc.ngqlIntroTip', | ||
link: 'link.nGQLHref' | ||
}, | ||
]; | ||
|
||
const DocPage = () => { | ||
const docGroup = chunk(DOCS, 3); | ||
useEffect(() => { | ||
trackPageView('/doc'); | ||
}, []); | ||
|
||
return ( | ||
<div className="studio-doc center-layout"> | ||
<h1 className="welcome-label">{intl.get('doc.welcome')} <span>Nebula Studio</span></h1> | ||
<div className="doc-box"> | ||
<div className="header">{intl.get('doc.functionIntro')}</div> | ||
<div className="module-intro"> | ||
{MODULES.map(module => <Col span={8} key={module.title}> | ||
<div className="module-item"> | ||
<Icon type={module.icon} /> | ||
<span className="title">{intl.get(module.title)}</span> | ||
<span className="tip">{intl.get(module.tip)}</span> | ||
</div> | ||
</Col>)} | ||
</div> | ||
</div> | ||
<div className="doc-box"> | ||
<div className="header">{intl.get('doc.learningDoc')}</div> | ||
<div className="doc-carousel"> | ||
<Carousel dotPosition="bottom" lazyLoad="progressive" dots={{ className: 'btn-carousel' }}> | ||
{docGroup.map((group, index) => ( | ||
<Row className="doc-group" gutter={26} key={index}> | ||
{group.map(doc => <Col span={8} key={doc.title}> | ||
<div className="doc-item"> | ||
<div className="doc-desc"> | ||
<p className="doc-title">{intl.get(doc.title)}</p> | ||
<p className="doc-tip">{intl.get(doc.tip)}</p> | ||
</div> | ||
<Button type="primary"> | ||
<a href={intl.get(doc.link)} target="_blank" rel="noreferrer"> | ||
{intl.get('doc.start')} | ||
</a> | ||
</Button> | ||
</div> | ||
</Col>)} | ||
</Row> | ||
))} | ||
</Carousel> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
export default observer(DocPage); |
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