cyberark/secretless-broker

View on GitHub
docs/_includes/side_navigation.html

Summary

Maintainability
Test Coverage
<nav id="side-navigation">
    <ul class="sidenav-group">
        {% if site.data.navigation.chapters[0] %}
            {% for chapter in site.data.navigation.chapters %}
            <h3 class="{% if page.url == chapter.url %}active{% endif %}"><a href="{{ chapter.url }}">{{ chapter.title }}</a></h3>
    
                {% if chapter.sections[0] %}
                    <ul class="group-of-sections">
                        {% for section in chapter.sections %}
                            {% if section.entries[0] %}

                            <li class="{% if page.title == section.page %}active {% endif %}section dropdown-btn"><a href="{{ section.url }}">{{ section.page }}</a>
                            {% if section.page == page.title %}
                                <i class="fa fa-angle-right arrow rotatingArrow"></i>
                            </li>
                                  <div class="dropdown-menu-option navbar-open">
                            {% else %}
                                <i class="fa fa-angle-right arrow"></i>
                            </li>
                                <div class="dropdown-menu-option">  
                            {% endif %}
                                    {% for entry in section.entries %}
                                        <li class="entry {% if page.url == entry.url %}active{% endif %}"><a href="{{ entry.url }}">{{ entry.page }}</a></li>
                                    {% endfor %}
                                  </div>
                            {% else %}
                                <li class="{% if section.url == page.url %}active {% endif %}section"><a href="{{ section.url }}">{{ section.page }}</a>
                            {% endif %}
                        {% endfor %}
                    </ul>
                {% endif %}
            {% endfor %}
        {% endif %}
    </ul>
</nav>