<!DOCTYPE html>
  <html lang="en">
    <head>
      <base href="./" />
      <meta charset="UTF-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <title>{% block title %}{% endblock %} ~ SpinSha.re</title>

      <!-- Meta Tags -->
      <link rel="icon" type="image/png" href="{{ asset('assets/img/favicon.png') }}" />
      <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
      <meta property="og:site_name" content="SpinSha.re"/>
      <meta name="description" content="Share your custom charts for the rhythm game Spin Rhythm XD on SpinSha.re" />
      {% block meta %}{% endblock %}

      <!-- Styles -->
      <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap" />
      <link rel="stylesheet" href="https://cdn.materialdesignicons.com/5.0.45/css/materialdesignicons.min.css" />
      <link rel="stylesheet" href="{{ asset('assets/css/main.css') }}" />
      {% block styles %}{% endblock %}
    </head>
    <body>
      <main>
        <aside>
          <nav>
            <a class="item {% if app.request.attributes.get('_route') == 'index.index' %}active{% endif %}" href="{{ path('index.index') }}" title="Home"><i class="mdi mdi-home-outline"></i></a>
            <a class="item {% if app.request.attributes.get('_route') == 'search.index' %}active{% endif %}" href="{{ path('search.index') }}" title="Search"><i class="mdi mdi-magnify"></i></a>
            <a class="item {% if app.request.attributes.get('_route') == 'index.client' %}active{% endif %}" href="{{ path('index.client') }}" title="Download Client"><i class="mdi mdi-microsoft-windows"></i></a>
            <a class="item" href="https://www.patreon.com/spinshare" target="_blank" title="Patreon" data-tooltipPosition="right"><i class="mdi mdi-patreon"></i></a>
            <a class="item {% if app.request.attributes.get('_route') == 'index.legal' %}active{% endif %}" href="{{ path('index.legal') }}" title="Legal"><i class="mdi mdi-gavel"></i></a>
          </nav>

          <nav>
            {% if is_granted("ROLE_USER") %}
              {% if is_granted("ROLE_MODERATOR") or is_granted("ROLE_ADMIN") %}
                <a class="item {% if app.request.attributes.get('_route') == 'moderation.index' %}active{% endif %}" href="{{ path('moderation.index') }}" title="Moderator Dashboard"><i class="mdi mdi-shield-outline"></i></a>
              {% endif %}
                <a class="item {% if app.request.attributes.get('_route') == 'upload.index' %}active{% endif %}" href="{{ path('upload.index') }}" title="Upload"><i class="mdi mdi-upload-outline"></i></a>
                <a class="item {% if app.request.attributes.get('_route') == 'user.settings' %}active{% endif %}" href="{{ path('user.settings') }}" title="Settings"><i class="mdi mdi-cog-outline"></i></a>
                <a class="item {% if app.request.attributes.get('_route') == 'user.detail' and app.request.attributes.get('_route_params')['userId']|default('') == app.user.id %}active{% endif %}" href="{{ path('user.detail', {userId: app.user.id}) }}" title="My Profile"><i class="mdi mdi-account-circle-outline"></i></a>
                <a class="item" href="{{ path('fos_user_security_logout') }}" title="Logout"><i class="mdi mdi-close-circle-outline"></i></a>
            {% else %}
                <a class="item" href="{{ path('fos_user_security_login') }}" title="Login/Register"><i class="mdi mdi-login-variant"></i></a>
            {% endif %}
          </nav>
        </aside>

        {% block content %}{% endblock %}
      </main>

      <!-- Scripts -->
      {% block scripts %}{% endblock %}
    </body>
  </html>