<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/static/stylesheets/main.css">
    <script type="text/javascript" src="/static/bower_components/modernizr/modernizr.js"></script>
    <title>Swear Jar Bot</title>
  </head>
  <body>
    <div class="container">
      <h1 class="title">Swear Jar Bot</h1>
      <hr>
      <h2 class="text-center">Who the fuck we are.</h2>
      <p>
        We exist for the sole purpose of collecting the debt owed to society by the fowl-mouthed masses for their defamatory comments and linguistic tomfuckery.
      </p>
      <h2 class="text-center">Who the fuck are you? </h2>
      <form method="POST">
        {{ form.hidden_tag() }}
        <label>Username</label>
        <input id="my-text-field" name="name" type="text" value="{{user}}">
        {{ form.submit(class='btn')}}
      </form>
      <a href="{{ url_for('swear_routes.redirect_with_random_user') }}">Random Sinner</a>
      {% if user %}
        <h2 class="text-center">
          {{ user }}
          <small>&bull;</small>
          {% if comments|length == 0 %}
            No violations
          {% elif comments|length == 1 %}
            {{ comments|length }} violation
          {% else %}
            {{ comments|length }} violations
          {% endif %}
        </h2>
        {% for comment in comments %}
          <div class="comment">
            <i class="fa fa-quote-left"></i>
            <p>{{ comment }}</p>
            <i class="fa fa-quote-right"></i>
          </div>
        {% endfor %}
      {% endif %}
    </div>

    <!-- Scripts -->
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script type="text/javascript" src="/static/scripts/main.js"></script>
  </body>
</html>
