This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/resources/views/yuuno/forum/elements/topicEntry.twig

51 lines
2.3 KiB
Twig
Raw Normal View History

2016-11-12 01:52:51 +00:00
<div class="topic{% if topic.type == 2 %} topic--highlight{% endif %}">
<div class="
topic__icon
fa fa-2x
{% if topic.unread(user.id) %}topic__icon--unread{% endif %}
fa-{% if topic.type == 1 %}thumb-tack{% elseif topic.type == 2 %}bullhorn{% elseif topic.status == 1 %}lock{% else %}navicon{% endif %}
"></div>
<div class="topic__info">
<a class="topic__title" href="{{ route('forums.topic', topic.id) }}">
{{ topic.title }}
</a>
2016-12-22 18:10:09 +00:00
{% if topic.user %}
2016-11-12 01:52:51 +00:00
<div class="topic__author">
by
2016-12-22 18:10:09 +00:00
<a class="topic__author-link" href="{{ route('user.profile', topic.user) }}" style="color: {{ topic.firstPostUserColour }}; text-shadow: 0 0 5px {% if topic.firstPostUserColour != 'inherit' %}{{ topic.firstPostUserColour }}{% else %}#222{% endif %}">
{{ topic.firstPostUsername }}
2016-11-12 01:52:51 +00:00
</a>
</div>
{% endif %}
2016-11-12 01:52:51 +00:00
</div>
<div class="topic__stats">
<div class="topic__stat--big" title="Replies">
2016-12-22 18:10:09 +00:00
{{ topic.replies }}
2016-11-12 01:52:51 +00:00
</div>
<div class="topic__stat" title="Views">
{{ topic.views }}
</div>
</div>
<div class="topic__recent">
2016-12-22 18:10:09 +00:00
<div class="topic__recent-avatar avatar avatar--border" style="background-image: url('{{ route('user.avatar', topic.lastPostUserId) }}')"></div>
2016-11-12 01:52:51 +00:00
<div class="topic__recent-info">
<div class="topic__recent-info-row">
2016-12-22 18:10:09 +00:00
<a href="{{ route('forums.post', topic.lastPostId) }}">Last reply</a>
2016-11-12 01:52:51 +00:00
by
2016-12-22 18:10:09 +00:00
{% if topic.lastPostUserId %}
<a href="{{ route('user.profile', topic.lastPostUserId) }}" style="color: {{ topic.lastPostUserColour }}; text-shadow: 0 0 5px {% if topic.lastPostUserColour != 'inherit' %}{{ topic.lastPostUserColour }}{% else %}#222{% endif %};">
{{ topic.lastPostUsername }}
</a>
2016-11-12 01:52:51 +00:00
{% else %}
[deleted user]
{% endif %}
</div>
<div class="topic__recent-info-row">
2016-12-22 18:10:09 +00:00
<time class="time-ago" datetime="{{ topic.lastReply|date('r') }}">
{{ topic.lastReply|date(config('general.date_format')) }}
2016-11-12 01:52:51 +00:00
</time>
</div>
</div>
</div>
</div>