Browse Source

make post sort order by date ASC

main
ghost 12 months ago
parent
commit
663691a913
  1. 2
      .env
  2. 45
      public/css/default.css
  3. 2
      src/Controller/RoomController.php
  4. 12
      templates/default/layout.html.twig
  5. 4
      templates/default/module/rooms.html.twig
  6. 10
      templates/default/room/index.html.twig
  7. 12
      templates/default/room/list.html.twig

2
.env

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

45
public/css/default.css

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

2
src/Controller/RoomController.php

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

12
templates/default/layout.html.twig

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

4
templates/default/module/rooms.html.twig

@ -12,7 +12,7 @@
{% endif %} {% endif %}
</h2> </h2>
<sup> <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"/> <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> </svg></a>
</sup> </sup>
@ -28,7 +28,7 @@
{% endif %} {% endif %}
</h2> </h2>
<sup> <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"/> <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> </svg></a>
</sup> </sup>

10
templates/default/room/index.html.twig

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

12
templates/default/room/list.html.twig

@ -1,16 +1,6 @@
{% extends 'default/layout.html.twig' %} {% extends 'default/layout.html.twig' %}
{% block head_title_content %}{{ 'Rooms' | trans }} - {{ 'KevaChat' | trans }}{% endblock %} {% block head_title_content %}{{ 'Rooms' | trans }} - {{ 'KevaChat' | trans }}{% endblock %}
{% block main_content %} {% block main_content %}
{{
render(
controller(
'App\\Controller\\ModuleController::rooms',
{
request: request
}
)
)
}}
{% if list | length %} {% if list | length %}
<ul> <ul>
{% for room in list %} {% for room in list %}
@ -20,7 +10,7 @@
<a href="{{ path('room_namespace', { namespace : room.namespace }) }}">{{ room.namespace | keva_namespace_value }}</a> <a href="{{ path('room_namespace', { namespace : room.namespace }) }}">{{ room.namespace | keva_namespace_value }}</a>
</strong> </strong>
{{ room.total }} {{ 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"/> <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> </svg></a>
{% if room.pinned %} {% if room.pinned %}

Loading…
Cancel
Save