Skip to content

Commit 88e8747

Browse files
committed
temp
1 parent 40d62db commit 88e8747

File tree

493 files changed

+19663
-14
lines changed

Some content is hidden

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

493 files changed

+19663
-14
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,8 @@ NODE_ENV=production gulp
5353
```
5454
gulp publish
5555
```
56+
57+
58+
## 数据更新
59+
60+
使用 jsdom 拉取远程内容,进行更新

app/fonts/FontAwesome.otf

91.7 KB
Binary file not shown.

app/fonts/fontawesome-webfont.eot

59.3 KB
Binary file not shown.

app/fonts/fontawesome-webfont.svg

+565
Loading

app/fonts/fontawesome-webfont.ttf

119 KB
Binary file not shown.

app/fonts/fontawesome-webfont.woff

69.8 KB
Binary file not shown.

app/fonts/fontawesome-webfont.woff2

55.4 KB
Binary file not shown.

app/i/favicon.ico

6.37 KB
Binary file not shown.

app/i/favicon.png

1 KB
Loading

app/i/icons.png

32.3 KB
Loading

app/i/[email protected]

85.3 KB
Loading

app/i/logo.png

1.35 KB
Loading

app/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
<%= javascript_tag 'debug' %><% end %> -->
2121
</head>
2222
<!-- <body class="_booting _noscript"> -->
23-
<body class="_booting _loading">
23+
<!-- <body class="_booting _loading"> -->
24+
<body class="">
2425
<noscript class="_fail">DevDocs requires JavaScript to run.</noscript>
2526
</body>
2627
<!-- <script src="http://cdn.bootcss.com/es5-shim/4.1.12/es5-shim.min.js"></script>

app/js/app-routes.jsx

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import {Route, Router} from 'react-router'
44
import createHistory from 'history/lib/createHashHistory'
55

6+
// var DefaultRoute = Router.DefaultRoute;
7+
// var NotFoundRoute = Router.NotFoundRoute;
8+
69
const history = createHistory({ queryKey: false })
710
let menulist = []
811

@@ -21,12 +24,17 @@ let menulist = []
2124

2225
// import Master from './pages/master.jsx'
2326
// import Home from './pages/home.jsx'
24-
import Home from './test.jsx'
27+
import Home from './pages/app.jsx'
28+
import NotFoundRoute from './modules/404.jsx'
29+
import ErrRoute from './modules/500.jsx'
2530

2631
/*
27-
<Route path="/home" component={Home} />
28-
{menulist}
29-
<Route path="/build" component={require('./pages/build.jsx')} />
32+
<Route name="app" path="/" handler={Application}>
33+
<DefaultRoute handler={Index}/>
34+
<Route name='brand' path="/brand/:brand_id" handler={BrandList} />
35+
36+
<NotFoundRoute handler={NotFound} />
37+
</Route>
3038
*/
3139

3240
const AppRoutes = (

app/js/app.jsx

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import ReactDOM from 'react-dom'
2020
const AppRoutes = require('./app-routes.jsx')
2121

22-
console.log('helloooo')
23-
2422
ReactDOM.render(
2523
AppRoutes,
2624
document.body

app/js/data/array.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = ["南京", "北京", "上海", "广州", "深圳", "成都", "重庆", "西安"]

app/js/data/text-value.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = [
2+
{ "id": "nanjing", "text": "南京" },
3+
{ "id": "beijing", "text": "北京" },
4+
{ "id": "guangzhou", "text": "广州" },
5+
{ "id": "shenzhen", "text": "深圳" },
6+
{ "id": "chengdu", "text": "成都" },
7+
{ "id": "chongqing", "text": "重庆" },
8+
{ "id": "shanghai", "text": "上海" }
9+
]
10+

app/js/menulist.js

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
"use strict"
2+
3+
var app_layout = '';
4+
5+
/*
6+
7+
<%= " #{app_layout}" if app_layout %>
8+
<%= "/ #{@doc['name']}" if @doc %>
9+
10+
<% unless @doc %>
11+
<% App.docs.each do |slug, doc| %>
12+
<a href="/<%= slug %>/" class="_list-item _icon-<%= slug %> _list-dir"><span class="_list-arrow"></span><%= doc['name'] %></a>
13+
<% end %>
14+
<% end %>
15+
16+
<style data-size="<%= app_size %>" data-resizer>
17+
._container { margin-left: <%= app_size %>; }
18+
._search, ._list, ._sidebar-footer { width: <%= app_size %>; }
19+
._list-hover.clone { min-width: <%= app_size %>; }
20+
._notice, ._path, ._resizer { left: <%= app_size %>; }
21+
</style>
22+
*/
23+
24+
25+
module.exports = [
26+
27+
// [
28+
// { path: '/form', text: 'Form', component: require('./pages/form.jsx') },
29+
// { path: '/formControl', text: 'FormControl', component: require('./pages/formControl.jsx') },
30+
// { path: '/formSubmit', text: 'FormSubmit', component: require('./pages/formSubmit.jsx') },
31+
// { path: '/checkbox', text: 'Checkbox', component: require('./pages/checkbox.jsx') },
32+
// { path: '/checkboxGroup', text: 'CheckboxGroup', component: require('./pages/checkboxGroup.jsx') },
33+
// { path: '/datetime', text: 'Datetime', component: require('./pages/datetime.jsx') },
34+
// { path: '/input', text: 'Input', component: require('./pages/input.jsx') },
35+
// { path: '/radioGroup', text: 'RadioGroup', component: require('./pages/radioGroup.jsx') },
36+
// { path: '/rating', text: 'Rating', component: require('./pages/rating.jsx') },
37+
// { path: '/select', text: 'Select', component: require('./pages/select.jsx') },
38+
// { path: '/tree', text: 'Tree', component: require('./pages/tree.jsx') },
39+
// { path: '/upload', text: 'Upload', component: require('./pages/upload.jsx') }
40+
// ],
41+
// [
42+
// { path: '/table', text: 'Table', component: require('./pages/table.jsx') },
43+
// { path: '/filter', text: 'Filter', component: require('./pages/filter.jsx') },
44+
// { path: '/button', text: 'Button', component: require('./pages/button.jsx') },
45+
// { path: '/icon', text: 'Icon', component: require('./pages/icon.jsx') },
46+
// { path: '/pagination', text: 'Pagination', component: require('./pages/pagination.jsx') },
47+
// { path: '/message', text: 'Message', component: require('./pages/message.jsx') },
48+
// { path: '/modal', text: 'Modal', component: require('./pages/modal.jsx') },
49+
// { path: '/dataSource', text: 'DataSource', component: require('./pages/dataSource.jsx') },
50+
// { path: '/lang', text: 'Lang', component: require('./pages/lang.jsx') }
51+
// ]
52+
]

app/js/modules/404.jsx

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use strict';
2+
3+
import React from 'react'
4+
5+
var Component = React.createClass({
6+
render: function() {
7+
return (
8+
<div>
9+
<h1>Oops!</h1>
10+
<p>
11+
<strong>The page you were looking for doesn't exist.</strong><br />
12+
Go back to <a href="http://devdocs.io">devdocs.io</a>.
13+
</p>
14+
</div>
15+
);
16+
}
17+
});
18+
19+
export default Component

app/js/modules/500.jsx

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use strict';
2+
3+
import React from 'react'
4+
5+
var Component = React.createClass({
6+
render: function() {
7+
return (
8+
<div>
9+
<h1>Oops!</h1>
10+
<p>
11+
<strong>The page you were looking for doesn't exist.</strong><br />
12+
Go back to <a href="http://devdocs.io">devdocs.io</a>.
13+
</p>
14+
</div>
15+
);
16+
}
17+
});
18+
19+
export default Component

app/js/nav-list.jsx

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
"use strict"
2+
3+
import React from 'react'
4+
import classnames from 'classnames'
5+
import menulist from './menulist'
6+
const { Icon } = global.uiRequire()
7+
8+
export default class NavList extends React.Component {
9+
static displayName = 'NavList'
10+
11+
static propTypes = {
12+
onToggle: React.PropTypes.func
13+
}
14+
15+
static contextTypes = {
16+
history: React.PropTypes.object.isRequired
17+
}
18+
19+
state = {
20+
active: true
21+
}
22+
23+
getClasses (name, path) {
24+
return classnames(name, {
25+
active: this.context.history.isActive(path)
26+
})
27+
}
28+
29+
pathChange (path) {
30+
if (!this.context.history.isActive(path)) {
31+
this.context.history.pushState(null, path)
32+
}
33+
}
34+
35+
getRoutesList (paths, index) {
36+
let list = paths.map(function (r, i) {
37+
if (r.path) {
38+
return (
39+
<li key={i} className="pure-menu-item">
40+
<a onClick={this.pathChange.bind(this, r.path)} className={this.getClasses("pure-menu-link", r.path)}>{r.text}</a>
41+
</li>
42+
)
43+
} else if (r.hr) {
44+
return (<hr key={i} />)
45+
} else if (r.text) {
46+
return (
47+
<li key={i} className="pure-menu-item">
48+
<span className="pure-menu-link">{r.text}</span>
49+
</li>
50+
)
51+
}
52+
}, this)
53+
54+
return <ul key={index} className="pure-menu-list">{list}</ul>
55+
}
56+
57+
render () {
58+
let list = menulist.map(function (paths, index) {
59+
return this.getRoutesList(paths, index)
60+
}, this)
61+
62+
return (
63+
<div className={classnames("nav", {active: this.state.active})}>
64+
<a className="pure-menu-heading" onClick={this.pathChange.bind(this, '/home')}>React UI</a>
65+
<a className="link-github" href="https://github.com/Lobos/react-ui"><Icon size={2} icon="github" /></a>
66+
<div className="nav-inner">
67+
<div ref="list" className="nav-list">
68+
{list}
69+
</div>
70+
</div>
71+
</div>
72+
)
73+
}
74+
}

app/js/pages/app.jsx

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
'use strict';
2+
3+
4+
import React from 'react'
5+
6+
var Component = React.createClass({
7+
render: function() {
8+
return (
9+
<div className="_app ">
10+
<header className="_header">
11+
<a className="_home-link"></a>
12+
<a className="_menu-link"></a>
13+
<form className="_search">
14+
<input type="search" className="_search-input" placeholder="Search&hellip;" autocomplete="off" autocapitalize="off" autocorrect="off" spellcheck="false" maxlength="20" />
15+
<a className="_search-clear"></a>
16+
<div className="_search-tag"></div>
17+
</form>
18+
<h1 className="_logo">
19+
<a href="/" className="_nav-link" title="Offline API Documentation Browser">Developer</a>
20+
</h1>
21+
<nav className="_nav">
22+
<a href="/offline" className="_nav-link">Offline</a>
23+
<a href="/about" className="_nav-link">About</a>
24+
<a href="/news" className="_nav-link">News</a>
25+
<a href="/help" className="_nav-link">Tips</a>
26+
</nav>
27+
</header>
28+
<section className="_sidebar">
29+
<div className="_list">
30+
list afd dd
31+
</div>
32+
</section>
33+
<section className="_container">
34+
<div className="_content _content-loading"></div>
35+
</section>
36+
</div>
37+
);
38+
}
39+
});
40+
41+
export default Component

0 commit comments

Comments
 (0)