From cdcaa0d9ff13a30850ae8de7a404b8997c6db549 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 4 Jun 2015 17:56:09 +0800 Subject: [PATCH] sidebar for docs --- docs/develop-as-components.md | 8 ++++++++ docs/download.md | 5 ++++- docs/getting-started.md | 8 ++++++++ docs/introduce.md | 17 +++++++++++++++++ docs/start.md | 19 ------------------- static/style.css | 1 + theme/templates/aside.html | 28 ++++++++++------------------ theme/templates/component-aside.html | 22 ++++++++++++++++++++++ theme/templates/component.html | 2 +- theme/templates/layout.html | 4 ++-- theme/templates/page.html | 6 ++++-- 11 files changed, 77 insertions(+), 43 deletions(-) create mode 100644 docs/develop-as-components.md create mode 100644 docs/getting-started.md create mode 100644 docs/introduce.md delete mode 100644 docs/start.md create mode 100644 theme/templates/component-aside.html diff --git a/docs/develop-as-components.md b/docs/develop-as-components.md new file mode 100644 index 0000000000..a40ca96df3 --- /dev/null +++ b/docs/develop-as-components.md @@ -0,0 +1,8 @@ +# 组件开发模式 + +- category: start +- order: 2 + +--- + +待补充。 diff --git a/docs/download.md b/docs/download.md index 04eb36862a..71f6c9fcc8 100644 --- a/docs/download.md +++ b/docs/download.md @@ -1,5 +1,8 @@ # 下载 +- category: start +- order: 3 + --- - +待补充。 diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000000..d1f20be492 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,8 @@ +# 快速上手 + +- category: start +- order: 1 + +--- + +待补充。 diff --git a/docs/introduce.md b/docs/introduce.md new file mode 100644 index 0000000000..db373d3fe2 --- /dev/null +++ b/docs/introduce.md @@ -0,0 +1,17 @@ +# 介绍 + +- category: start +- order: 0 + +--- + +下一个设计&前端框架。 + + +## 特性 + + +## 谁在使用 + + +## Roadmap diff --git a/docs/start.md b/docs/start.md deleted file mode 100644 index f67c259fc4..0000000000 --- a/docs/start.md +++ /dev/null @@ -1,19 +0,0 @@ -# Ant Design - ---- - -下一个设计&前端框架。 - -## 五分钟上手 - - -## 介绍 - - -## 工具 - - -## 部署和使用 - - -## 谁在使用 diff --git a/static/style.css b/static/style.css index f1e0244034..97f3615cf9 100644 --- a/static/style.css +++ b/static/style.css @@ -429,6 +429,7 @@ footer ul li > a { width: 260px; background: #F9F9F9; padding-top: 10px; + margin-bottom: 50px; } .aside-container>ul>li { diff --git a/theme/templates/aside.html b/theme/templates/aside.html index 1ac769c4ae..e7c22626cc 100644 --- a/theme/templates/aside.html +++ b/theme/templates/aside.html @@ -1,22 +1,14 @@ - -{%- set categories = resource.pages|get_all_category %} diff --git a/theme/templates/component-aside.html b/theme/templates/component-aside.html new file mode 100644 index 0000000000..1ac769c4ae --- /dev/null +++ b/theme/templates/component-aside.html @@ -0,0 +1,22 @@ + +{%- set categories = resource.pages|get_all_category %} + diff --git a/theme/templates/component.html b/theme/templates/component.html index 70f1816dd2..a630007107 100644 --- a/theme/templates/component.html +++ b/theme/templates/component.html @@ -1,7 +1,7 @@ {% extends "page.html" %} {% block aside %} -{%- include "aside.html" %} +{%- include "component-aside.html" %} {% endblock %} {% block content %} diff --git a/theme/templates/layout.html b/theme/templates/layout.html index ac2d8bbd0c..03380fcf9d 100644 --- a/theme/templates/layout.html +++ b/theme/templates/layout.html @@ -36,8 +36,8 @@
  • 首页
  • -
  • - 上手 +
  • + 上手
  • 设计 diff --git a/theme/templates/page.html b/theme/templates/page.html index 953aae630c..5a11df32e2 100644 --- a/theme/templates/page.html +++ b/theme/templates/page.html @@ -10,10 +10,12 @@ {% block description %}{% if post.summay %}{{post.summary}}{% endif %}{% endblock %} -{% block aside %}{% endblock %} +{% block aside %} +{%- include "aside.html" %} +{% endblock %} {% block content %} -
    +

    {{ post.title }} {{ post.meta.chinese }}

    {{ post.html }}