{% extends "default-base/base.html" %}

{% block head %}
{{super()}}
<!-- Bootstrap 4 -->
<link href="{{ url_for('/bootstrap4/css/bootstrap.min.css', static=True) }}" rel="stylesheet"/>
<script src="{{ url_for('/jquery/jquery.min.js', static=True) }}"></script>
<script src="{{ url_for('/popper.js/umd/popper.min.js', static=True) }}"></script>
<script src="{{ url_for('/bootstrap4/js/bootstrap.min.js', static=True) }}"></script>
{% endblock %}

{% block navbar %}
    <!-- Fixed navbar -->
    <nav class="navbar navbar-expand-sm navbar-dark bg-dark mb-3">
      <a class="navbar-brand" href="{{url_for('/')}}">{{page.meta.site_name}}</a>

      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
        aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>

      <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
          {% block nav %}
          {% for nav_page in page.meta.nav %}
            <li class="nav-item"><a class="nav-link" href="{{url_for(nav_page)}}">{{nav_page.meta.nav_title}}</a></li>
          {% endfor %}
          {% endblock %}
        </ul>
        {% block nav_extra %}
        {% if page.meta.related.rss_feed %}
        <ul class="navbar-nav">
          <li class="nav-item">
            <a class="nav-link" href="{{url_for(page.meta.related.rss_feed) }}" alt="{{page.meta.related.rss_feed.meta.title}}" title="{{page.meta.related.rss_feed.meta.title}}">
            <img src="{{ url_for('/images/feed-icon-16x16.png', static=True) }}">
          </a>
          </li>
        </ul>
        {% endif %}
        {% endblock %}
      </div>
    </nav>
{% endblock %}
