152 lines
6.6 KiB
Twig
152 lines
6.6 KiB
Twig
{% extends 'home/master.twig' %}
|
|
{% from 'macros.twig' import container_title %}
|
|
{% from 'news/macros.twig' import news_preview %}
|
|
{% from 'changelog/macros.twig' import changelog_listing %}
|
|
{% from 'home/macros.twig' import chat_quote_display %}
|
|
|
|
{% set canonical_url = '/' %}
|
|
|
|
{% block content %}
|
|
<div class="index">
|
|
<div class="index__sidebar">
|
|
{% if chat_quote is defined and chat_quote is iterable and chat_quote|length > 0 %}
|
|
<div class="container index__container">
|
|
{{ container_title('<i class="fas fa-quote-left fa-fw"></i> Chat quote from ' ~ (chat_quote[0].quote_timestamp|date('Y-m-d'))) }}
|
|
{{ chat_quote_display(chat_quote) }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="container index__container">
|
|
{{ container_title('<i class="fas fa-chart-bar fa-fw"></i> Statistics') }}
|
|
|
|
<div class="index__statistics">
|
|
|
|
<div class="index__statistic">
|
|
<div class="index__statistic__name">
|
|
<i class="fas fa-users fa-fw"></i> Users
|
|
</div>
|
|
<div class="index__statistic__value">
|
|
{{ statistics.users.all|number_format }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="index__statistic">
|
|
<div class="index__statistic__name">
|
|
<i class="fas fa-comment-dots fa-fw"></i> Comments
|
|
</div>
|
|
<div class="index__statistic__value">
|
|
{{ statistics.comments|number_format }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="index__statistic">
|
|
<div class="index__statistic__name">
|
|
<i class="fas fa-user-check fa-fw"></i> Online
|
|
</div>
|
|
<div class="index__statistic__value">
|
|
{{ statistics.users.online|number_format }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="index__statistic">
|
|
<div class="index__statistic__name">
|
|
<i class="fas fa-user-clock fa-fw"></i> Active (24 hr)
|
|
</div>
|
|
<div class="index__statistic__value">
|
|
{{ statistics.users.active|number_format }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="index__statistic">
|
|
<div class="index__statistic__name">
|
|
<i class="fas fa-list fa-fw"></i> Topics
|
|
</div>
|
|
<div class="index__statistic__value">
|
|
{{ statistics.forum_topics|number_format }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="index__statistic">
|
|
<div class="index__statistic__name">
|
|
<i class="fas fa-comments fa-fw"></i> Posts
|
|
</div>
|
|
<div class="index__statistic__value">
|
|
{{ statistics.forum_posts|number_format }}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{% if online_users|length > 0 %}
|
|
<div class="container index__container">
|
|
{{ container_title('<i class="fas fa-users fa-fw"></i> Online Users') }}
|
|
|
|
<div class="index__online">
|
|
{% for user in online_users %}
|
|
<a href="/profile.php?u={{ user.user_id }}" class="avatar index__online__user" style="{{ user.user_colour|html_colour }};--avatar-url: url('/profile.php?m=avatar&u={{ user.user_id }}');" title="{{ user.username }}">
|
|
{{ user.username }}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if latest_user.user_id|default(0) > 0 %}
|
|
<div class="container index__container">
|
|
{{ container_title('<i class="fas fa-user-plus fa-fw"></i> Newest User') }}
|
|
|
|
<a class="index__latest" style="{{ latest_user.user_colour|html_colour }}" href="/profile.php?u={{ latest_user.user_id }}">
|
|
<div class="avatar index__latest__avatar" style="--avatar-url: url('/profile.php?m=avatar&u={{ latest_user.user_id }}')"></div>
|
|
<div class="index__latest__content">
|
|
<div class="index__latest__username">
|
|
{{ latest_user.username }}
|
|
</div>
|
|
<div class="index__latest__joined">
|
|
Joined <time datetime="{{ latest_user.user_created|date('c') }}" title="{{ latest_user.user_created|date('r') }}">{{ latest_user.user_created|time_diff }}</time>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="container index__container">
|
|
{{ container_title('<i class="fas fa-wrench fa-fw"></i> Changelog', false, '/changelog.php') }}
|
|
<div class="changelog__content">
|
|
{{ changelog_listing(featured_changelog) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="index__main">
|
|
{% if current_user is defined %}
|
|
<div class="container index__container">
|
|
{{ container_title('Welcome') }}
|
|
<div class="container__content">
|
|
<p>You have 0 new messages because the PM system doesn't exist yet, have a nice day.</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for post in featured_news %}
|
|
{{ news_preview(post) }}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if linked_data is defined and linked_data is iterable %}
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "Organization",
|
|
"name": "{{ linked_data.name }}",
|
|
"url": "{{ linked_data.url }}",
|
|
"logo": "{{ linked_data.logo }}",
|
|
"sameAs": [
|
|
"{{ linked_data.same_as|join('", "')|raw }}"
|
|
]
|
|
}
|
|
</script>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|