move API to bottom

This commit is contained in:
afc163 2015-08-19 11:26:30 +08:00
parent 8ff9059316
commit 00a0f7b2b0
4 changed files with 28 additions and 18 deletions

View File

@ -17,5 +17,6 @@
{%- if post.meta.template === 'component' && !post.meta.nodemos %}
{%- include "demos.html" %}
{%- endif %}
<div class="api-container markdown"></div>
</section>
{% endblock %}

View File

@ -8,7 +8,7 @@
</a>
{%- endif %}
</h2>
<div class="code-boxes clearfix">
<div class="code-boxes">
{%- set items = resource.pages|find_demo_in_component(post.meta.directory) %}
{%- if post.meta.cols == 1 %}
<div class="code-boxes-col-1-1">

View File

@ -33,6 +33,10 @@ $(function() {
$(this).parent().parent().addClass('expand');
}
});
// 移动 API 文档到演示下方
$('.markdown #api').nextAll().andSelf().appendTo('.api-container');
$.easing['jswing'] = $.easing['swing'];
$.extend($.easing,{
easeInCirc: function (x, t, b, c, d) {
@ -46,6 +50,7 @@ $(function() {
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
}
});
var navFunc = {
navStrArr: [],
init: function() {

View File

@ -1671,6 +1671,10 @@ footer ul li > a {
color: #3B4357;
}
.code-boxes {
overflow: hidden;
}
.code-boxes-col-1-1 {
width: 80%;
}