update website demo

This commit is contained in:
hustcc 2016-10-09 13:12:15 +08:00
parent f6d93efc81
commit 443e14dbef
5 changed files with 68 additions and 53 deletions

View File

@ -4,30 +4,36 @@ import { Link } from 'react-router'
import DynamicChartComponent from './DynamicChartComponent.jsx';
const MainPageComponent = React.createClass({
propTypes: {
},
render: function() {
return (
<div>
<h1> echarts-for-react {this.props.params.type} </h1>
<h3> A very simple echarts(v3.0) wrapper for React. <a href='https://github.com/hustcc/echarts-for-react'>hustcc/echarts-for-react</a></h3>
<h4>
<Link to="/echarts/simple">Simple demo</Link> |
<Link to="/echarts/loading">Echarts loading</Link> |
<Link to="/echarts/api">Echarts API</Link> |
<Link to="/echarts/events">Echarts events</Link> |
<Link to="/echarts/theme">Echarts theme</Link> |
<Link to="/echarts/dynamic">Dynamic chart</Link> |
<Link to="/echarts/map">Map chart</Link>
</h4>
propTypes: {
},
render: function() {
return (
<div>
<h1> echarts-for-react {this.props.params.type} </h1>
<h3> A very simple echarts(v3.0) wrapper for React. <a href='https://github.com/hustcc/echarts-for-react'>hustcc/echarts-for-react</a></h3>
<ins className="adsbygoogle"
style={{display:'block'}}
data-ad-client="ca-pub-7292810486004926"
data-ad-slot="7806394673"
data-ad-format="auto"></ins>
{ this.props.children || <DynamicChartComponent />}
<h3>Get it on GitHub! <a href='https://github.com/hustcc/echarts-for-react'>hustcc/echarts-for-react</a></h3>
</div>
);
}
<h4>
<Link to="/echarts/simple">Simple demo</Link> |
<Link to="/echarts/loading">Echarts loading</Link> |
<Link to="/echarts/api">Echarts API</Link> |
<Link to="/echarts/events">Echarts events</Link> |
<Link to="/echarts/theme">Echarts theme</Link> |
<Link to="/echarts/dynamic">Dynamic chart</Link> |
<Link to="/echarts/map">Map chart</Link>
</h4>
{ this.props.children || <DynamicChartComponent />}
<h3>Get it on GitHub! <a href='https://github.com/hustcc/echarts-for-react'>hustcc/echarts-for-react</a></h3>
</div>
);
}
});
export default MainPageComponent;

View File

@ -33,9 +33,10 @@ h3 {
}
h4 {
padding: 20px;
padding: 5px 20px;
text-align: center;
color: black;
margin: 5px 0;
}
h4 a {
@ -83,7 +84,7 @@ ul {
.parent {
background-color: rgba(255, 255, 255, 0.2);
margin: 50px 0;
margin: 20px 0;
padding: 20px;
}

52
demo/dist/bundle.js vendored

File diff suppressed because one or more lines are too long

View File

@ -9,5 +9,13 @@
</div>
<script type="text/javascript" src="demo/dist/bundle.js"></script>
<!-- sorry for ad -->
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<span style="display:none">
<script src="http://s4.cnzz.com/stat.php?id=1257060683&web_id=1257060683" language="JavaScript"></script>
</span>
</body>
</html>

View File

@ -1,5 +1,6 @@
var webpack = require('webpack');
var uglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
var definePlugin = webpack.DefinePlugin;
module.exports = {
entry: './demo/demo.jsx',
@ -20,6 +21,7 @@ module.exports = {
}]
},
plugins: [
new uglifyJsPlugin({compress: {warnings: false}})
new uglifyJsPlugin({compress: {warnings: false}}),
new definePlugin({'process.env': {NODE_ENV: '"production"'}})
]
};