<commit_before>{% extends "layout.html" %}
{% block content %}

<ol class="breadcrumb">
    <li><a href="{{ url_for('forum.index') }}">Forum</a></li>
</ol>

{% for category, forums in categories.items() %}
<table class="table table-bordered">
    <thead class="categoryhead">
        <tr>
            <td colspan="5">
                <div><strong><a href="{{ url_for('forum.view_forum', forum_id=category[0].id) }}">{{ category[0].title }}</a></strong></div>
            </td>
        </tr>
    </thead>
    <tbody class="forumbody">
        <tr class="forum_stats">
            <td colspan="2"><strong>Forum</strong></td>
            <td width="85" align="center" style="white-space: nowrap"><strong>Topics</strong></td>
            <td width="85" align="center" style="white-space: nowrap"><strong>Posts</strong></td>
            <td width="200" align="center" style="white-space: nowrap"><strong>Last Post</strong></td>
        </tr>

        {% for forum, subforums in forums.items() %}
        <tr>
            <td align="center" valign="center" width="4%">

            {% if forum[1]|is_unread(forum[0].last_post, forum[0]) %}
                <span class="fa fa-comments" style="font-size: 2em"></span>
            {% else %}
                <span class="fa fa-comments-o" style="font-size: 2em"></span>
            {% endif %}

            </td>

            <td valign="top">
                <strong><a href="{{ url_for('forum.view_forum', forum_id=forum[0].id) }}">{{ forum[0].title }}</a></strong>

                <div class="forum-description">
                    {% autoescape false %}
                    {{ forum[0].description|markup }}
                    {% endautoescape %}
                </div>
                {% if subforums|length %}
                <div class="forum-subforums">
                    <ul class="list-inline">
                        <li><strong>Subforums:</strong></li>
                        {% for subforum in subforums %}
                        <li>
                            <a href="{{ url_for('forum.view_forum', forum_id=subforum[0].id) }}">{{ subforum[0].title }}</a>
                        </li>
                        {% endfor %}
                    </ul>
                </div>
                {% endif %}
            </td>

            <td valign="top" align="center" style="white-space: nowrap">{{ forum[0].topic_count }}</td>
            <td valign="top" align="center" style="white-space: nowrap">{{ forum[0].post_count }}</td>

            <td valign="top" align="right" style="white-space: nowrap">
                {% if forum[0].last_post_id %}
                <a href="{{ url_for('forum.view_post', post_id=forum[0].last_post_id) }}" title="{{ forum[0].last_post.topic.title }}">
                    <strong>{{ forum[0].last_post.topic.title|crop_title }}</strong>
                </a>
                <br />
                {{ forum[0].last_post.date_created|time_since }}<br />
                by <a href="{{ url_for('user.profile', username=forum[0].last_post.user.username) }}">{{ forum[0].last_post.user.username }}</a>
                {% else %}
                No posts
                {% endif %}
            </td>
        </tr>
        {% endfor %}

    </tbody>
</table>
{% endfor %}

<!-- Forum Stats -->
<table class="table table-bordered">
    <thead>
        <tr>
            <td colspan="2">
                <strong>Board Statistics</strong>
                [<a href="{{ url_for('forum.who_is_online') }}" onclick="window.open(this.href, 'wio_window','width=500,height=500'); return false;">Who is online?</a>]
            </td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                Total number of registered users: <strong>{{ user_count }}</strong> <br />
                Total number of topics: <strong>{{ topic_count }}</strong> <br />
                Total number of posts: <strong>{{ post_count }}</strong> <br />
            </td>
            <td>
                Newest registered user: {% if newest_user %}<a href="{{ url_for('user.profile', username=newest_user.username) }}">{{ newest_user.username }}</a>{% else %}No users{% endif %}<br />
                Registered users online: <strong>{{ online_users }}</strong> <br />
                {% if config["USE_REDIS"] %}>
                Guests online: <strong>{{ online_guests }}</strong> <br />
                {% endif %}
            </td>
        </tr>

    </tbody>
</table>

{% endblock %}<commit_msg>Removed the ">" sign in the index template<commit_after>{% extends "layout.html" %}
{% block content %}

<ol class="breadcrumb">
    <li><a href="{{ url_for('forum.index') }}">Forum</a></li>
</ol>

{% for category, forums in categories.items() %}
<table class="table table-bordered">
    <thead class="categoryhead">
        <tr>
            <td colspan="5">
                <div><strong><a href="{{ url_for('forum.view_forum', forum_id=category[0].id) }}">{{ category[0].title }}</a></strong></div>
            </td>
        </tr>
    </thead>
    <tbody class="forumbody">
        <tr class="forum_stats">
            <td colspan="2"><strong>Forum</strong></td>
            <td width="85" align="center" style="white-space: nowrap"><strong>Topics</strong></td>
            <td width="85" align="center" style="white-space: nowrap"><strong>Posts</strong></td>
            <td width="200" align="center" style="white-space: nowrap"><strong>Last Post</strong></td>
        </tr>

        {% for forum, subforums in forums.items() %}
        <tr>
            <td align="center" valign="center" width="4%">

            {% if forum[1]|is_unread(forum[0].last_post, forum[0]) %}
                <span class="fa fa-comments" style="font-size: 2em"></span>
            {% else %}
                <span class="fa fa-comments-o" style="font-size: 2em"></span>
            {% endif %}

            </td>

            <td valign="top">
                <strong><a href="{{ url_for('forum.view_forum', forum_id=forum[0].id) }}">{{ forum[0].title }}</a></strong>

                <div class="forum-description">
                    {% autoescape false %}
                    {{ forum[0].description|markup }}
                    {% endautoescape %}
                </div>
                {% if subforums|length %}
                <div class="forum-subforums">
                    <ul class="list-inline">
                        <li><strong>Subforums:</strong></li>
                        {% for subforum in subforums %}
                        <li>
                            <a href="{{ url_for('forum.view_forum', forum_id=subforum[0].id) }}">{{ subforum[0].title }}</a>
                        </li>
                        {% endfor %}
                    </ul>
                </div>
                {% endif %}
            </td>

            <td valign="top" align="center" style="white-space: nowrap">{{ forum[0].topic_count }}</td>
            <td valign="top" align="center" style="white-space: nowrap">{{ forum[0].post_count }}</td>

            <td valign="top" align="right" style="white-space: nowrap">
                {% if forum[0].last_post_id %}
                <a href="{{ url_for('forum.view_post', post_id=forum[0].last_post_id) }}" title="{{ forum[0].last_post.topic.title }}">
                    <strong>{{ forum[0].last_post.topic.title|crop_title }}</strong>
                </a>
                <br />
                {{ forum[0].last_post.date_created|time_since }}<br />
                by <a href="{{ url_for('user.profile', username=forum[0].last_post.user.username) }}">{{ forum[0].last_post.user.username }}</a>
                {% else %}
                No posts
                {% endif %}
            </td>
        </tr>
        {% endfor %}

    </tbody>
</table>
{% endfor %}

<!-- Forum Stats -->
<table class="table table-bordered">
    <thead>
        <tr>
            <td colspan="2">
                <strong>Board Statistics</strong>
                [<a href="{{ url_for('forum.who_is_online') }}" onclick="window.open(this.href, 'wio_window','width=500,height=500'); return false;">Who is online?</a>]
            </td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                Total number of registered users: <strong>{{ user_count }}</strong> <br />
                Total number of topics: <strong>{{ topic_count }}</strong> <br />
                Total number of posts: <strong>{{ post_count }}</strong> <br />
            </td>
            <td>
                Newest registered user: {% if newest_user %}<a href="{{ url_for('user.profile', username=newest_user.username) }}">{{ newest_user.username }}</a>{% else %}No users{% endif %}<br />
                Registered users online: <strong>{{ online_users }}</strong> <br />
                {% if config["USE_REDIS"] %}
                Guests online: <strong>{{ online_guests }}</strong> <br />
                {% endif %}
            </td>
        </tr>

    </tbody>
</table>

{% endblock %}
{'fraction_non_alphanumeric': 0.18754171301446051, 'fraction_numerical': 0.008453837597330366, 'mean_word_length': 1.7974486621032981, 'pattern_counts': {'":': 0, '<': 245, '<?xml version=': 0, '>': 247, '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': '4420861', 'n_tokens_mistral': 2886, 'n_tokens_neox': 2582, 'n_words': 532}