misuzu/templates/changelog/change.twig
flash 383e2ed0e0 Rewrote the user information class.
This one took multiple days and it pretty invasive into the core of Misuzu so issue might (will) arise, there's also some features that have gone temporarily missing in the mean time and some inefficiencies introduced that will be fixed again at a later time.
The old class isn't gone entirely because I still have to figure out what I'm gonna do about validation, but for the most part this knocks out one of the "layers of backwards compatibility", as I've been referring to it, and is moving us closer to a future where Flashii actually gets real updates.
If you run into anything that's broken and you're inhibited from reporting it through the forum, do it through chat or mail me at flashii-issues@flash.moe.
2023-08-02 22:12:47 +00:00

75 lines
3.4 KiB
Twig

{% extends 'changelog/master.twig' %}
{% from 'macros.twig' import container_title, avatar %}
{% from '_layout/comments.twig' import comments_section %}
{% set title = 'Changelog » Change #' ~ change_info.id %}
{% set canonical_url = url('changelog-change', {'change': change_info.id}) %}
{% set manage_link = url('manage-changelog-change', {'change': change_info.id}) %}
{% set description = change_info.summary %}
{% block content %}
<div class="container changelog__log changelog__action--{{ change_info.action }}">
<div class="changelog__log__action">
{{ change_info.actionText }}
</div>
<div class="changelog__log__text">
{{ change_info.summary }}
</div>
</div>
<div class="container changelog__change"{% if change_user_colour is not null %} style="--accent-colour: {{ change_user_colour }}"{% endif %}>
<div class="changelog__change__info">
<div class="changelog__change__info__background"></div>
<div class="changelog__change__info__content">
{% if change_user_info.id|default(null) is not null %}
<div class="changelog__change__user">
<a class="changelog__change__avatar" href="{{ url('user-profile', {'user': change_user_info.id}) }}">
{{ avatar(change_user_info.id, 60, change_user_info.name) }}
</a>
<div class="changelog__change__user__details">
<a class="changelog__change__username" href="{{ url('user-profile', {'user': change_user_info.id}) }}">{{ change_user_info.name }}</a>
<a class="changelog__change__userrole" href="{{ url('user-list', {'role': change_user_info.displayRoleId}) }}">{{ change_user_info.title }}</a>
</div>
</div>
{% endif %}
<a class="changelog__change__date" href="{{ url('changelog-index', {'date': change_info.date}) }}">
Created
<time datetime="{{ change_info.createdTime|date('c') }}" title="{{ change_info.createdTime|date('r') }}">
{{ change_info.createdTime|time_format }}
</time>
</a>
{% if change_info.tags|length > 0 %}
<ul class="changelog__change__tags">
{% for tag in change_info.tags %}
<li class="changelog__change__tag" title="{{ tag.description }}">
<a href="{{ url('changelog-index', {'tags': tag.id}) }}" class="changelog__change__tag__link">
{{ tag.name }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
<div class="changelog__change__text markdown">
<h1>{{ title }}</h1>
{% if change_info.hasBody %}
{{ change_info.body|parse_text(2)|raw }}
{% else %}
<p>This change has no additional notes.</p>
{% endif %}
</div>
</div>
<div class="container">
{{ container_title('<i class="fas fa-comments fa-fw"></i> Comments for ' ~ change_info.date) }}
{{ comments_section(comments_info) }}
</div>
{% endblock %}