From 0f66900d9c3d62ce363d0710eeaab48c8850cf89 Mon Sep 17 00:00:00 2001 From: Humberto Rocha Date: Mon, 30 Jan 2023 13:24:15 -0500 Subject: [PATCH] Fix header duplication during infinity scroll (#483) --- templates/identity/view.html | 110 ++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/templates/identity/view.html b/templates/identity/view.html index 3638f54..d7018f5 100644 --- a/templates/identity/view.html +++ b/templates/identity/view.html @@ -15,30 +15,32 @@ {% block body_class %}has-banner{% endblock %} {% block content %} -

- {% if identity.local_image_url %} - - {% endif %} + {% if not request.htmx %} +

+ {% if identity.local_image_url %} + + {% endif %} - + - {% if request.identity %}{% include "identity/_view_menu.html" %}{% endif %} + {% if request.identity %}{% include "identity/_view_menu.html" %}{% endif %} - {{ identity.html_name_or_handle }} - - @{{ identity.handle }} - - - - -

+ {{ identity.html_name_or_handle }} + + @{{ identity.handle }} + + + + + + {% endif %} {% if inbound_block %}

@@ -46,41 +48,43 @@

{% else %} - {% if identity.summary %} -
- {{ identity.safe_summary }} -
- {% endif %} + {% if not request.htmx %} + {% if identity.summary %} +
+ {{ identity.safe_summary }} +
+ {% endif %} - {% if identity.metadata %} -
- {% for entry in identity.safe_metadata %} - - {% endfor %} -
- {% endif %} + {% if identity.metadata %} +
+ {% for entry in identity.safe_metadata %} + + {% endfor %} +
+ {% endif %} - {% if identity.local and identity.config_identity.visible_follows %} -
- {{ post_count }} posts - {{ following_count }} following - {{ followers_count }} follower{{ followers_count|pluralize }} -
- {% endif %} + {% if identity.local and identity.config_identity.visible_follows %} +
+ {{ post_count }} posts + {{ following_count }} following + {{ followers_count }} follower{{ followers_count|pluralize }} +
+ {% endif %} - {% if not identity.local %} - {% if identity.outdated and not identity.name %} -

- The system is still fetching this profile. Refresh to see updates. -

- {% else %} -

- This is a member of another server. - See their original profile ➔ -

+ {% if not identity.local %} + {% if identity.outdated and not identity.name %} +

+ The system is still fetching this profile. Refresh to see updates. +

+ {% else %} +

+ This is a member of another server. + See their original profile ➔ +

+ {% endif %} {% endif %} {% endif %}