{% macro articles(_articles) %}
{% for article in _articles %}
<li class="one_menu_item">
{% if article.path and getPageByPath(article.path) %}
{% if article.articles.length > 0 %}
<a class=" {% if article.path == file.path and not article.anchor %}active{% endif %} " style="width:281px;font-family:微软雅黑">
{% else %}
<a href="{{ article.path|resolveFile }}{{ article.anchor }}" class=" {% if article.path == file.path and not article.anchor %}active{% endif %} " style="width:281px;font-family:微软雅黑">
{% endif %}
{% elif article.url %}
{% if article.articles.length > 0 %}
<a target="_blank">
{% else %}
<a target="_blank" href="{{ article.url }}" >
{% endif %}
{% else %}
<span >
{% endif %}
{% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %}
<b>{{ article.level }}.</b>
{% endif %}
{{ article.title }}
{% if article.path or article.url %}
</a>
{% else %}
</span>
{% endif %}

{% if article.articles.length > 0 %}
<ul class="two_menu">
{{ articles_two(article.articles, file, config) }}
</ul>
{% endif %}
</li>

{% endfor %}

{% endmacro %}

{% macro articles_two(_arts) %}
{% for art in _arts %}
<li class="two_menu_item">
{% if art.path and getPageByPath(art.path) %}
{% if art.articles.length > 0 %}
<a class=" {% if art.path == file.path and not art.anchor %}active{% endif %} two_menu_close two" style="width:281px;font-family:微软雅黑">
{% else %}
<a href="{{ art.path|resolveFile }}{{ art.anchor }}" class=" {% if art.path == file.path and not art.anchor %}active{% endif %} two" style="width:281px;font-family:微软雅黑">
{% endif %}
{% elif art.url %}
{% if art.articles.length > 0 %}
<a target="_blank">
{% else %}
<a target="_blank" href="{{ art.url }}" >
{% endif %}

{% else %}
<span >
{% endif %}
{% if art.level != "0" and config.pluginsConfig['theme-default'].showLevel %}
<b>{{ art.level }}.</b>
{% endif %}
{{ art.title }}
{% if art.path or art.url %}
</a>
{% else %}
</span>
{% endif %}
{% if art.articles.length > 0 %}
<ul class="three_menu">
{{ articles_three(art.articles, file, config) }}
</ul>
{% endif %}

</li>
{% endfor %}
{% endmacro %}

{% macro articles_three(_arts) %}
{% for art in _arts %}
<li class="three_menu_item">
{% if art.path and getPageByPath(art.path) %}
<a href="{{ art.path|resolveFile }}{{ art.anchor }}" class=" {% if art.path == file.path and not art.anchor %}active{% endif %} three" style="width:281px;font-family:微软雅黑">
{% elif art.url %}
<a target="_blank" href="{{ art.url }} three" style="width:281px;font-family:微软雅黑">
{% else %}
<span>
{% endif %}
{% if art.level != "0" and config.pluginsConfig['theme-default'].showLevel %}
<b>{{ art.level }}.</b>
{% endif %}
{{ art.title }}
{% if art.path or art.url %}
</a>
{% else %}
</span>
{% endif %}
</li>
{% endfor %}

{% endmacro %}

{% block book_summary %}

<img class="doc_logo" src="{{'images/logo.jpg'|resolveAsset }}">
<img class="doc_title" src="{{'images/doc_title.jpg'|resolveAsset }}">
<ul id="doc_collapse" class="one_menu">
{% for part in summary.parts %}
{{ articles(part.articles, file, config) }}
{% endfor %}
</ul>

{% endblock %}