mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
aside
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
# Button 按钮
|
||||
|
||||
- category: Component
|
||||
- API: github.com/react-component/button
|
||||
|
||||
---
|
||||
|
||||
这是一个按钮。
|
||||
|
||||
```html
|
||||
<button>按钮</button>
|
||||
```
|
||||
5
components/button/demo.md
Normal file
5
components/button/demo.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# 基本型
|
||||
|
||||
---
|
||||
|
||||
<button></button>
|
||||
7
components/button/index.md
Normal file
7
components/button/index.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Button 按钮
|
||||
|
||||
- category: CSS
|
||||
|
||||
---
|
||||
|
||||
这是一个按钮。
|
||||
@@ -6,8 +6,3 @@
|
||||
---
|
||||
|
||||
这是一个下拉选择器。
|
||||
|
||||
```html
|
||||
<Select>选择器</Select>
|
||||
```
|
||||
|
||||
3
nico.js
3
nico.js
@@ -1,6 +1,9 @@
|
||||
var path = require('path');
|
||||
|
||||
// {{ settings for nico
|
||||
exports.site = {
|
||||
name: 'Ant Design'
|
||||
};
|
||||
exports.theme = 'theme';
|
||||
exports.source = process.cwd();
|
||||
exports.output = path.join(process.cwd(), '_site');
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{%- set categories = resource.pages|get_all_category %}
|
||||
{%- set items = resource.pages|find_category(post.meta.category) %}
|
||||
<aside class="aside-container">
|
||||
<ul>
|
||||
{%- for category in categories %}
|
||||
{%- set items = resource.pages|find_category(category) %}
|
||||
<li>
|
||||
<h4>{{category}}</h4>
|
||||
<ul>
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}{{post.title}} - {{config.site.name}}{% endblock %}
|
||||
{% block description %}{% if post.summay %}{{post.summary}}{% endif %}{% endblock %}
|
||||
{% extends "page.html" %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<title>Ant Design</title>
|
||||
<title>{% block title %}Ant Design{% endblock %}</title>
|
||||
<link rel="stylesheet" href="/static/normalize.css">
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429685559_8155303.css">
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<nav class="nav">
|
||||
<ul>
|
||||
<li class="{%- if post.filename === 'index' %}current{%- endif %}">
|
||||
<li class="{%- if post.meta.filepath === 'README.md' %}current{%- endif %}">
|
||||
<a href="/">首页</a>
|
||||
</li>
|
||||
<li class="{%- if post.filename === 'start' %}current{%- endif %}">
|
||||
@@ -89,6 +89,7 @@
|
||||
{%- endif %}
|
||||
</h1>
|
||||
{{ post.html }}
|
||||
<CodeBox code="code"></CodeBox>
|
||||
<div id="code-boxes"></div>
|
||||
<script type="text/jsx">
|
||||
React.render(
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}{{post.title}} - {{config.site.name}}{% endblock %}
|
||||
{% block title %}
|
||||
{%- if post.title !== config.site.name %}
|
||||
{{post.title}} - {{config.site.name}}
|
||||
{%- else %}
|
||||
{{config.site.name}}
|
||||
{%- endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block description %}{% if post.summay %}{{post.summary}}{% endif %}{% endblock %}
|
||||
|
||||
@@ -4,13 +4,13 @@ module.exports = function(nico) {
|
||||
var exports = {};
|
||||
|
||||
exports.reader = function(post) {
|
||||
var filename = post.meta.filepath.toLowerCase();
|
||||
if (filename.indexOf('components') >= 0) {
|
||||
var filepath = post.meta.filepath.toLowerCase();
|
||||
if (filepath.indexOf('components') === 0) {
|
||||
post.template = post.meta.template = 'component';
|
||||
} else {
|
||||
post.template = post.meta.template = (post.meta.template || 'page');
|
||||
}
|
||||
if (filename === 'readme.md') {
|
||||
if (filepath === 'readme.md') {
|
||||
post.filename = post.meta.filename = 'index';
|
||||
}
|
||||
return post;
|
||||
|
||||
Reference in New Issue
Block a user