Browse Source

Merge branch 'master' of github.com:ant-design/ant-design

pull/16/head
展新 10 years ago
parent
commit
2a3185bbd7
  1. 4
      components/layout/index.md
  2. 2
      site/templates/component-aside.html
  3. 24
      static/script.js
  4. 7
      static/style.css

4
components/layout/index.md

@ -8,6 +8,8 @@
## 设计理念
24 栅格系统。
<div class="row demo-row" >
<div class="col-24 demo-col demo-col-1">
100%
@ -130,4 +132,4 @@
.hight-80 {
height: 80px;
}
</style>
</style>

2
site/templates/component-aside.html

@ -5,7 +5,7 @@
{%- set items = resource.pages|find_category(category) %}
<li>
<h4>{{category}}</h4>
<ul class="{%- if category === post.meta.category %}show{%- endif %}">
<ul class="{%- if category === post.meta.category %}aside-list-show{%- endif %}">
{%- for item in items %}
<li class="{%- if item.title === post.title %}current{%- endif %}">
<a href="{{permalink_url(item)}}">

24
static/script.js

@ -33,7 +33,19 @@ $(function() {
$(this).parent().parent().addClass('expand');
}
});
$.easing['jswing'] = $.easing['swing'];
$.extend($.easing,{
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
}
});
var navFunc = {
navStrArr: [],
init: function() {
@ -124,19 +136,25 @@ $(function() {
var self = this;
var title = self.listBox.find("h4");
title.bind("click", function(e) {
var parent = $(this).parent();
var parent = $(this).parent(),
list=parent.find("ul");
if (parent.attr("open")) {
parent.removeAttr("open");
if (parent.index() == self.num) {
$(this).addClass("current");
}
list.animate({marginTop:-list.height()},400,"easeInOutCirc",function (){
list.css({"display":"none"})
})
} else {
parent.attr("open", true);
if (parent.index() == self.num) {
$(this).removeClass("current");
}
list.css({"display":"block","margin-top":-list.height()});
list.animate({marginTop:0},400,"easeInOutCirc")
}
parent.find("ul").slideToggle(300);
//parent.find("ul").slideToggle(300);
});
}
};

7
static/style.css

@ -117,7 +117,6 @@ header {
overflow: hidden;
border-bottom: 1px solid #eee;
font-size: 16px;
}
.fn-hide {
@ -456,13 +455,16 @@ footer ul li > a {
cursor: pointer;
transition: background .5s, border .5s;
border-left: 3px solid transparent;
position: relative;
z-index: 1;
background: #F9F9F9;
}
.aside-container li>ul {
display: none;
}
.aside-container li>ul.show {
.aside-container li>ul.aside-list-show {
display: block;
}
@ -1719,6 +1721,7 @@ footer ul li > a {
.code-box-meta > p {
font-size: 12px;
margin: 0.5em 0;
padding-right: 25px;
}
.code-box .collapse {

Loading…
Cancel
Save