{% extends "main.html" %}

{% block title %}{{_("Settings for %(username)s", username=user.username)}}{% endblock %}

{% block content %}
  {{ super() }}
  <div class="container py-4 section">
    <div class="row form-group">
      <div class="col-md-8 mx-auto">
        <div class="row">
            {% set user_link %}
              <a href="{{url_for('.user', username=user.username)}}">{{user.username}}</a>
            {% endset %}
            <h3>{{_("Settings for %(username)s", username=user_link)}}</h3>
        </div>
        <div class="card">
          <ul class="card-header nav nav-tabs pb-0" role="tablist">
            <li class="nav-item">
              <a class="nav-link {{'active' if activetab == 'profile'}}" href="{{ url_for('.user_settings_profile', username=user.username) }}">{{_("Profile")}}</a>
            </li>
            <li class="nav-item">
              <a class="nav-link {{'active' if activetab == 'keys'}}" href="{{ url_for('.user_settings_keys', username=user.username) }}">{{_("SSH &amp; GPG Keys")}}</a>
            </li>
            <li class="nav-item">
              <a class="nav-link {{'active' if activetab == 'otp'}}" href="{{ url_for('.user_settings_otp', username=user.username) }}">{{_("OTP")}}</a>
            </li>
            <li class="nav-item">
              <a class="nav-link {{'active' if activetab == 'password'}}" href="{{ url_for('.user_settings_password', username=user.username) }}">{{_("Password")}}</a>
            </li>
            <li class="nav-item">
              <a class="nav-link {{'active' if activetab == 'agreements'}}" href="{{ url_for('.user_settings_agreements', username=user.username) }}">{{_("Agreements")}}</a>
            </li>
          </ul>
          {% block settings_content %}
          {% endblock %}
        </div>
      </div>
    </div>
  </div>
{% endblock %}
