{% extends "base.html" %}

{% block title %}bouncers - irc.now{% endblock %}

{% block banner %}{% include "partials/announcement.html" %}{% endblock %}
{% block flash %}{% include "partials/flash.html" %}{% endblock %}
{% block content %}
<div class="content">
  <h1>bouncers</h1>
  {% if bouncers.is_empty() %}
  <div class="card">
    <p>no bouncers yet</p>
    <form method="post" action="/bouncers/create">
      <div class="form-group" style="margin-bottom: 14px;">
        <label for="name">bouncer name</label>
        <input type="text" id="name" name="name" placeholder="my-bouncer" required class="input">
      </div>
      <button type="submit" class="btn-fill">create bouncer</button>
    </form>
  </div>
  {% else %}
  {% for bouncer in bouncers %}
  <a href="/bouncers/{{ bouncer.name }}" style="text-decoration: none; color: inherit;">
    <div class="card">
      <h2>{{ bouncer.name }}</h2>
      <p>{{ bouncer.hostname }} -- {% if bouncer.ready %}<span style="color: var(--g);">ready</span>{% else %}<span style="color: #E08080;">not ready</span>{% endif %}</p>
    </div>
  </a>
  {% endfor %}
  {% endif %}
</div>
{% endblock %}
