2022-09-13 13:14:49 +00:00
{% extends 'home/master.twig' %}
{% from 'macros.twig' import container_title , avatar %}
{% from 'news/macros.twig' import news_preview %}
{% from 'changelog/macros.twig' import changelog_listing %}
{% set canonical_url = '/' %}
{% set landing_stats = [
{
icon: 'fas fa-users fa-fw',
name: 'Members',
2023-07-28 23:17:33 +00:00
value: statistics['users:active']|number_format,
2022-09-13 13:14:49 +00:00
},
{
icon: 'fas fa-comment-dots fa-fw',
name: 'Comments',
2023-07-28 23:17:33 +00:00
value: statistics['comments:posts:visible']|number_format,
2022-09-13 13:14:49 +00:00
},
{
icon: 'fas fa-user-check fa-fw',
name: 'Online',
2023-07-28 23:17:33 +00:00
value: statistics['users:online:recent']|number_format,
2022-09-13 13:14:49 +00:00
},
{
icon: 'fas fa-user-clock fa-fw',
name: 'Active (24 hr)',
2023-07-28 23:17:33 +00:00
value: statistics['users:online:today']|number_format,
2022-09-13 13:14:49 +00:00
},
{
icon: 'fas fa-list fa-fw',
name: 'Topics',
2023-07-28 23:17:33 +00:00
value: statistics['forum:topics:visible']|number_format,
2022-09-13 13:14:49 +00:00
},
{
icon: 'fas fa-comments fa-fw',
name: 'Posts',
2023-07-28 23:17:33 +00:00
value: statistics['forum:posts:visible']|number_format,
2022-09-13 13:14:49 +00:00
},
] %}
{% block content %}
<div class="landing">
<div class="landing__sidebar">
<div class="container landing__container">
{{ container_title ( '<i class="fas fa-chart-bar fa-fw"></i> Statistics' ) }}
<div class="landing__statistics">
{% for stat in landing_stats %}
<div class="landing__statistic">
<div class="landing__statistic__name">
<i class=" {{ stat .icon }} "></i> {{ stat .name }}
</div>
<div class="landing__statistic__value">
{{ stat .value }}
</div>
</div>
{% endfor %}
</div>
</div>
{% if online_users | length > 0 %}
<div class="container landing__container">
{{ container_title ( '<i class="fas fa-users fa-fw"></i> Currently Online' ) }}
<div class="landing__online">
{% for user in online_users %}
2023-08-02 22:12:47 +00:00
<a href=" {{ url ( 'user-profile' , { 'user' : user .id } ) }} " class="landing__online__user" title=" {{ user .name }} ">
{{ avatar ( user .id , 3 0 , user .name ) }}
2022-09-13 13:14:49 +00:00
</a>
{% endfor %}
</div>
</div>
{% endif %}
{% if birthdays | length > 0 %}
<div class="container landing__container">
{{ container_title ( '<i class="fas fa-birthday-cake fa-fw"></i> Happy Birthday!' ) }}
{% for birthday in birthdays %}
2023-08-02 22:12:47 +00:00
{% set age = birthday .info .age %}
<a class="landing__latest" style="--user-colour: {{ birthday .colour }} " href=" {{ url ( 'user-profile' , { 'user' : birthday .info .id } ) }} ">
<div class="landing__latest__avatar"> {{ avatar ( birthday .info .id , 5 0 , birthday .info .name ) }} </div>
2022-09-13 13:14:49 +00:00
<div class="landing__latest__content">
<div class="landing__latest__username">
2023-08-02 22:12:47 +00:00
{{ birthday .info .name }}
2022-09-13 13:14:49 +00:00
</div>
2023-08-02 22:12:47 +00:00
{% if age > 0 %}
2022-09-13 13:14:49 +00:00
<div class="landing__latest__joined">
2023-08-02 22:12:47 +00:00
Turned {{ age }} today!
2022-09-13 13:14:49 +00:00
</div>
{% endif %}
</div>
</a>
{% endfor %}
</div>
2023-08-02 22:12:47 +00:00
{% elseif newest_member is not empty %}
2022-09-13 13:14:49 +00:00
<div class="container landing__container">
2023-08-02 22:12:47 +00:00
{{ container_title ( '<i class="fas fa-user-plus fa-fw"></i> Newest Member' ) }}
2022-09-13 13:14:49 +00:00
2023-08-02 22:12:47 +00:00
<a class="landing__latest" style="--user-colour: {{ newest_member .colour }} " href=" {{ url ( 'user-profile' , { 'user' : newest_member .info .id } ) }} ">
<div class="landing__latest__avatar"> {{ avatar ( newest_member .info .id , 5 0 , newest_member .info .name ) }} </div>
2022-09-13 13:14:49 +00:00
<div class="landing__latest__content">
<div class="landing__latest__username">
2023-08-02 22:12:47 +00:00
{{ newest_member .info .name }}
2022-09-13 13:14:49 +00:00
</div>
<div class="landing__latest__joined">
2023-08-02 22:12:47 +00:00
Joined <time datetime=" {{ newest_member .info .createdTime | date ( 'c' ) }} " title=" {{ newest_member .info .createdTime | date ( 'r' ) }} "> {{ newest_member .info .createdTime | time_format }} </time>
2022-09-13 13:14:49 +00:00
</div>
</div>
</a>
</div>
{% endif %}
2023-09-08 23:07:37 +00:00
<div class="container landing__container">
<iframe width="300" height="169" src="https://www.youtube-nocookie.com/embed/hRW7uA2Iios?autoplay=1&loop=1&playlist=hRW7uA2Iios" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen style="vertical-align: middle;"></iframe>
</div>
2022-09-13 13:14:49 +00:00
<div class="container landing__container">
{{ container_title ( '<i class="fas fa-wrench fa-fw"></i> Changelog' , false , url ( 'changelog-index' ) ) }}
<div class="changelog__content">
{{ changelog_listing ( featured_changelog , false , true ) }}
</div>
</div>
</div>
<div class="landing__main">
{% for post in featured_news %}
{{ news_preview ( post ) }}
{% endfor %}
</div>
</div>
{% endblock %}