2018-08-15 01:12:58 +00:00
|
|
|
{% extends 'news/master.twig' %}
|
|
|
|
{% from '_layout/comments.twig' import comments_section %}
|
2018-04-14 02:58:53 +00:00
|
|
|
|
|
|
|
{% set title = post.post_title ~ ' :: News' %}
|
2018-05-16 20:48:33 +00:00
|
|
|
{% set canonical_url = '/news.php?p=' ~ post.post_id %}
|
2018-04-14 02:58:53 +00:00
|
|
|
|
2018-08-12 18:49:21 +00:00
|
|
|
{% block content %}
|
2018-04-16 00:33:54 +00:00
|
|
|
<div class="container news__post">
|
|
|
|
<div class="container__title">
|
2018-05-16 02:58:21 +00:00
|
|
|
<a href="/news.php?c={{ post.category_id }}" class="container__title__link">{{ post.category_name }}</a> »
|
2018-04-16 00:33:54 +00:00
|
|
|
{{ post.post_title }}
|
|
|
|
</div>
|
|
|
|
|
2018-08-11 16:46:39 +00:00
|
|
|
<div class="news__post__content">
|
2018-04-16 00:33:54 +00:00
|
|
|
<div class="news__post__text">
|
2018-09-21 08:56:52 +00:00
|
|
|
{{ post.post_text|parse_text(constant('MSZ_PARSER_MARKDOWN'))|raw }}
|
2018-04-14 02:58:53 +00:00
|
|
|
</div>
|
2018-04-16 00:33:54 +00:00
|
|
|
|
|
|
|
<div class="news__sidebar news__post__details">
|
2018-05-16 02:58:21 +00:00
|
|
|
<a class="news__post__detail news__post__user" href="/profile.php?u={{ post.user_id }}">
|
2018-07-06 01:28:06 +00:00
|
|
|
<div class="news__post__username" style="{{ post.user_colour|html_colour }}">{{ post.username }}</div>
|
2018-05-16 02:58:21 +00:00
|
|
|
<div class="avatar news__post__avatar" style="background-image:url('/profile.php?u={{ post.user_id }}&m=avatar');"></div>
|
2018-04-16 00:33:54 +00:00
|
|
|
</a>
|
|
|
|
|
2018-05-16 02:58:21 +00:00
|
|
|
<a class="news__post__detail news__post__info news__post__info--link" href="/news.php?c={{ post.category_id }}">
|
2018-04-16 00:33:54 +00:00
|
|
|
<div class="news__post__info__name">
|
|
|
|
Category
|
|
|
|
</div>
|
|
|
|
<div class="news__post__info__value">
|
2018-05-16 02:58:21 +00:00
|
|
|
{{ post.category_name }}
|
2018-04-16 00:33:54 +00:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<div class="news__post__detail news__post__info">
|
|
|
|
<div class="news__post__info__name">
|
|
|
|
Posted
|
|
|
|
</div>
|
2018-05-26 21:36:15 +00:00
|
|
|
<time class="news__post__info__value" datetime="{{ post.created_at|date('c') }}" title="{{ post.created_at|date('r') }}">
|
|
|
|
{{ post.created_at|time_diff }}
|
|
|
|
</time>
|
2018-04-14 02:58:53 +00:00
|
|
|
</div>
|
2018-04-16 00:33:54 +00:00
|
|
|
|
|
|
|
{# TODO: make this work
|
|
|
|
{% if post.updated_at is defined %}
|
|
|
|
<div class="news__post__detail news__post__info">
|
|
|
|
<div class="news__post__info__name">
|
|
|
|
Updated
|
|
|
|
</div>
|
|
|
|
<div class="news__post__info__value">
|
|
|
|
{{ post.updated_at }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %} #}
|
2018-04-14 02:58:53 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-16 00:33:54 +00:00
|
|
|
|
2018-08-10 04:20:54 +00:00
|
|
|
{% if comments is defined %}
|
|
|
|
<div class="container">
|
|
|
|
<div class="container__title">
|
|
|
|
Comments
|
|
|
|
</div>
|
|
|
|
{{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }}
|
2018-04-16 00:33:54 +00:00
|
|
|
</div>
|
2018-08-10 04:20:54 +00:00
|
|
|
{% endif %}
|
2018-04-14 02:58:53 +00:00
|
|
|
{% endblock %}
|