{% load i18n %}
{% load blog_tags %}

<div class="menu-container">
    <ul id="nav-menu" class="nav-menu">
        <li class="menu-item {% if not tag_name and not page_type %}current-menu-item{% endif %}">
            <a href="/">{% trans 'index' %}</a>
        </li>

        <!-- 动态生成分类导航 -->
        {% query nav_category_list parent_category=None as root_categories %}
        {% for category in root_categories %}
            <li class="menu-item">
                <a href="{{ category.get_absolute_url }}">{{ category.name }}</a>
            </li>
        {% endfor %}

        <li class="menu-item">
            <a href="{% url "blog:archives" %}">{% trans 'Article archive' %}</a>
        </li>
    </ul>
</div>