{% extends "master.html" %}
{% block main %}
<div class="col-sm-12">
  <div id="welcome">
    {% if user.name %}
      <p>Welcome {{ user.fullname }}!</p>
    {% endif %}
  </div>
  <div id="content">
    {% if not user.name %}
      <p>Please <a href="{{ basepath }}/login">Log In</a>
    {% elif user.sites %}
      <p>Registered application shortcuts:</p>
        {% for site in user.sites %}
          <p><a href="{{ site.link }}">{{ site.name }}</a></p>
        {% endfor %}
    {% endif %}
  </div>
  <div id="authenticated">
    {% if user.name %}
      <p>
        {% if user.is_admin %}
          <a href="{{ basepath }}/admin" id="admin">Administration</a> |
        {% endif %}
        <a href="{{ basepath }}/logout" id="logout">Log Out</a>
      </p>
    {% endif %}
  </div>
</div>
{% endblock %}