{% load static i18n %} {% get_current_language as LANGUAGE_CODE %}
<!DOCTYPE html>
<html lang="{{LANGUAGE_CODE}}">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="uncloud by ungleich" />
    <meta name="author" content="ungleich glarus ag" />
    <title>
      uncloud - {% block title %} made in Switzerland {% endblock %}
    </title>

    <!-- Vendor CSS -->
    <!-- Bootstrap Core CSS -->
    <link href="{% static 'matrixhosting/css/bootstrap.min.css' %}" rel="stylesheet" />
    <!-- Icon Fonts -->
    <link
      href="{% static 'matrixhosting/css/fontawesome-all.min.css' %}"
      rel="stylesheet"
      type="text/css"
    />
    {% block css_extra %} {% endblock css_extra %}

    <!-- External Fonts -->
    <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Rubik:300,300i,400,400i,500,500i,700,700i,900,900i' type='text/css'>
  </head>

  <body>
    <div id="main-wrapper">
      <nav class="navbar sticky-top navbar-expand-lg navbar-light bg-light">
        <div class="container">
          <a class="navbar-brand" href="{% url 'uncloudindex' %}">uncloud</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">
              {% if user.is_authenticated %}
              <span class="navbar-text">Logged in as {{ user }}. Your balance:
              {{ balance }} CHF. </span>
              <li class="nav-item">
                <a class="nav-link" href="{% url 'account_logout' %}">Logout</a>
              </li>
              {% else %}
              <li class="nav-item">
                <a class="nav-link" href="{% url 'account_login' %}">Login</a>
              </li>
              {% endif %}
            </ul>
          </div>
        </div>
        </nav>
      {% block content %} {% endblock %} 
    </div>

    <!-- jQuery -->
    <script
      src="https://code.jquery.com/jquery-3.6.0.min.js"
      integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
      crossorigin="anonymous"
    ></script>
    <script src="{% static 'matrixhosting/js/bootstrap.bundle.min.js' %}"></script>
    {% block js_extra %} {% endblock js_extra %}
  </body>
</html>
