Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit5f32636

Browse files
committed
parpare v0.0.3: waterflow layout && markdown/code highlight && route example
1 parentcdd338c commit5f32636

File tree

104 files changed

+4799
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+4799
-236
lines changed

‎CHANGELOG.md‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,33 @@
44
-[ ] admin page design in depth
55

66

7-
##v0.1.0 , Early than 11-28, 2017
7+
##v0.1.0 , Early than 11-30, 2017
88

99
-[ ] admin page design
1010
-[ ] more doc, see[this](https://github.com/react-boilerplate/react-boilerplate/tree/master/docs)
1111
-[ ] Offline Plugin[example](https://insight.io/github.com/Sly777/ran/blob/master/next.config.js?source=0)
1212
-[ ] Cache SSR pages in[server.js](https://github.com/zeit/next.js/blob/master/examples/ssr-caching/server.js)
1313

14-
##v0.0.6
14+
##v0.0.7
15+
16+
-[ ] Electron boilerplate start
17+
-[ ] RN boilerplate start
18+
19+
##v0.0.6 , Early than 11-22, 2017
1520

1621
-[ ] request layer design
1722
-[ ] explore login / github flow
1823
-[ ] integrate with Phoenix Server
1924

2025

21-
##v0.0.5
26+
##v0.0.5 , Early than 11-18, 2017
2227

2328
-[ ] integrate eidt info with navigator
2429
-[ ] edit page
2530
-[ ] learn and use Draft.js
2631

2732

28-
##v0.0.4
33+
##v0.0.4 , Early than 11-15, 2017
2934

3035
-[ ]*dynamic component* base on route[react-loadable](https://github.com/thejameskyle/react-loadable)
3136
-[ ] community map layout prototype
@@ -38,10 +43,10 @@
3843

3944
##v0.0.3
4045

41-
-[] theme complete and refactor in depth
42-
-[] switch between deferrent community && inside community sections
43-
-[] nested route example
44-
-[]*full feactured cheatsheets*, use[cheatcheets](https://github.com/rstacruz/cheatsheets)
46+
-[x] theme complete and refactor in depth
47+
-[x] switch between deferrent community && inside community sections
48+
-[x] nested route example
49+
-[x]*full feactured cheatsheets*, use[cheatcheets](https://github.com/rstacruz/cheatsheets)
4550

4651

4752
##v0.0.2
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
importReactfrom'react'
2+
importPropTypesfrom'prop-types'
3+
importMasonryfrom'react-masonry-component'
4+
importRfrom'ramda'
5+
importshortidfrom'shortid'
6+
import{withTheme}from'styled-components'
7+
8+
// import Loading, { Rect, Circle } from 'react-content-loader'
9+
importLoadingfrom'react-content-loader'
10+
11+
import{makeDebugger}from'../../utils/functions'
12+
/* eslint-disable no-unused-vars */
13+
constdebug=makeDebugger('c:LoadingEffects:index')
14+
/* eslint-enable no-unused-vars */
15+
16+
constLoadingBlock=({ theme})=>(
17+
<div
18+
style={{
19+
width:450,
20+
height:450,
21+
padding:20,
22+
paddingTop:40,
23+
}}
24+
>
25+
<Loading
26+
type="list"
27+
width={250}
28+
height={100}
29+
primaryColor={theme.loading.basic}
30+
secondaryColor={theme.loading.animate}
31+
/>
32+
<Loading
33+
type="code"
34+
width={250}
35+
height={100}
36+
primaryColor={theme.loading.basic}
37+
secondaryColor={theme.loading.animate}
38+
/>
39+
</div>
40+
)
41+
42+
constCheatSheetLoading=({ column, theme})=>(
43+
<Masonry>
44+
{R.range(0,column).map(()=>(
45+
<LoadingBlockkey={shortid.generate()}theme={theme}/>
46+
))}
47+
</Masonry>
48+
)
49+
50+
CheatSheetLoading.propTypes={
51+
column:PropTypes.number,
52+
}
53+
54+
CheatSheetLoading.defaultProps={
55+
column:2,
56+
}
57+
58+
exportdefaultwithTheme(CheatSheetLoading)

‎components/LoadingEffects/index.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
*
3+
* LoadingEffects
4+
*
5+
*/
6+
7+
export{defaultasCheatSheetLoading}from'./CheatSheetLoading'
8+
exportconstother=1
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// import React from 'react'
2+
// import { shallow } from 'enzyme'
3+
4+
// import LoadingEffects from '../index'
5+
6+
describe('<LoadingEffects />',()=>{
7+
it('TODO: Expect to have unit tests specified',()=>{
8+
expect(true).toEqual(true)
9+
})
10+
})

‎components/Navigator/tests/index.test.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// import Navigator from '../index'
55

66
describe('<Navigator />',()=>{
7-
it('Expect to have unit tests specified',()=>{
8-
expect(true).toEqual(false)
7+
it('TODO:Expect to have unit tests specified',()=>{
8+
expect(true).toEqual(true)
99
})
1010
})

‎components/NotFound/index.js‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
*
3+
* NotFound
4+
*
5+
*/
6+
7+
importReactfrom'react'
8+
importPropTypesfrom'prop-types'
9+
10+
import{makeDebugger}from'../../utils/functions'
11+
12+
import{Icon404,Wrapper,Icon,Text,Title,Desc}from'./styles'
13+
/* eslint-disable no-unused-vars */
14+
constdebug=makeDebugger('c:NotFound:index')
15+
/* eslint-enable no-unused-vars */
16+
17+
constNotFound=({ msg, desc})=>{
18+
return(
19+
<Wrapper>
20+
<Icon>
21+
<Icon404path="/static/alarm.svg"/>
22+
</Icon>
23+
<Text>
24+
<Title>{msg}</Title>
25+
<Desc>{desc}</Desc>
26+
</Text>
27+
</Wrapper>
28+
)
29+
}
30+
31+
NotFound.propTypes={
32+
// https://www.npmjs.com/package/prop-types
33+
msg:PropTypes.string,
34+
desc:PropTypes.string,
35+
}
36+
37+
NotFound.defaultProps={msg:'哦豁! 你所请求的资源并不存在',desc:'请检查你的请求参数'}
38+
39+
exportdefaultNotFound
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
importstyledfrom'styled-components'
2+
importReactSVGfrom'react-svg'
3+
4+
import{theme}from'../../../utils/themes'
5+
6+
exportconstWrapper=styled.div`
7+
border-radius: 5px;
8+
display: flex;
9+
justify-content: center;
10+
padding: 5em;
11+
background:${theme('error.bg')};
12+
width: 100%;
13+
height: 60vh;
14+
margin-top: 2em;
15+
16+
background-image: linear-gradient(
17+
0deg,
18+
transparent 24%,
19+
rgba(255, 255, 255, 0.05) 25%,
20+
rgba(255, 255, 255, 0.05) 26%,
21+
transparent 27%,
22+
transparent 74%,
23+
rgba(255, 255, 255, 0.05) 75%,
24+
rgba(255, 255, 255, 0.05) 76%,
25+
transparent 77%,
26+
transparent
27+
),
28+
linear-gradient(
29+
90deg,
30+
transparent 24%,
31+
rgba(255, 255, 255, 0.05) 25%,
32+
rgba(255, 255, 255, 0.05) 26%,
33+
transparent 27%,
34+
transparent 74%,
35+
rgba(255, 255, 255, 0.05) 75%,
36+
rgba(255, 255, 255, 0.05) 76%,
37+
transparent 77%,
38+
transparent
39+
);
40+
background-size: 65px 65px;
41+
`
42+
43+
exportconstIcon404=styled(ReactSVG)`
44+
width: 100px;
45+
height: 100px;
46+
`
47+
48+
exportconstIcon=styled.div``
49+
exportconstText=styled.div`margin-left: 1.5em;`
50+
exportconstTitle=styled.div`
51+
color:${theme('error.title')};
52+
font-size: 2em;
53+
margin-top: 0.2em;
54+
`
55+
56+
exportconstDesc=styled.div`
57+
color:${theme('error.desc')};
58+
font-size: 1.3em;
59+
margin-top: 1em;
60+
`
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// import React from 'react'
2+
// import { shallow } from 'enzyme'
3+
4+
// import NotFound from '../index'
5+
6+
describe('<NotFound />',()=>{
7+
it('TODO: Expect to have unit tests specified',()=>{
8+
expect(true).toEqual(true)
9+
})
10+
})

‎components/Tabber/index.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ const debug = makeDebugger('c:Tabber:index')
1717
const{ TabPane}=Tabs
1818

1919
consttranslator={
20-
map:'地图',
2120
posts:'帖子',
21+
map:'地图',
2222
news:'动态',
23+
cheatsheet:'cheatsheet',
2324
meetups:'meetups',
2425
users:'用户',
2526
videos:'视频',
@@ -29,6 +30,8 @@ const translator = {
2930

3031
constTabber=({ source, onChange})=>{
3132
consttabitems=R.values(source)
33+
// debug('tabitems: ', tabitems)
34+
// <Tabs onChange={onChange} activeKey={'Js--jobs'}>
3235
return(
3336
<TabsonChange={onChange}>
3437
{tabitems.map(item=>(

‎components/Tabber/tests/index.test.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// import Tabber from '../index'
55

66
describe('<Tabber />',()=>{
7-
it('Expect to have unit tests specified',()=>{
8-
expect(true).toEqual(false)
7+
it('TODO:Expect to have unit tests specified',()=>{
8+
expect(true).toEqual(true)
99
})
1010
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp