ant-design/site/templates/aside.html

36 lines
1.3 KiB
HTML
Raw Normal View History

2015-07-05 15:43:07 +08:00
{%- set categories = resource.pages|get_categories(post) %}
2015-05-09 18:16:36 +08:00
<aside class="aside-container">
2015-05-09 17:36:15 +08:00
<ul>
2015-07-05 15:43:07 +08:00
{%- for category in categories %}
2015-08-24 15:57:00 +08:00
{%- if category.pages.length === 1 %}
2015-08-22 20:33:43 +08:00
{%- for item in category.pages|splitComponentsByType(category.name) %}
2015-08-22 19:13:06 +08:00
<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>
2015-07-05 15:43:07 +08:00
<ul class="{%- if category === post.meta.category %}aside-list-show{%- endif %}">
2015-08-22 20:16:24 +08:00
{%- 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 %}
2015-07-05 15:43:07 +08:00
{%- endfor %}
</ul>
</li>
2015-08-22 19:13:06 +08:00
{%- endif %}
2015-07-05 15:43:07 +08:00
{%- endfor %}
2015-05-09 17:36:15 +08:00
</ul>
</aside>