mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 09:39:10 +08:00
36 lines
1.3 KiB
HTML
36 lines
1.3 KiB
HTML
{%- set categories = resource.pages|get_categories(post) %}
|
|
<aside class="aside-container">
|
|
<ul>
|
|
{%- for category in categories %}
|
|
{%- if category.pages.length === 1 %}
|
|
{%- for item in category.pages|splitComponentsByType(category.name) %}
|
|
<li class="{%- if item.title === post.title %}current{%- endif %}">
|
|
<a href="{{permalink_url(item)}}" class="{%- if item.meta.disabled %}nav-link-disabled{%- endif %}">
|
|
{{item.title}}
|
|
<span class="chinese">{{item.meta.chinese}}</span>
|
|
</a>
|
|
</li>
|
|
{%- endfor %}
|
|
{%- else %}
|
|
<li open="open">
|
|
<h4>{{category.name}}</h4>
|
|
<ul class="{%- if category === post.meta.category %}aside-list-show{%- endif %}">
|
|
{%- for item in category.pages|splitComponentsByType(category.name) %}
|
|
{%- if item.divider === true %}
|
|
<li class="type-divider">{{item.name}}</li>
|
|
{%- else %}
|
|
<li class="{%- if item.title === post.title %}current{%- endif %}">
|
|
<a href="{{permalink_url(item)}}" class="{%- if item.meta.disabled %}nav-link-disabled{%- endif %}">
|
|
{{item.title}}
|
|
<span class="chinese">{{item.meta.chinese}}</span>
|
|
</a>
|
|
</li>
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
</ul>
|
|
</li>
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
</ul>
|
|
</aside>
|