make post sort order by date ASC

This commit is contained in:
ghost 2023-12-10 10:50:32 +02:00
parent 40b68de431
commit 663691a913
7 changed files with 41 additions and 46 deletions

2
.env
View File

@ -19,7 +19,7 @@ APP_ENV=dev
APP_SECRET=EDIT_ME
###< symfony/framework-bundle ###
APP_VERSION=1.4.3
APP_VERSION=1.4.4
APP_NAME=KevaChat

View File

@ -40,9 +40,23 @@ body
header
{
max-width: var(--container-max-width);
margin: 16px auto;
background-color: Canvas;
display: block;
left: 0;
margin: 0 auto;
max-width: var(--container-max-width);
padding-top: 16px;
position: fixed;
right: 0;
top: 0;
z-index: 2;
}
header > h2
{
display: inline-block;
font-size: 12px;
margin: 16px 0;
}
header > strong
@ -66,28 +80,22 @@ header > div > sub > svg
fill: var(--color-error);
}
header > form > input[type="text"]
{
box-sizing: border-box;
padding: 4px;
width: 100%;
}
main
{
display: block;
margin: 16px auto 0 auto;
max-width: var(--container-max-width);
padding-top: 124px;
padding-bottom: 164px;
}
main > h2
{
display: inline-block;
font-size: 12px;
margin: 16px 0;
}
main > form > input[type="text"]
{
box-sizing: border-box;
padding: 4px;
width: 100%;
}
main ul
{
list-style: none;
@ -127,11 +135,6 @@ main ul li span > svg
float: right;
}
main a > svg
{
fill: var(--color-warning);
}
footer
{
/*backdrop-filter: blur(100px);*/

View File

@ -273,7 +273,7 @@ class RoomController extends AbstractController
$feed,
'time'
),
SORT_DESC,
SORT_ASC,
$feed
);

View File

@ -28,6 +28,18 @@
)
}}
{% endblock %}
{% block header_module_rooms %}
{{
render(
controller(
'App\\Controller\\ModuleController::rooms',
{
request: request
}
)
)
}}
{% endblock %}
</header>
<main>
{% block main_content %}{% endblock %}

View File

@ -12,7 +12,7 @@
{% endif %}
</h2>
<sup>
<a href="{{ path('room_namespace', { namespace : namespace, feed : 'rss' }) }}" title="{{ 'RSS' | trans }}" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 16 16">
<a href="{{ path('room_namespace', { namespace : namespace, feed : 'rss' }) }}" title="{{ 'RSS' | trans }}" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor" viewBox="0 0 16 16">
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2m0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2m.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"/>
</svg></a>
</sup>
@ -28,7 +28,7 @@
{% endif %}
</h2>
<sup>
<a href="{{ path('room_list', { feed : 'rss' }) }}" title="{{ 'RSS' | trans }}" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 16 16">
<a href="{{ path('room_list', { feed : 'rss' }) }}" title="{{ 'RSS' | trans }}" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor" viewBox="0 0 16 16">
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2m0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2m.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"/>
</svg></a>
</sup>

View File

@ -47,16 +47,6 @@
{% extends 'default/layout.html.twig' %}
{% block head_title_content %}{{ request.get('namespace') | keva_namespace_value }} - {{ 'KevaChat' | trans }}{% endblock %}
{% block main_content %}
{{
render(
controller(
'App\\Controller\\ModuleController::rooms',
{
request: request
}
)
)
}}
{% if tree %}
{{ recursive_post_tree(request.get('namespace'), tree) }}
{% else %}

View File

@ -1,16 +1,6 @@
{% extends 'default/layout.html.twig' %}
{% block head_title_content %}{{ 'Rooms' | trans }} - {{ 'KevaChat' | trans }}{% endblock %}
{% block main_content %}
{{
render(
controller(
'App\\Controller\\ModuleController::rooms',
{
request: request
}
)
)
}}
{% if list | length %}
<ul>
{% for room in list %}
@ -20,7 +10,7 @@
<a href="{{ path('room_namespace', { namespace : room.namespace }) }}">{{ room.namespace | keva_namespace_value }}</a>
</strong>
{{ room.total }}
<a href="{{ path('room_namespace', { namespace : room.namespace, feed : 'rss' }) }}" title="{{ 'RSS' | trans }}" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 16 16">
<a href="{{ path('room_namespace', { namespace : room.namespace, feed : 'rss' }) }}" title="{{ 'RSS' | trans }}" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor" viewBox="0 0 16 16">
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2m0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2m.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"/>
</svg></a>
{% if room.pinned %}