Skip to content

Commit

Permalink
从 echarts-www/doc同步回来
Browse files Browse the repository at this point in the history
  • Loading branch information
100pah committed Jul 16, 2015
1 parent 32b1209 commit aaf403f
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 47 deletions.
19 changes: 14 additions & 5 deletions doc/asset/css/echartsHome.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ body p {
font-weight: bolder;
border-bottom: 3px solid rgb(62,152, 197);
}
@media (max-width: 980px) {
.navbar-default .navbar-nav > li > a {
padding-left: 8px;
padding-right: 8px;
}
}
.navbar-default .navbar-nav > li > a:hover {
background-color: #eee;
}
.navbar-fixed-top {
z-index: 999999;
}
.carousel-caption.ecx-link {
bottom: 20px;
}
Expand Down Expand Up @@ -215,15 +224,15 @@ hr {
}
.col-md-4.ani {
transition: width 1s;
-moz-transition: width 1s;
-webkit-transition: width 1s;
-moz-transition: width 1s;
-webkit-transition: width 1s;
-o-transition: width 1s;
}
.col-md-8.ani {
transition: width 1s;
-moz-transition: width 1s;
-moz-transition: width 1s;
-webkit-transition: width 1s;
-o-transition: width 1s;
-o-transition: width 1s;
}
.main {
height: 400px;
Expand Down Expand Up @@ -368,7 +377,7 @@ table.full {width:100%;}
.prettyprint {
margin-top: 8px;
}
.prettyprint xmp{
.prettyprint xmp{
margin: 0px;
padding: 10px;
}
Expand Down
47 changes: 37 additions & 10 deletions doc/asset/js/echartsHome.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
var version = '2.2.6';
var sp = location.href.lastIndexOf('/');
var ep = location.href.lastIndexOf('.html');
var curPage = sp < ep ? location.href.slice(sp + 1, ep) : 'index';
var enVersion = (location.hash && location.hash.indexOf('-en') != -1)
|| location.href.indexOf('-en') != -1;
var sp = location.pathname.lastIndexOf('/');
var ep = location.pathname.lastIndexOf('.html');
var curPage = sp < ep ? location.pathname.slice(sp + 1, ep) : 'index';
var enVersion = location.href.indexOf('-en.html') != -1;

var activeClass = {};
var loc = {};
Expand All @@ -19,12 +18,16 @@ switch (curPage) {
loc.doc = './doc';
loc.about = './doc';
loc.changelog = './doc';
loc.option = './doc';
loc.spreadsheet = './doc';
loc.start = './doc';
loc.img = './doc';
break;
case 'feature' :
case 'example' :
case 'doc' :
case 'option' :
case 'spreadsheet' :
case 'about' :
case 'changelog' :
case 'start' :
Expand All @@ -42,11 +45,20 @@ switch (curPage) {
loc.doc = extSub + '../../doc';
loc.about = extSub + '../../doc';
loc.changelog = extSub + '../../doc';
loc.option = extSub + '../../doc';
loc.spreadsheet = extSub + '../../doc';
loc.start = extSub + '../../doc';
loc.img = extSub + '../../doc';
break;
}

// Those pages only exist in echarts-www project,
// but not in http://ecomfe.github.io/echarts/ and doc in echarts project.
if (location.href.indexOf('.baidu.com') < 0) {
loc.option = 'http://echarts.baidu.com/doc';
loc.spreadsheet = 'http://echarts.baidu.com/doc';
}

$('#head')[0].innerHTML =
'<div class="container">'
+ '<div class="navbar-header">'
Expand All @@ -69,13 +81,31 @@ $('#head')[0].innerHTML =
? ('<li class="' + (activeClass.index || '') + '"><a href="' + (loc.index || '.') + '/index-en.html">Home</a></li>'
+ '<li class="' + (activeClass.feature || '') + '"><a href="' + (loc.feature || '.') + '/feature-en.html">Feature</a></li>'
+ '<li class="' + (activeClass.example || '') + '"><a href="' + (loc.example || '.') + '/example-en.html">Example</a></li>'
+ '<li class="' + (activeClass.doc || '') + '"><a href="' + (loc.doc || '.') + '/doc-en.html">API & Doc</a></li>'
// + '<li class="' + (activeClass.doc || '') + '"><a href="' + (loc.doc || '.') + '/doc-en.html">API & Doc</a></li>'
)
: ('<li class="' + (activeClass.index || '') + '"><a href="' + (loc.index || '.') + '/index.html">首页</a></li>'
+ '<li class="' + (activeClass.feature || '') + '"><a href="' + (loc.feature || '.') + '/feature.html">特性</a></li>'
+ '<li class="' + (activeClass.example || '') + '"><a href="' + (loc.example || '.') + '/example.html">实例</a></li>'
+ '<li class="' + (activeClass.doc || '') + '"><a href="' + (loc.doc || '.') + '/doc.html">文档</a></li>'
// + '<li class="' + (activeClass.doc || '') + '"><a href="' + (loc.doc || '.') + '/doc.html">文档</a></li>'
))
+ '<li class="dropdown ' + (activeClass.doc || activeClass.option || '') + '">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' + (enVersion ? 'API & Doc' : '文档') + '<b class="caret"></b></a>'
+ '<ul class="dropdown-menu">'
+ '<li class=""><a href="' + (loc.doc || '.') + '/doc' + (enVersion ? '-en.html">Base Document' : '.html">参考手册') + '</a></li>'
+ '<li class=""><a href="' + (loc.option || '.') + '/option' + (enVersion ? '-en.html">Option Manual' : '.html">配置项查找工具') + '</a></li>'
+ '</ul>'
+ '</li>'
+ '<li class="dropdown ' + (activeClass.spreadsheet || '') + '">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' + (enVersion ? 'Tool' : '工具') + '<b class="caret"></b></a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="http://ecomfe.github.io/echarts-builder-web/">' + (enVersion ? 'Online Builder' : '在线构建工具') + '</a></li>'
+ '<li><a href="' + (loc.example || '.') + '/example/theme.html">' + (enVersion ? 'Theme Preview' : '皮肤主题预览') + '</a></li>'
+ '<li><a href="' + (loc.example || '.') + '/example/themeDesigner.html">' + (enVersion ? 'Theme Designer' : '皮肤主题设计工具') + '</a></li>'
+ '<li><a href="http://ecomfe.github.io/echarts-map-tool/">' + (enVersion ? 'Map Data Tool' : '地图数据生成工具') + '</a></li>'
+ '<li><a href="' + (loc.spreadsheet || '.') + '/spreadsheet' + (enVersion ? '-en.html">Spreadsheet Data Tool' : '.html">Excel 数据转换工具') + '</a></li>'
+ (enVersion ? '' : '<li><a target="_blank" href="http://study.163.com/course/courseMain.htm?courseId=1016007">视频教程</a></li>')
+ '</ul>'
+ '</li>'
/*
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">教学 <b class="caret"></b></a>'
Expand All @@ -91,9 +121,6 @@ $('#head')[0].innerHTML =
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' + (enVersion ? 'Download' : '下载') + '<b class="caret"></b></a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="http://ecomfe.github.io/echarts-builder-web/">' + (enVersion ? 'Online builder' : '在线构建工具') + '</a></li>'
+ '<li><a href="http://ecomfe.github.io/echarts-map-tool/">' + (enVersion ? 'Map tool' : '地图数据生成工具') + '</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="http://echarts.baidu.com/build/echarts-' + version + '.zip"> echarts-' + version + ' (from Baidu)</a></li>'
+ '<li><a href="https://github.com/ecomfe/echarts/archive/' + version + '.zip"> echarts-' + version + ' (from GitHub)</a></li>'
+ '<li><a href="http://echarts.baidu.com/build/echarts-m-1.0.0.zip"> echarts-m-1.0.0 (beta)</a></li>'
Expand Down
33 changes: 17 additions & 16 deletions doc/changelog-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ <h3>2.2.6<small> (2015-07-15) </small></h3>
<ul>
<li>【+】Add heatmap。See example <a href="./example/heatmap.html">heatmap</a></li>
<li>【+】Add <a href="http://echarts.baidu.com/doc/option.html">Option Manual</a></li>
<li>【+】Add <a href="http://echarts.baidu.com/doc/spreadsheet.html">Spreadsheet Data Conversion Tool</a></li>
<li>[^] Optimize event river layout algorithm</li>
<li>[^] Fix tooltip bug of multiple connected charts in 2.2.5</li>
<li>[?] Dependence, <a href="http://ecomfe.github.io/zrender/" target="_blank">ZRender</a> 2.1.1+</li>
Expand Down Expand Up @@ -161,8 +162,8 @@ <h3>2.2.0<small>( 2015-01-30 )</small></h3>
<li>[#] [force]Fix line width configuration.</li>
<li>[#] [bar]Bar category gap optimize under multiple stack.</li>
<li>[#] [tooltip][markLine]Fix Multi-Level Control fail.</li>
<li>[#] [valueAxis]Optimize the value interval adjustment algorithm, fix
<a href="https://github.com/ecomfe/echarts/issues/1012" target="_blank">#1012 »</a>,
<li>[#] [valueAxis]Optimize the value interval adjustment algorithm, fix
<a href="https://github.com/ecomfe/echarts/issues/1012" target="_blank">#1012 »</a>,
<a href="https://github.com/ecomfe/echarts/issues/1021" target="_blank">#1021 »</a>
</li>
<li>[#] Several issues. Closes
Expand Down Expand Up @@ -205,16 +206,16 @@ <h3>2.1.9 <small>( 2014-12-08 )</small></h3>
<li>[?] Dependence, <a href="http://ecomfe.github.io/zrender/" target="_blank">ZRender</a> 2.0.6+</li>
</ul>
</div>

<div>
<h3>2.1.8 <small>( 2014-11-07 )</small></h3>
<ul>
<li>【+】 <a href="../index-en.html">English home page</a> launch. Translate by <a href="http://weibo.com/u/1796972522" target="_blank">Huan Wang</a>.</li>
<li>【+】 [echarts-optimizer]New single file building strategy, <a href="https://github.com/ecomfe/echarts-optimizer" target="_blank">tool</a> and change the way of import, by <a href="http://weibo.com/errorrik" target="_blank">erik</a>.</li>
<li>【+】 [extension][BMap]New extension, BMap which is base on map.baidu.com, see
<a href="../extension/BMap/doc/doc.html" target="_blank">doc</a>,
<a href="../extension/BMap/doc/BMap.html" target="_blank">example1</a>,
<a href="../extension/BMap/doc/example.html" target="_blank">example2</a>,
<li>【+】 [extension][BMap]New extension, BMap which is base on map.baidu.com, see
<a href="../extension/BMap/doc/doc.html" target="_blank">doc</a>,
<a href="../extension/BMap/doc/BMap.html" target="_blank">example1</a>,
<a href="../extension/BMap/doc/example.html" target="_blank">example2</a>,
by <a href="http://weibo.com/wind108369" target="_blank">Ji Yang</a>.
</li>
<li>【+】 [eventRiver]Added a new chart type, eventRiver. see <a href="./example.html#eventRiver" target="_blank">this »</a>, by <a href="http://weibo.com/u/2076050925" target="_blank">Limei Che</a>.</li>
Expand All @@ -227,7 +228,7 @@ <h3>2.1.8 <small>( 2014-11-07 )</small></h3>
<li>【+】 [chord]Chord serie have ribbonType option to switch between two different style.</li>
<li>【+】 [timeAxis]Add a new axis type 'time' ( beta ).</li>
<li>【^】 [valueAxis]Optimize the value interval adjustment algorithm, splitNumber default to automatic, abolish power, precision, by <a href="https://github.com/i6ma" target="_blank">Shiwei Xie</a>.</li>
<li>【^】 [pie]Optimize the pie's label layout algorithm, Closes
<li>【^】 [pie]Optimize the pie's label layout algorithm, Closes
<a href="https://github.com/ecomfe/echarts/issues/326" target="_blank">#326 »</a>,
<a href="https://github.com/ecomfe/echarts/issues/405" target="_blank">#405 »</a>,
<a href="https://github.com/ecomfe/echarts/issues/290" target="_blank">#290 »</a>.
Expand Down Expand Up @@ -272,10 +273,10 @@ <h3>2.1.8 <small>( 2014-11-07 )</small></h3>
<h3>2.0.4 <small> (2014-09-23)</small></h3>
<ul>
<li>【+】 [force] Added support for image symbol in force-directed charts.</li>
<li>【#】 [line] Negative smooth curve. Closes
<a href="https://github.com/ecomfe/echarts/issues/191" target="_blank">#191 »</a>,
<a href="https://github.com/ecomfe/echarts/issues/227" target="_blank">#227 »</a>,
<a href="https://github.com/ecomfe/echarts/issues/457" target="_blank">#457 »</a>,
<li>【#】 [line] Negative smooth curve. Closes
<a href="https://github.com/ecomfe/echarts/issues/191" target="_blank">#191 »</a>,
<a href="https://github.com/ecomfe/echarts/issues/227" target="_blank">#227 »</a>,
<a href="https://github.com/ecomfe/echarts/issues/457" target="_blank">#457 »</a>,
<a href="https://github.com/ecomfe/echarts/issues/521" target="_blank">#521 »</a>.
</li>
<li>【#】 Image can't be displayed in IE8. Closes <a href="https://github.com/ecomfe/echarts/issues/691" target="_blank">#691 »</a>.</li>
Expand Down Expand Up @@ -478,8 +479,8 @@ <h3>1.3.7 <small> (2014-01-27)</small></h3>
<li>[^] Improved text clarity in IE8-.</li>
<li>[#] [toolbox] Fixed issue with possible conflict styles pollution caused by dynamic types.</li>
<li>[#] Fixed issue with borderWidth becoming 1 when set as 0.</li>
<li>[#] Several issues. Closes
<a href="https://github.com/ecomfe/echarts/issues/189" target="_blank">#189 »</a>
<li>[#] Several issues. Closes
<a href="https://github.com/ecomfe/echarts/issues/189" target="_blank">#189 »</a>
<a href="https://github.com/ecomfe/echarts/issues/190" target="_blank">#190 »</a>
<a href="https://github.com/ecomfe/echarts/issues/193" target="_blank">#193 »</a>
<a href="http://www.oschina.net/question/1384706_141045" target="_blank">#IE8 - red background »</a>.
Expand Down Expand Up @@ -692,8 +693,8 @@ <h3>1.0.0 <small> (2013-06-30)</small></h3>
<li>Multi-Series Stacking</li>
</ul>
<li>Multi-Level Control, Customizability</li>
<li>Event Interaction:
<br/>REFRESH, CLICK, HOVER, DATA_CHANGED, MAGIC_TYPE_CHANGED,
<li>Event Interaction:
<br/>REFRESH, CLICK, HOVER, DATA_CHANGED, MAGIC_TYPE_CHANGED,
<br/>DATA_VIEW_CHANGED, DATA_ZOOM, LEGEND_SELECTED</li>
</ul>
</div>
Expand Down
Loading

0 comments on commit aaf403f

Please sign in to comment.