{% extends "base.html" %}

{% block content %}
    <div class="text container centered">
        <a style="padding: 1.3em; display: block;" href="{{ url_for('following') }}" class="ui small teal statistic">
            <div class="value">
                {{ followedCount }}
            </div>
            <div class="label">
                Following
            </div>
        </a>
    </div>
    <div class="text container" id="card-container">
        {% if posts %}
            {% for post in posts %}
                    {% include '_twitter_post.html' %}
            {% endfor %}
        {% else %}
            {% include '_empty_feed.html' %}
        {% endif %}
        <div class="scroller">
            <a href="#top" class="ui button">
                <i style="margin: 0;" class="chevron up icon"></i>
            </a>
        </div>
    </div>
    <div class="text container center aligned">
        <div class="ui centered pagination menu">
            {%for page in range(init_page, pages)%}
                {% if page == actual_page%}
                    <a href="/twitter/{{page}}" class="active item">
                        {{page}}
                    </a>
                {% else %}
                    <a href="/twitter/{{page}}" class="item">
                        {{page}}
                    </a>
                {% endif %}
            {% endfor %}
        </div>
    </div>
{% endblock %}
