{% extends "base.html" %}

{% block description %}
{{ _("This is the admin page. You can manage your posts here.") }}
{% endblock %}

{% block content %}

<div class="admin-contents mx-auto w-75">
  <h1>{% block title %}Admin{% endblock %}</h1>
  {% if user %}
    <div class="alert alert-success" role="alert">You're logged in</div>
  {% endif %}
</div>

{% endblock %}

{% block left_panel %}
<div id="admin-panel">
  <p>User: {{ user.username }}</p>
  {% for cms_module in cms_modules %}
  <div class="cms-module mb-2">
    <ul>
        <li>
            <a href="/{{ cms_module.slug }}"> {{ cms_module.name }} </a>
        </li>
    </ul>
  </div>
  {% endfor %}
</div>
{% endblock %}
