2018-08-15 01:12:58 +00:00
{% extends 'home/master.twig' %}
2018-10-22 19:53:21 +00:00
{% from 'macros.twig' import container_title %}
2018-08-15 01:12:58 +00:00
{% from 'news/macros.twig' import news_preview %}
{% from 'changelog/macros.twig' import changelog_listing %}
2018-10-09 21:09:54 +00:00
{% from 'home/macros.twig' import chat_quote_display %}
2018-07-11 21:48:41 +00:00
{% set canonical_url = '/' %}
{% block content %}
<div class="index">
<div class="index__sidebar">
2018-10-09 21:09:54 +00:00
{% if chat_quote is defined and chat_quote is iterable and chat_quote | length > 0 %}
2018-10-22 21:10:38 +00:00
<div class="container index__container">
2018-10-22 19:53:21 +00:00
{{ container_title ( 'Chat quote from ' ~ ( chat_quote [ 0 ] .quote_timestamp | date ( 'Y-m-d' ) ) ) }}
2018-10-09 21:09:54 +00:00
{{ chat_quote_display ( chat_quote ) }}
</div>
{% endif %}
2018-10-22 21:10:38 +00:00
<div class="container index__container">
2018-10-22 19:53:21 +00:00
{{ container_title ( 'Statistics' ) }}
2018-07-11 21:48:41 +00:00
<div class="container__content">
2018-09-17 06:29:02 +00:00
{% if users_count < 1 %}
This is a fresh installation, <a href="/auth.php?m=register" class="index__stats__emphasis index__stats__link">create an account</a>!
{% else %}
We have <span class="index__stats__emphasis"> {{ users_count | number_format }} </span> users and
the last person to join was <a href="/profile.php?u= {{ last_user .user_id }} " class="index__stats__emphasis index__stats__link" style=" {{ last_user .user_colour | html_colour }} "> {{ last_user .username }} </a>,
2018-10-29 21:18:53 +00:00
<time datetime=" {{ last_user .user_created | date ( 'c' ) }} " title=" {{ last_user .user_created | date ( 'r' ) }} "> {{ last_user .user_created | time_diff }} </time>!
2018-09-17 06:29:02 +00:00
{% endif %}
2018-07-11 21:48:41 +00:00
</div>
</div>
2018-12-15 23:58:58 +00:00
{% if online_users | length > 0 %}
2018-11-17 22:44:58 +00:00
<div class="container index__container">
{{ container_title ( 'Online users' ) }}
<div class="index__online">
2018-09-25 21:11:06 +00:00
{% for user in online_users %}
2018-11-17 22:44:58 +00:00
<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>
2018-09-25 21:11:06 +00:00
{% endfor %}
2018-11-17 22:44:58 +00:00
</div>
2018-09-25 21:11:06 +00:00
</div>
2018-11-17 22:44:58 +00:00
{% endif %}
2018-09-25 21:11:06 +00:00
2018-10-22 21:10:38 +00:00
<div class="container index__container">
2018-10-22 19:53:21 +00:00
{{ container_title ( 'Changelog' , '/changelog.php' ) }}
2018-08-11 16:46:39 +00:00
<div class="changelog__content">
2018-07-11 21:48:41 +00:00
{{ changelog_listing ( featured_changelog ) }}
</div>
</div>
</div>
<div class="index__main">
2018-09-16 19:45:40 +00:00
{% if current_user is defined %}
2018-10-22 21:10:38 +00:00
<div class="container index__container">
2018-10-22 19:53:21 +00:00
{{ container_title ( 'Welcome' ) }}
2018-07-11 21:48:41 +00:00
<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 %}
2018-08-15 13:08:20 +00:00
{% for post in featured_news %}
{{ news_preview ( post ) }}
{% endfor %}
2018-07-11 21:48:41 +00:00
</div>
</div>
2018-10-04 20:30:55 +00:00
{% if linked_data is defined and linked_data is iterable %}
2018-07-11 21:48:41 +00:00
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
2018-10-04 20:30:55 +00:00
"name": " {{ linked_data .name }} ",
"url": " {{ linked_data .url }} ",
"logo": " {{ linked_data .logo }} ",
2018-07-11 21:48:41 +00:00
"sameAs": [
2018-10-04 20:30:55 +00:00
" {{ linked_data .same_as | join ( '", "' ) | raw }} "
2018-07-11 21:48:41 +00:00
]
}
</script>
{% endif %}
{% endblock %}