mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-29 18:50:00 +08:00
fix demos
This commit is contained in:
parent
9ee6b4f204
commit
5db36b906e
25
theme/templates/demos.html
Normal file
25
theme/templates/demos.html
Normal file
@ -0,0 +1,25 @@
|
||||
<h2 class="component-demos">
|
||||
组件演示
|
||||
<i class="iconfont-home icon-all" title="展开全部代码"></i>
|
||||
{%- if post.meta.sketch %}
|
||||
<a class="sketch-link" href="{{ post.meta.sketch }}" target="_blank">
|
||||
<i class="iconfont-home icon-download"></i>
|
||||
Sketch 下载
|
||||
</a>
|
||||
{%- endif %}
|
||||
</h2>
|
||||
<div class="code-boxes clearfix">
|
||||
{%- set items = resource.pages|find_demo_in_component(post.meta.directory) %}
|
||||
<div class="code-boxes-col">
|
||||
{%- for item in items|odd %}
|
||||
{%- set post = item.meta.filepath|parsePost %}
|
||||
{%- include "code.html" %}
|
||||
{%- endfor %}
|
||||
</div>
|
||||
<div class="code-boxes-col">
|
||||
{%- for item in items|even %}
|
||||
{%- set post = item.meta.filepath|parsePost %}
|
||||
{%- include "code.html" %}
|
||||
{%- endfor %}
|
||||
</div>
|
||||
</div>
|
@ -102,31 +102,7 @@
|
||||
</h1>
|
||||
{{ post.html }}
|
||||
{%- if post.meta.template === 'component' %}
|
||||
<h2 class="component-demos">
|
||||
组件演示
|
||||
<i class="iconfont-home icon-all" title="展开全部代码"></i>
|
||||
{%- if post.meta.sketch %}
|
||||
<a class="sketch-link" href="{{ post.meta.sketch }}" target="_blank">
|
||||
<i class="iconfont-home icon-download"></i>
|
||||
Sketch 下载
|
||||
</a>
|
||||
{%- endif %}
|
||||
</h2>
|
||||
<div class="code-boxes clearfix">
|
||||
{%- set items = resource.pages|find_demo_in_component(post.meta.directory) %}
|
||||
<div class="code-boxes-col">
|
||||
{%- for item in items|odd %}
|
||||
{%- set post = item.meta.filepath|parsePost %}
|
||||
{%- include "code.html" %}
|
||||
{%- endfor %}
|
||||
</div>
|
||||
<div class="code-boxes-col">
|
||||
{%- for item in items|even %}
|
||||
{%- set post = item.meta.filepath|parsePost %}
|
||||
{%- include "code.html" %}
|
||||
{%- endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{%- include "demos.html" %}
|
||||
{%- endif %}
|
||||
</article>
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user