<commit_before>{% extends 'layouts/base.html' %}

{% block base %}
<style>
    {# TODO: Remove inline styling. #}
    .container.narrow {
      max-width: 950px;
    }

    table.forms {
      text-align: left;
      width: 100%;
    }

    *[class^="ion-"] {
      font-size: 32px;
    }
</style>

<div class="container">
    <div class="col-1-1">
        <h1>Hello {{user.email}}</h1>

        <p><a href="/logout">logout</a></p>
    </div>

    <hr />

    <div class="col-1-1">
        <h2>Your Forms</h2>

        <table class="forms">
            <thead>
                <tr>
                    <th>Status</th>
                    <th>Origin</th>
                    <th>Email</th>
                    <th>Submissions</th>
                </tr>
            </thead>
            <tbody>
            {% for form in user.forms.all() %}
              <tr>
                <td>
                  {% if form.is_new %}
                    <span class="tooltip hint--left" data-hint="New form">
                        <span class="ion-alert"></span>
                    </span>
                  {% elif form.confirmed %}
                    <span class="tooltip hint--left" data-hint="Confirmed">
                        <span class="ion-checkmark"></span>
                    </span>
                  {% elif form.confirm_sent %}
                    <span class="tooltip hint--left" data-hint="Awaiting confirmation">
                        <span class="ion-refresh"></span>
                    </span>
                  {% endif %}
                </td>
                <td>
                  {% if form.is_new %}
                    <a href="#" role="button">view HTML code</a>
                    <div class="html-code">
                        <h2>Success! Your form has been created</h2>
                        <label>Form Code:
                          <textarea>{{ form.code }}</textarea>
                        </label>
                    </div>
                  {% else %}
                    {{ form.host }}
                  {% endif %}
                </td>
                <td>{{ form.email }}</td>
                <td>{{ form.counter }}</td>
              </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>

    <hr />

    {% if user.upgraded %}
        <div class="col-1-1">
            <h2>New Form</h2>
            <form method="POST" action="{{ url_for('forms-api') }}">
                <label>
                    Send email to:
                    <input type="email" name="email" placeholder="<EMAIL>" />
                </label>
                <input type="submit" value="Create" />
            </form><commit_msg>Add some style so it looks better and hide the html code for now<commit_after>{% extends 'layouts/base.html' %}

{% block base %}
<style>
    {# TODO: Remove inline styling. #}
    .container.narrow {
      max-width: 950px;
    }

    table.forms {
      text-align: left;
      width: 100%;
    }

    *[class^="ion-"] {
      display: inline-block;
      font-size: 32px;
      text-align: center;
      width: 32px;
    }
</style>

<div class="container">
    <div class="col-1-1">
        <h1>Hello {{user.email}}</h1>

        <p><a href="/logout">logout</a></p>
    </div>

    <hr />

    <div class="col-1-1">
        <h2>Your Forms</h2>

        <table class="forms">
            <thead>
                <tr>
                    <th>Status</th>
                    <th>Origin</th>
                    <th>Email</th>
                    <th>Submissions</th>
                </tr>
            </thead>
            <tbody>
            {% for form in user.forms.all() %}
              <tr>
                <td>
                  {% if form.is_new %}
                    <span class="tooltip hint--left" data-hint="New form">
                        <span class="ion-alert"></span>
                    </span>
                  {% elif form.confirmed %}
                    <span class="tooltip hint--left" data-hint="Confirmed">
                        <span class="ion-checkmark"></span>
                    </span>
                  {% elif form.confirm_sent %}
                    <span class="tooltip hint--left" data-hint="Awaiting confirmation">
                        <span class="ion-refresh"></span>
                    </span>
                  {% endif %}
                </td>
                <td>
                  {% if form.is_new %}
                    <a href="#" role="button">view HTML code</a>
                    <div class="html-code" style="display: none;">
                        <h2>Success! Your form has been created</h2>
                        <label>Form Code:
                          <textarea>{{ form.code }}</textarea>
                        </label>
                    </div>
                  {% else %}
                    {{ form.host }}
                  {% endif %}
                </td>
                <td>{{ form.email }}</td>
                <td>{{ form.counter }}</td>
              </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>

    <hr />

    {% if user.upgraded %}
        <div class="col-1-1">
            <h2>New Form</h2>
            <form method="POST" action="{{ url_for('forms-api') }}">
                <label>
                    Send email to:
                    <input type="email" name="email" placeholder="<EMAIL>" />
                </label>
                <input type="submit" value="Create" />
            </form>
{'fraction_non_alphanumeric': 0.15509090909090908, 'fraction_numerical': 0.008363636363636363, 'mean_word_length': 1.035899333826795, 'pattern_counts': {'":': 0, '<': 153, '<?xml version=': 0, '>': 153, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6874952', 'n_tokens_mistral': 1651, 'n_tokens_neox': 1461, 'n_words': 312}