Browse Source

make post sort order by date ASC

main
ghost 1 year 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 @@ -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

45
public/css/default.css

@ -40,9 +40,23 @@ body @@ -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 @@ -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 @@ -127,11 +135,6 @@ main ul li span > svg
float: right;
}
main a > svg
{
fill: var(--color-warning);
}
footer
{
/*backdrop-filter: blur(100px);*/

2
src/Controller/RoomController.php

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

12
templates/default/layout.html.twig

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

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

@ -12,7 +12,7 @@ @@ -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 @@ @@ -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>

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

@ -47,16 +47,6 @@ @@ -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 %}

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

@ -1,16 +1,6 @@ @@ -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 @@ @@ -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 %}

Loading…
Cancel
Save