misuzu/templates/home/index.twig

59 lines
2.2 KiB
Twig
Raw Normal View History

2018-08-15 01:12:58 +00:00
{% extends 'home/master.twig' %}
{% from 'news/macros.twig' import news_preview %}
{% from 'changelog/macros.twig' import changelog_listing %}
{% set canonical_url = '/' %}
{% block content %}
<div class="index">
<div class="index__sidebar">
<div class="container">
<div class="container__title">Statistics</div>
<div class="container__content">
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-07-11 21:59:01 +00:00
<time datetime="{{ last_user.created_at|date('c') }}" title="{{ last_user.created_at|date('r') }}">{{ last_user.created_at|time_diff }}</time>!
</div>
</div>
<div class="container">
<a class="container__title container__title--link" href="/changelog.php">Changelog</a>
<div class="changelog__content">
{{ changelog_listing(featured_changelog) }}
</div>
</div>
</div>
<div class="index__main">
{% if current_user is defined %}
<div class="container">
<div class="container__title">Welcome</div>
<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 embed_linked_data is defined and embed_linked_data %}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"name": "{{ embed_name }}",
"url": "{{ embed_url }}",
"logo": "{{ embed_logo }}",
"sameAs": [
"{{ embed_same_as|join('", "')|raw }}"
]
}
</script>
{% endif %}
{% endblock %}