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

This commit is contained in:
罗宪 2015-06-04 17:20:54 +08:00
commit 47a39a84dd
5 changed files with 72 additions and 47 deletions

View File

@ -1 +1,25 @@
{% extends "page.html" %}
{% block aside %}
{%- include "aside.html" %}
{% endblock %}
{% block content %}
<section class="main-container">
<article class="markdown">
<h1>
{{ post.title }} {{ post.meta.chinese }}
{%- if post.meta.API %}
<a class="api-link" href="http://{{ post.meta.API }}" target="_blank">
<i class="iconfont-home icon-externallink"></i>
API 使用说明
</a>
{%- endif %}
</h1>
{{ post.html }}
{%- if post.meta.template === 'component' && !post.meta.nodemos %}
{%- include "demos.html" %}
{%- endif %}
</article>
</section>
{% endblock %}

33
theme/templates/home.html Normal file
View File

@ -0,0 +1,33 @@
{% extends "page.html" %}
{% block content %}
<div class="main-box" id="main">
<div class="banner-box">
<div id="bannerAnim"></div>
<div class="banner-img fn-alpha-out"></div>
<div class="banner-entry fn-hide">
<div class="entry-title">Ant</div>
<div class="entry-title">Design</div>
<div class="entry-slogan">
{{ config.site.description }}
</div>
<a class="entry-link" href="/docs/start">
<i class="iconfont-home icon-lego"></i>
开始使用
</a>
</div>
</div>
</div>
<script src="/static/homeLoad.js"></script>
<style>
.main-wrapper {
overflow: hidden;
position: relative;
height: calc(100% - 190px);
min-height: 500px;
background: #fff;
transform-style: preserve-3d;
transition: transform .6s cubic-bezier(0.785, 0.135, 0.15, 0.86), height .5s ease-out;
}
</style>
{% endblock %}

View File

@ -56,56 +56,11 @@
</li>
</ul>
</nav>
<div class="nav-phone-icon"></div>
</header>
{%- if post.filepath === 'README.md' %}
<!-- 首页 -->
<div class="main">
<div class="main-box" id="main">
<div class="banner-box">
<div id="bannerAnim"></div>
<div class="banner-img fn-alpha-out"></div>
<div class="banner-entry fn-hide">
<div class="entry-title">Ant</div>
<div class="entry-title">Design</div>
<div class="entry-slogan">
{{ config.site.description }}
</div>
<a class="entry-link" href="/docs/start">
<i class="iconfont-home icon-lego"></i>
开始使用
</a>
</div>
</div>
</div>
</div>
<script src="/static/homeLoad.js"></script>
{%- else %}
<div class="main-wrapper">
{%- if post.meta.template === 'component' %}
{%- include "aside.html" %}
<section class="main-container">
{%- else %}
<section class="main-container main-container-center">
{%- endif %}
<article class="markdown">
<h1>
{{ post.title }} {{ post.meta.chinese }}
{%- if post.meta.API %}
<a class="api-link" href="http://{{ post.meta.API }}" target="_blank">
<i class="iconfont-home icon-externallink"></i>
API 使用说明
</a>
{%- endif %}
</h1>
{{ post.html }}
{%- if post.meta.template === 'component' && !post.meta.nodemos %}
{%- include "demos.html" %}
{%- endif %}
</article>
</section>
{% block aside %}{% endblock %}
{% block content %}{% endblock %}
</div>
{%- endif %}
{%- include "footer.html" %}
</body>
</html>

View File

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

View File

@ -12,6 +12,7 @@ module.exports = function(nico) {
}
if (filepath === 'readme.md') {
post.filename = post.meta.filename = 'index';
post.template = post.meta.template = 'home';
}
if (filepath.indexOf('/demo/') > 0) {
post.template = post.meta.template = 'code';