From 0691bccd834203561828ed8714d13cb3752fd5fc Mon Sep 17 00:00:00 2001 From: Daniel Wilkowski Date: Tue, 10 Oct 2023 23:20:55 +0200 Subject: [PATCH] Switch timeline on page reload --- resources/views/home.twig | 158 +++++++++++++++++++++++++------------- 1 file changed, 106 insertions(+), 52 deletions(-) diff --git a/resources/views/home.twig b/resources/views/home.twig index 8083b84d0..562c74eb8 100644 --- a/resources/views/home.twig +++ b/resources/views/home.twig @@ -47,6 +47,42 @@ + + {% if settings['homepage.timeline'] == 1 %} + + {% endif %} +
@@ -75,11 +111,13 @@
{% for topic in interesting %}
- - {{ topic.views }} - - {{ declination(topic.views, ['wyświetlenie', 'wyświetlenia', 'wyświetleń'], true) }} - + + + {{ topic.views }} + + + {{ declination(topic.views, ['wyświetlenie', 'wyświetlenia', 'wyświetleń'], true) }} +
@@ -102,11 +140,13 @@
{% for topic in newest %}
- - {{ topic.views }} - - {{ declination(topic.views, ['wyświetlenie', 'wyświetlenia', 'wyświetleń'], true) }} - + + + {{ topic.views }} + + + {{ declination(topic.views, ['wyświetlenie', 'wyświetlenia', 'wyświetleń'], true) }} +
@@ -127,32 +167,34 @@
-
-
-
- {% for activity in activities %} -
+ {% if settings['homepage.timeline'] == 0 %} +
+
+
+ {% for activity in activities %} +
-
- - activity.user.name - -
-
-

{{ activity.headline|raw }}

- {{ activity.created_at }} - {{ activity.excerpt }} +
+ + activity.user.name + +
+
+

{{ activity.headline|raw }}

+ {{ activity.created_at }} + {{ activity.excerpt }} +
-
- {% endfor %} + {% endfor %} +
-
+ {% endif %}
@@ -160,34 +202,46 @@
-

- - Oś czasu -

-
-
-
- - - -
-
- - +
- + {% else %} +

+ + + Popularne wpisy na mikroblogu + +

+
+ +
+ {% endif %}