2016-07-31 19:36:13 +00:00
|
|
|
{% extends 'master.twig' %}
|
2016-07-29 19:31:36 +00:00
|
|
|
|
|
|
|
{% set title = 'Forums' %}
|
|
|
|
|
|
|
|
{% block content %}
|
2016-11-12 01:52:51 +00:00
|
|
|
<div class="content">
|
2016-11-09 18:32:23 +00:00
|
|
|
<div class="content--right">
|
2016-07-30 13:48:09 +00:00
|
|
|
<div id="forumIndexPopularTopics">
|
2016-11-09 18:32:23 +00:00
|
|
|
<div class="content__header content__header--alt">Popular topics</div>
|
2016-12-04 14:55:53 +00:00
|
|
|
<table class="sidepanel-table">
|
2016-07-29 19:31:36 +00:00
|
|
|
<tr>
|
2016-11-10 22:32:45 +00:00
|
|
|
<th class="sidepanel-table__head">Title</th>
|
|
|
|
<th class="sidepanel-table__head">Last reply</th>
|
2016-07-29 19:31:36 +00:00
|
|
|
</tr>
|
2016-07-30 13:48:09 +00:00
|
|
|
{% for _t in activeTopics %}
|
2016-07-29 19:31:36 +00:00
|
|
|
<tr {% if _t.unread(user.id) %}style="font-weight: bold;"{% endif %}>
|
2016-11-10 22:32:45 +00:00
|
|
|
<td class="sidepanel-table__column" style="text-align: left; border-bottom: 1px solid #9475b2;">
|
2016-11-09 18:32:23 +00:00
|
|
|
<a href="{{ route('forums.topic', _t.id) }}">{{ _t.title }}</a>
|
2016-07-29 19:31:36 +00:00
|
|
|
</td>
|
2016-12-22 18:10:09 +00:00
|
|
|
<td class="sidepanel-table__column" style="text-align: right; border-bottom: 1px solid #9475b2;"><time class="time-ago" datetime="{{ _t.lastReply|date('r') }}">{{ _t.lastReply|date(config('general.date_format')) }}</time></td>
|
2016-07-29 19:31:36 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div id="forumIndexNewPosts">
|
2016-11-09 18:32:23 +00:00
|
|
|
<div class="content__header content__header--alt">Latest posts</div>
|
2016-12-04 14:55:53 +00:00
|
|
|
<table class="sidepanel-table">
|
2016-07-29 19:31:36 +00:00
|
|
|
<tr>
|
2016-11-10 22:32:45 +00:00
|
|
|
<th class="sidepanel-table__head">Title & user</th>
|
|
|
|
<th class="sidepanel-table__head">Posted</th>
|
2016-07-29 19:31:36 +00:00
|
|
|
</tr>
|
|
|
|
{% for _p in latestPosts %}
|
|
|
|
<tr {% if _p.unread(user.id) %}style="font-weight: bold;"{% endif %}>
|
2016-11-10 22:32:45 +00:00
|
|
|
<td class="sidepanel-table__column" style="text-align: left; border-bottom: 1px solid #9475b2;">
|
2016-11-09 18:32:23 +00:00
|
|
|
<a href="{{ route('forums.post', _p.id) }}">{{ _p.subject }}</a>
|
2016-07-29 19:31:36 +00:00
|
|
|
by
|
2016-11-09 18:32:23 +00:00
|
|
|
<a href="{{ route('user.profile', _p.poster.id) }}"><span style="color: {{ _p.poster.colour }};">{{ _p.poster.username }}</span></a>
|
2016-07-29 19:31:36 +00:00
|
|
|
</td>
|
2016-11-10 22:32:45 +00:00
|
|
|
<td class="sidepanel-table__column" style="text-align: right; border-bottom: 1px solid #9475b2;">
|
|
|
|
<time class="time-ago" datetime="{{ _p.time|date('r') }}">
|
|
|
|
{{ _p.time|date(config('general.date_format')) }}
|
|
|
|
</time>
|
|
|
|
</td>
|
2016-07-29 19:31:36 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div id="forumMostActivePoster">
|
2016-11-09 18:32:23 +00:00
|
|
|
<div class="content__header content__header--alt">Today's most active poster</div>
|
2016-07-29 19:31:36 +00:00
|
|
|
{% if activePoster.id %}
|
2016-11-09 18:32:23 +00:00
|
|
|
<a href="{{ route('user.profile', activePoster.id) }}" class="link link--clean">
|
|
|
|
<div class="user" style="background-image: url({{ route('user.header', activePoster.id) }});">
|
|
|
|
<div class="avatar avatar--border user__avatar" style="background-image: url({{ route('user.avatar', activePoster.id) }}); box-shadow: 0 0 5px #{% if activePoster.isOnline %}484{% else %}844{% endif %};"></div>
|
|
|
|
<div class="user__info">
|
2016-08-04 21:24:08 +00:00
|
|
|
<h1 style="color: {{ activePoster.colour }}; text-shadow: 0 0 7px {% if activePoster.colour != 'inherit' %}{{ activePoster.colour }}{% else %}#222{% endif %}; padding: 0 0 2px;" {% if activePoster.getUsernameHistory %} title="Known as {{ activePoster.getUsernameHistory[0].username_old }} before {{ activePoster.getUsernameHistory[0].change_time|date(config('general.date_format')) }}." {% endif %}>{{ activePoster.username }}</h1>
|
2016-07-29 19:31:36 +00:00
|
|
|
{% if activePoster.isPremium %}<img src="/images/tenshi.png" alt="Tenshi" style="vertical-align: middle;"> {% endif %}<img src="/images/flags/{{ activePoster.country|lower }}.png" alt="{{ activePoster.country }}" style="vertical-align: middle;" title="{{ activePoster.country(true) }}"> <span style="font-size: .8em;">{{ activePoster.title }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{% else %}
|
2016-11-08 19:56:37 +00:00
|
|
|
<h1 style="margin: 1em 0; text-align: center;">No one yet!</h1>
|
2016-07-29 19:31:36 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-11-09 18:32:23 +00:00
|
|
|
<div class="content--left">
|
2016-07-29 19:31:36 +00:00
|
|
|
{% include 'forum/elements/forumBase.twig' %}
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|