sidebar for docs

This commit is contained in:
afc163 2015-06-04 17:56:09 +08:00
parent 47a39a84dd
commit cdcaa0d9ff
11 changed files with 77 additions and 43 deletions

View File

@ -0,0 +1,8 @@
# 组件开发模式
- category: start
- order: 2
---
待补充。

View File

@ -1,5 +1,8 @@
# 下载
- category: start
- order: 3
---
待补充。

8
docs/getting-started.md Normal file
View File

@ -0,0 +1,8 @@
# 快速上手
- category: start
- order: 1
---
待补充。

17
docs/introduce.md Normal file
View File

@ -0,0 +1,17 @@
# 介绍
- category: start
- order: 0
---
下一个设计&前端框架。
## 特性
## 谁在使用
## Roadmap

View File

@ -1,19 +0,0 @@
# Ant Design
---
下一个设计&前端框架。
## 五分钟上手
## 介绍
## 工具
## 部署和使用
## 谁在使用

View File

@ -429,6 +429,7 @@ footer ul li > a {
width: 260px;
background: #F9F9F9;
padding-top: 10px;
margin-bottom: 50px;
}
.aside-container>ul>li {

View File

@ -1,22 +1,14 @@
<script src="/dist/index.js"></script>
{%- set categories = resource.pages|get_all_category %}
<aside class="aside-container">
<ul>
{%- for category in categories %}
{%- set items = resource.pages|find_category(category) %}
<li>
<h4>{{category}}</h4>
<ul>
{%- 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 %}
{%- 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>
</ul>
</aside>

View File

@ -0,0 +1,22 @@
<script src="/dist/index.js"></script>
{%- set categories = resource.pages|get_all_category %}
<aside class="aside-container">
<ul>
{%- for category in categories %}
{%- set items = resource.pages|find_category(category) %}
<li>
<h4>{{category}}</h4>
<ul>
{%- 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,7 +1,7 @@
{% extends "page.html" %}
{% block aside %}
{%- include "aside.html" %}
{%- include "component-aside.html" %}
{% endblock %}
{% block content %}

View File

@ -36,8 +36,8 @@
<li class="{%- if post.meta.filepath === 'README.md' %}current{%- endif %}">
<a href="/">首页</a>
</li>
<li class="{%- if post.filename === 'start' %}current{%- endif %}">
<a href="/docs/start">上手</a>
<li class="{%- if post.meta.category === 'start' %}current{%- endif %}">
<a href="/docs/introduce">上手</a>
</li>
<li class="{%- if post.filename === 'design' %}current{%- endif %}">
<a href="/docs/design">设计</a>

View File

@ -10,10 +10,12 @@
{% block description %}{% if post.summay %}{{post.summary}}{% endif %}{% endblock %}
{% block aside %}{% endblock %}
{% block aside %}
{%- include "aside.html" %}
{% endblock %}
{% block content %}
<section class="main-container main-container-center">
<section class="main-container">
<article class="markdown">
<h1>{{ post.title }} {{ post.meta.chinese }}</h1>
{{ post.html }}