<!DOCTYPE html>
<html lang="{{ lang[0:2] }}">
<head>
{% block head %}
<title>
{% block title %}
{% if title %}{{ title }}{% endif %}
{% endblock title %}
 - 
{% if header_name %}{{ header_name }}{% else %}rdiffweb{% endif %}
</title>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if version %}<meta name="app-version" content="{{ version }}">{% endif %}
<meta name="application-name" content="{{ header_name }}"/>
<link rel="stylesheet" href="{{ main_css or '/static/main.css' }}" type="text/css">
<link rel="shortcut icon" href="/favicon.ico" >
{% if rssLink %}<link rel="alternate" type="application/rss+xml" href="{{ rssLink }}" title="{{ rssTitle }}" />{% endif %}
{% include extra_head_templates ignore missing with context %}
{% endblock head %}
</head>
<body>
<!-- .navbar -->
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">{% trans %}Toggle navigation{% endtrans %}</span> <span
                    class="icon-bar"></span> <span class="icon-bar"></span> <span
                    class="icon-bar"></span>
            </button>
            <!-- Header_logo -->
            <a class="navbar-brand" href="/">
            {% if header_logo %}
            <img src="{{ header_logo }}" style="display: inline">
            {% else %}
            <i class="icon-rdiffweb"></i>
            {% endif %}
            <!-- /Header_logo -->
            <!-- Header_name -->
            {{ header_name or 'rdiffweb' }}
            <!-- /Header_name -->
            </a>
        </div>
        {% if username %}
        {% set nav_bar = [
            ('repo', _('Repositories'), '/'),
            ('status', _('Status'), '/status/'),
            ('settings', _('User settings'), '/prefs/'),
        ] -%}
        {% if nav_bar_extras %}
        {{ nav_bar.extend(nav_bar_extras) or "" }}
        {% endif %}
        {% if is_admin %}
        {{ nav_bar.append(('admin', _('Admin area'), '/admin/')) or "" }}
        {% endif %}
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                {% for item in nav_bar %}
                <li {{ attrib(class=active_page==item[0] and "active") }}><a href="{{ item[2] }}">{{ item[1] }}</a></li>
                {% endfor %}
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="/logout/">{% trans %}Logout{% endtrans %}</a></li>
            </ul>
            <p class="navbar-text navbar-right hidden-xs hidden-sm hidden-md">
                {% trans %}Signed in as {{ username }}{% endtrans %}
            </p>
        </div>
        {% endif %}
    </div>
</div>
<!-- /.navbar -->
{% block body %}

{% endblock %}
<!-- Include rdiffweb specifics -->
<script src="/static/js/rdiffweb.min.js"></script>
{% if lang and lang[0:2] != "en" %}
<!-- Include translation for JQuery Validation -->
<script src="/static/js/plugins/jquery.validate.{{ lang[0:2] }}.js"></script>
{% endif %}
</body>
</html>