{% extends "page.html" %}

{% block main %}

<div class="container">
  <div class="row">
    <div class="text-center">
      {% block heading %}
      <h1>
      {% if failed %}
      Spawn failed
      {% else %}
      Server not running
      {% endif %}
      </h1>
      {% endblock %}
      {% block message %}
      <p>
        {% if failed %}
        The latest attempt to start your server {{ server_name }} has failed.
        {% if failed_message %}
          {{ failed_message }}
        {% endif %}
        Would you like to retry starting it?
        {% else %}
        Your server {{ server_name }} is not running. Would you like to start it?
        {% endif %}
      </p>
      {% endblock %}
      {% block start_button %}
      <a id="start" role="button" class="btn btn-lg btn-primary" href="{{ spawn_url }}">
        {% if failed %}
        Relaunch
        {% else %}
        Launch
        {% endif %}
        Server {{ server_name }}
      </a>
      {% endblock %}
    </div>
  </div>
</div>

{% endblock %}
