85 lines
3.7 KiB
Twig
85 lines
3.7 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('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('Statistics') }}
|
|
<div class="container__content">
|
|
{% 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>,
|
|
<time datetime="{{ last_user.user_created|date('c') }}" title="{{ last_user.user_created|date('r') }}">{{ last_user.user_created|time_diff }}</time>!
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container index__container">
|
|
{{ container_title('Online users') }}
|
|
<div class="container__content">
|
|
{% if online_users < 1 %}
|
|
No one was online in the last 5 minutes.
|
|
{% else %}
|
|
Online users in the last 5 minutes:<br>
|
|
{% for user in online_users %}
|
|
<a href="/profile.php?u={{ user.user_id }}" class="index__stats__emphasis index__stats__link" style="{{ user.user_colour|html_colour }}">{{ user.username }}</a>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container index__container">
|
|
{{ container_title('Changelog', '/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 %}
|
|
|