From edb913011cf9e1e9b761f2290d87b6e29c50a02d Mon Sep 17 00:00:00 2001 From: BentiGorlich Date: Thu, 10 Oct 2024 17:00:37 +0200 Subject: [PATCH] Redesign federation page (#1181) --- templates/page/federation.html.twig | 85 +++++++++++++++++++---------- translations/messages.en.yaml | 1 + 2 files changed, 58 insertions(+), 28 deletions(-) diff --git a/templates/page/federation.html.twig b/templates/page/federation.html.twig index 0218b8307..9f38bd3dd 100644 --- a/templates/page/federation.html.twig +++ b/templates/page/federation.html.twig @@ -13,11 +13,25 @@ {% endblock %} {% block body %} -

{{ 'federation'|trans }}

-
+

{{ 'federation'|trans }}

+ +
+

{{'federation_page_allowed_description'|trans}}

{% if allowedInstances is not empty %} -

{{'federation_page_allowed_description'|trans}}

@@ -52,10 +66,15 @@ {% endfor %}
+ {% else %} + {% endif %} - +
+
+

{{'federation_page_disallowed_description'|trans}}

{% if defederatedInstances is not empty %} -

{{'federation_page_disallowed_description'|trans}}

@@ -65,20 +84,26 @@ - {% for instance in defederatedInstances %} - - - - - - {% endfor %} + {% for instance in defederatedInstances %} + + + + + + {% endfor %}
{{instance.domain}}{{ instance.software ?? '' }}{{ instance.version ?? '' }}
{{instance.domain}}{{ instance.software ?? '' }}{{ instance.version ?? '' }}
+ {% else %} + {% endif %} +
+
+

{{'federation_page_dead_title'|trans}}

+

{{ 'federation_page_dead_description'|trans }}

{% if deadInstances is not empty %} -

{{'federation_page_dead_title'|trans}}

-

{{ 'federation_page_dead_description'|trans }}

@@ -91,22 +116,26 @@ - {% for instance in deadInstances %} - - - - - {% if app.user is defined and app.user is not same as null and app.user.admin %} - - {% endif %} - - {% endfor %} + {% for instance in deadInstances %} + + + + + {% if app.user is defined and app.user is not same as null and app.user.admin %} + + {% endif %} + + {% endfor %}
{{instance.domain}}{{ instance.software ?? ''}}{{ instance.version ?? '' }} - {% if instance.lastFailedDeliver is not same as null %} - {{ component('date', { date: instance.lastFailedDeliver }) }} - {% endif %} -
{{instance.domain}}{{ instance.software ?? ''}}{{ instance.version ?? '' }} + {% if instance.lastFailedDeliver is not same as null %} + {{ component('date', { date: instance.lastFailedDeliver }) }} + {% endif %} +
+ {% else %} + {% endif %}
{% endblock %} diff --git a/translations/messages.en.yaml b/translations/messages.en.yaml index d58507727..bff5a1bb6 100644 --- a/translations/messages.en.yaml +++ b/translations/messages.en.yaml @@ -897,3 +897,4 @@ admin_users_banned: Banned user_verify: Activate account max_image_size: Maximum file size comment_not_found: Comment not found +table_of_contents: Table of contents