From 663691a913562f2686acdd18c069631f563788f3 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 10 Dec 2023 10:50:32 +0200 Subject: [PATCH] make post sort order by date ASC --- .env | 2 +- public/css/default.css | 45 +++++++++++++----------- src/Controller/RoomController.php | 2 +- templates/default/layout.html.twig | 12 +++++++ templates/default/module/rooms.html.twig | 4 +-- templates/default/room/index.html.twig | 10 ------ templates/default/room/list.html.twig | 12 +------ 7 files changed, 41 insertions(+), 46 deletions(-) diff --git a/.env b/.env index b4898bf..0ae434e 100644 --- a/.env +++ b/.env @@ -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 diff --git a/public/css/default.css b/public/css/default.css index 722f86d..8268da6 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -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);*/ diff --git a/src/Controller/RoomController.php b/src/Controller/RoomController.php index 2f248a7..1bb7b05 100644 --- a/src/Controller/RoomController.php +++ b/src/Controller/RoomController.php @@ -273,7 +273,7 @@ class RoomController extends AbstractController $feed, 'time' ), - SORT_DESC, + SORT_ASC, $feed ); diff --git a/templates/default/layout.html.twig b/templates/default/layout.html.twig index c7d20e1..40e9891 100644 --- a/templates/default/layout.html.twig +++ b/templates/default/layout.html.twig @@ -28,6 +28,18 @@ ) }} {% endblock %} + {% block header_module_rooms %} + {{ + render( + controller( + 'App\\Controller\\ModuleController::rooms', + { + request: request + } + ) + ) + }} + {% endblock %}
{% block main_content %}{% endblock %} diff --git a/templates/default/module/rooms.html.twig b/templates/default/module/rooms.html.twig index bf554b0..ac5a5b3 100644 --- a/templates/default/module/rooms.html.twig +++ b/templates/default/module/rooms.html.twig @@ -12,7 +12,7 @@ {% endif %} - + @@ -28,7 +28,7 @@ {% endif %} - + diff --git a/templates/default/room/index.html.twig b/templates/default/room/index.html.twig index 3530507..3d9d498 100644 --- a/templates/default/room/index.html.twig +++ b/templates/default/room/index.html.twig @@ -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 %} diff --git a/templates/default/room/list.html.twig b/templates/default/room/list.html.twig index 081761f..dfc643c 100644 --- a/templates/default/room/list.html.twig +++ b/templates/default/room/list.html.twig @@ -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 %}