{# Template for home view #}

{% extends "site/base.html" %}

{% block extra_head %}
  <style>
    #newsletter-form .form-group {
      margin-left: 20px;
    }

    #newsletter-form label,
    #newsletter-form .btn {
      margin-left: -20px;
    }

    iframe {
      width: 100%;
      height: 800px;
    }
  </style>

{% endblock %}

{% block content %}

  <h1 id="heading-newsletter-admin">Newsletter admin</h1>

  <div id="newsletter-form">
    {{ rendered_form|safe }}
  </div>

  <h2>Newsletter preview</h2>

  <p>Sending to <strong>{{ user_count }}</strong> users. Last sent was <strong>{{ state.get_last_send_timestamp() }}</strong>.</p>
  <iframe src="{{ preview_url }}"></iframe>

{% endblock %}