{% include 'header.html' %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/tweets.css') }}"> {% include 'wrapper.html' %}
<div class="page">
    <div class="input">
        <form action="{{ url_for('create_comment') }}" method="POST">
            <input dir="auto" class="text" type="text" name="data" placeholder="Enter your thoughts and updates here..." required>
            <input class="button" type="submit" value="Submit">
        </form>
    </div>
    <div class="tweets">
        {% for comment in comments %}
        <div class="tweet">
            <div class="content">
                <p>{{ comment[1] }}</p>
            </div>
            <div class="resources"></div>
            <div class="uploader">
                {% if comment[2] != display_name %} <span style="float: left;">{{ comment[2] }}</span> {% else %}
                <form action="{{ url_for('delete_comment') }}" method="POST" id="delete-comment-form-{{ comment[0] }}">
                    <input type="hidden" name="id" value="{{ comment[0] }}">
                    <a class="delete-tweet" href="javascript:$.post(Flask.url_for('delete_comment', { id: {{ comment[0] }} }));"><i class="fas fa-trash"
                        onclick="this.parentElement.parentElement.parentElement.parentElement.remove()"  style="margin-left: 15px; color: rgb(201, 84, 84);"></i></a>
                </form>
                {% endif %} {{ comment[3] }}
            </div>
        </div>
        {% endfor %}
    </div>
</div>
{% include 'wrapper_end.html' %} {% include 'footer.html' %}