update directory structure

This commit is contained in:
afc163 2015-07-05 15:43:07 +08:00
parent 95054e3ef8
commit 8d6eeb5cae
13 changed files with 51 additions and 73 deletions

View File

@ -1,6 +1,6 @@
# Motion
- category: Animation
- category: CSS
- chinese: 动画样式
- order: 4

View File

@ -1,9 +1,8 @@
# Natural Motion
# 自然运动
- category: Animation
- chinese: 自然运动
- category: 动画
- order: 0
- nodemos: true
---
现实物体照着一定节奏移动,并不是一开始就移动很快的。
@ -110,4 +109,4 @@ mask:false,exposure:"top"});
})
</script>
上图所示缓动函数easeOutBounce,easeInOutQuad 蓝easeOutBack,easeInBack
上图所示缓动函数easeOutBounce,easeInOutQuad 蓝easeOutBack,easeInBack

View File

@ -1,10 +1,11 @@
# Page turning
# 页面转换
- category: Animation
- category: 动画
- chinese: 页面转换
- order: 2
- nodemos: true
- order: 1
---
###单页面转场动画
从内容A到内容B的转变过程时能有效的吸引用户注意力突出视觉中心提高整体视觉效果。
@ -60,6 +61,3 @@ Normal: 指那些从转场开始到结束都没有发生变化的信息元素
<div class="video-player">
<video preload loop><source src="https://t.alipayobjects.com/images/rmsweb/T1br0gXghtXXXXXXXX.webm" type="video/webm"><source src="https://t.alipayobjects.com/images/rmsweb/T1lcRgXb4gXXXXXXXX.mp4" type="video/mp4"></video>
</div>
 

View File

@ -1,10 +1,10 @@
# Response ITN
# 响应交互
- category: Animation
- chinese: 响应交互
- category: 动画
- order: 1
- nodemos: true
---
响应交互一般是指我们在浏览页面时,点击元素时动画给我们视觉上的反馈,每个交互动效都能给我们带来不同视觉效果。
如搜索框当你点击准备输入时icon将会跑到右边方便点击当然你按回车也是可以提交表单的在你没有输入文字时icon又会恢愎到原来的地置但当你输入了文字后icon将会停留在右边
@ -101,4 +101,4 @@
</div>
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
# 下载
- category: 上手
- category: 入门
- order: 2
---

View File

@ -1,6 +1,6 @@
# 快速上手
- category: 上手
- category: 入门
- order: 1
---

View File

@ -1,6 +1,6 @@
# 介绍
- category: 上手
- category: 入门
- order: 0
---

View File

@ -26,7 +26,7 @@ exports.ignorefilter = function(filepath, subdir) {
if (/\.DS_Store/.test(filepath)) {
return false;
}
if (/^(_site|_theme|node_modules|\.idea)/.test(subdir)) {
if (/^(_site|_theme|node_modules|site|style|\.idea)/.test(subdir)) {
return false;
}
return true;

View File

@ -1,14 +1,21 @@
{%- set categories = resource.pages|get_categories(post) %}
<aside class="aside-container">
<ul>
{%- set items = resource.pages|find_category(post.meta.category) %}
<li>
<ul>
{%- for item in items %}
<li class="{%- if item.title === post.title %}current{%- endif %}">
<a href="{{permalink_url(item)}}">{{item.title}}</a>
</li>
{%- endfor %}
</ul>
</li>
{%- for category in categories %}
{%- set items = resource.pages|find_category(category) %}
<li>
<h4>{{category}}</h4>
<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)}}">
{{item.title}}
<span class="chinese">{{item.meta.chinese}}</span>
</a>
</li>
{%- endfor %}
</ul>
</li>
{%- endfor %}
</ul>
</aside>

View File

@ -1,21 +0,0 @@
{%- set categories = resource.pages|get_components_categories %}
<aside class="aside-container">
<ul>
{%- for category in categories %}
{%- set items = resource.pages|find_category(category) %}
<li>
<h4>{{category}}</h4>
<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)}}">
{{item.title}}
<span class="chinese">{{item.meta.chinese}}</span>
</a>
</li>
{%- endfor %}
</ul>
</li>
{%- endfor %}
</ul>
</aside>

View File

@ -34,10 +34,6 @@ window.require = function(path) {
</script>
{% endblock %}
{% block aside %}
{%- include "component-aside.html" %}
{% endblock %}
{% block content %}
<section class="main-container">
<article class="markdown">

View File

@ -33,14 +33,14 @@
<li class="{%- if post.meta.filepath === 'README.md' %}current{%- endif %}">
<a href="/">首页</a>
</li>
<li class="{%- if post.meta.filepath|isFolder('docs') %}current{%- endif %}">
<a href="/docs/introduce">上手</a>
<li class="{%- if post.directory === 'docs' %}current{%- endif %}">
<a href="/docs/introduce">使用</a>
</li>
<li class="{%- if post.meta.template === 'component' %}current{%- endif %}">
<li class="{%- if post.directory === 'components' %}current{%- endif %}">
<a href="/components">组件</a>
</li>
<li class="{%- if post.meta.filepath|isFolder('design') %}current{%- endif %}">
<a href="/design/">设计</a>
<li class="{%- if post.directory === 'design' %}current{%- endif %}">
<a class="disabled" href="/design/">设计</a>
</li>
<li>
<a target="_blank" href="github.com/ant-design/ant-design">Github</a>

View File

@ -2,7 +2,7 @@ var _ = require('lodash');
module.exports = function(nico) {
var exports = {};
var categories;
var Categories = {};
exports.reader = function(post) {
var filepath = post.meta.filepath.toLowerCase();
@ -37,17 +37,19 @@ module.exports = function(nico) {
});
return ret;
},
get_components_categories: function(posts) {
categories = categories || _.uniq(Object.keys(posts).map(function(key) {
get_categories: function(posts, post) {
var rootDirectory = post.directory.split('/')[0];
var categories = Categories[rootDirectory] || _.uniq(Object.keys(posts).map(function(key) {
var item = posts[key];
if (item.meta.template !== 'component') {
return;
if (item.directory.split('/')[0] === post.directory.split('/')[0]) {
return item.meta.category;
}
return item.meta.category;
}));
})).filter(function(n){ return n != undefined });
categories = categories.sort(function(a, b) {
return a.length - b.length;
});
})
Categories[rootDirectory] = categories;
console.log(categories);
return categories;
},
find_demo_in_component: function(pages, directory) {
@ -87,9 +89,6 @@ module.exports = function(nico) {
return items.filter(function(item, i) {
return (i+1)%2 === 0;
});
},
isFolder: function(filepath, folder) {
return filepath.indexOf(folder + '/') === 0;
}
};