From 1cb360e5d3409f7f04e3e6836f784e1a0f7b3cb7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 28 Mar 2022 09:47:53 +0100 Subject: [PATCH] async image loading --- blog.py | 19 +++++++------ webapp_calendar.py | 9 ++++-- webapp_column_left.py | 15 ++++++---- webapp_column_right.py | 27 ++++++++++-------- webapp_confirm.py | 11 +++++--- webapp_create_post.py | 37 +++++++++++++----------- webapp_frontscreen.py | 2 +- webapp_hashtagswarm.py | 3 +- webapp_headerbuttons.py | 10 +++---- webapp_likers.py | 3 +- webapp_login.py | 4 +-- webapp_media.py | 16 +++++++---- webapp_moderation.py | 2 +- webapp_person_options.py | 3 +- webapp_podcast.py | 12 ++++---- webapp_post.py | 61 ++++++++++++++++++++++------------------ webapp_profile.py | 26 +++++++++-------- webapp_search.py | 20 ++++++++----- webapp_theme_designer.py | 2 +- webapp_timeline.py | 36 +++++++++++++++--------- webapp_utils.py | 17 ++++++----- 21 files changed, 195 insertions(+), 140 deletions(-) diff --git a/blog.py b/blog.py index f4c78f41c..73601f043 100644 --- a/blog.py +++ b/blog.py @@ -497,14 +497,14 @@ def html_blog_post(session, authorized: bool, blog_str += '' blog_str += 'RSS 2.0' # blog_str += '' # blog_str += 'RSS 3.0' @@ -557,7 +557,7 @@ def html_blog_page(authorized: bool, session, navigate_str += '' + \ - '<\n' if len(timeline_json['orderedItems']) >= no_of_items: @@ -565,7 +565,7 @@ def html_blog_page(authorized: bool, session, navigate_str += '' + \ - '>\n' navigate_str += '

' @@ -590,13 +590,13 @@ def html_blog_page(authorized: bool, session, blog_str += '' - blog_str += 'RSS 2.0' # blog_str += '' - # blog_str += 'RSS 3.0' @@ -838,7 +838,7 @@ def html_edit_blog(media_instance: bool, translate: {}, translate['This is a scheduled post.'] + '

' date_and_location += \ - '

' date_and_location += \ '' @@ -874,13 +874,14 @@ def html_edit_blog(media_instance: bool, translate: {}, edit_blog_form += '

' edit_blog_form += \ - ' ' + \ scope_description + '' edit_blog_form += '
' edit_blog_form += ' ' + \
         translate['Search for emoji'] + '' diff --git a/webapp_calendar.py b/webapp_calendar.py index d0901bad9..309f99263 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -199,7 +199,8 @@ def _html_calendar_day(person_cache: {}, css_cache: {}, translate: {}, '?month=' + str(month_number) + \ '?day=' + str(day_number) + \ '?time=' + event_time + \ - '">\n' + \
+                    '\n' + \
                     translate['Delete this event'] + ' |\n' @@ -395,7 +396,8 @@ def html_calendar(person_cache: {}, css_cache: {}, translate: {}, '?month=' + str(prev_month_number) + '" ' + \ 'accesskey="' + access_keys['Page up'] + '">' calendar_str += \ - ' ' + translate['Previous month'] + \
+        '  <img loading=\n' calendar_str += ' ' calendar_str += \ - ' ' + translate['Next month'] + \
+        '  <img loading=\n' calendar_str += '\n' diff --git a/webapp_column_left.py b/webapp_column_left.py index 790be4c72..726c73fe0 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -140,7 +140,7 @@ def get_left_column_content(base_dir: str, nickname: str, domain_full: str, edit_image_class = 'leftColEditImage' html_str += \ '\n
\n \n' + \ '
\n' @@ -163,7 +163,8 @@ def get_left_column_content(base_dir: str, nickname: str, domain_full: str, html_str += \ ' ' + \ - '' + \
+            '<img class=\n' @@ -172,7 +173,8 @@ def get_left_column_content(base_dir: str, nickname: str, domain_full: str, html_str += \ ' ' + \ - '' + \
+            '<img class=\n' @@ -190,7 +192,8 @@ def get_left_column_content(base_dir: str, nickname: str, domain_full: str, rss_title = translate['RSS feed for this site'] rss_icon_str = \ ' ' + rss_title + '\n' if rss_icon_at_top: html_str += rss_icon_str @@ -387,7 +390,7 @@ def html_links_mobile(css_cache: {}, base_dir: str, html_str += \ '' + \ - '\n' @@ -457,7 +460,7 @@ def html_edit_links(css_cache: {}, translate: {}, base_dir: str, path: str, translate['Switch to timeline view'] + '" ' + \ 'accesskey="' + access_keys['menuTimeline'] + '">\n' edit_links_form += \ - '\n' + \ '\n' diff --git a/webapp_column_right.py b/webapp_column_right.py index b46473e25..cc680749e 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -104,7 +104,7 @@ def get_right_column_content(base_dir: str, nickname: str, domain_full: str, html_str += \ '\n
\n' + \ ' \n' + \ '
\n' @@ -136,7 +136,7 @@ def get_right_column_content(base_dir: str, nickname: str, domain_full: str, '/users/' + nickname + '/editnewswire" ' + \ 'accesskey="' + access_keys['menuEdit'] + '">' + \ '' + \
+                '\n' @@ -147,7 +147,7 @@ def get_right_column_content(base_dir: str, nickname: str, domain_full: str, '/users/' + nickname + '/editnewswire" ' + \ 'accesskey="' + access_keys['menuEdit'] + '">' + \ '' + \
+                '\n' @@ -156,14 +156,14 @@ def get_right_column_content(base_dir: str, nickname: str, domain_full: str, rss_icon_str = \ ' ' + \ '' + \
+        '\n' rss_icon_str += \ ' ' + \ '' + \
+        '\n' @@ -181,7 +181,7 @@ def get_right_column_content(base_dir: str, nickname: str, domain_full: str, '/users/' + nickname + '/newblog?nodropdown" ' + \ 'accesskey="' + access_keys['menuNewPost'] + '">' + \ '' + \
+                '\n' @@ -261,7 +261,8 @@ def _html_newswire(base_dir: str, newswire: {}, nickname: str, moderator: bool, cached_favicon_filename.replace(base_dir, '') favicon_link = \ - '' moderated_item = item[5] link_url = url @@ -298,7 +299,8 @@ def _html_newswire(base_dir: str, newswire: {}, nickname: str, moderator: bool, ' ' + date_shown + '' - html_str += '

\n' else: @@ -390,8 +392,8 @@ def html_citations(base_dir: str, nickname: str, domain: str, '\n' - html_str += '\n' html_str += \ @@ -504,7 +506,7 @@ def html_newswire_mobile(css_cache: {}, base_dir: str, nickname: str, html_str += \ '' + \ - '\n' @@ -576,7 +578,8 @@ def html_edit_newswire(css_cache: {}, translate: {}, base_dir: str, path: str, translate['Switch to timeline view'] + '" ' + \ 'accesskey="' + access_keys['menuTimeline'] + '">\n' edit_newswire_form += \ - '\n' diff --git a/webapp_confirm.py b/webapp_confirm.py index d0bcedc6d..63dce3c4f 100644 --- a/webapp_confirm.py +++ b/webapp_confirm.py @@ -159,7 +159,7 @@ def html_confirm_remove_shared_item(css_cache: {}, translate: {}, shares_str += '
\n' shares_str += '
\n' if shared_item_image_url: - shares_str += ' \n' shares_str += \ '

' + translate['Remove'] + \ @@ -214,7 +214,8 @@ def html_confirm_follow(css_cache: {}, translate: {}, base_dir: str, follow_str += '

\n' follow_str += ' \n' follow_str += \ - ' \n' + ' \n' follow_actor_nick = get_nickname_from_actor(follow_actor) if follow_actor_nick: follow_str += \ @@ -263,7 +264,8 @@ def html_confirm_unfollow(css_cache: {}, translate: {}, base_dir: str, follow_str += '
\n' follow_str += ' \n' follow_str += \ - ' \n' + ' \n' follow_actor_nick = get_nickname_from_actor(follow_actor) if follow_actor_nick: follow_str += \ @@ -309,7 +311,8 @@ def html_confirm_unblock(css_cache: {}, translate: {}, base_dir: str, block_str += '
\n' block_str += ' \n' block_str += \ - ' \n' + ' \n' block_actor_nick = get_nickname_from_actor(block_actor) if block_actor_nick: block_str += \ diff --git a/webapp_create_post.py b/webapp_create_post.py index c81ed2cbe..584be618b 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -90,7 +90,8 @@ def _html_new_post_drop_down(scope_icon: str, scope_description: str, 'id="my-newPostDropdown" value="" name="my-checkbox">\n' drop_down_content += ' \n' if no_drop_down: @@ -102,7 +103,7 @@ def _html_new_post_drop_down(scope_icon: str, scope_description: str, drop_down_content += \ '
  • ' + \ - '' + \ translate['Public'] + '
    ' + \ translate['Visible to anyone'] + '
  • \n' @@ -110,7 +111,8 @@ def _html_new_post_drop_down(scope_icon: str, scope_description: str, drop_down_content += \ '
  • ' + \ - '' + \ translate['Article'] + '
    ' + \ translate['Create an article'] + '
  • \n' @@ -118,27 +120,28 @@ def _html_new_post_drop_down(scope_icon: str, scope_description: str, drop_down_content += \ '
  • ' + \ - '' + \ translate['Blog'] + '
    ' + \ translate['Publicly visible post'] + '
  • \n' drop_down_content += \ '
  • ' + \ translate['Unlisted'] + '
    ' + \ translate['Not on public timeline'] + '
  • \n' drop_down_content += \ '
  • ' + \ - '' + \ translate['Followers'] + '
    ' + \ translate['Only to followers'] + '
  • \n' drop_down_content += \ '
  • ' + \ - '' + \ translate['DM'] + '
    ' + \ translate['Only to mentioned people'] + '
  • \n' @@ -146,14 +149,14 @@ def _html_new_post_drop_down(scope_icon: str, scope_description: str, drop_down_content += \ '
  • ' + \ - '' + \ translate['Reminder'] + '
    ' + \ translate['Scheduled note to yourself'] + '
  • \n' drop_down_content += \ '
  • ' + \ - '' + \ translate['Report'] + '
    ' + \ translate['Send to moderators'] + '
  • \n' @@ -162,20 +165,21 @@ def _html_new_post_drop_down(scope_icon: str, scope_description: str, drop_down_content += \ '
  • ' + \ - '' + \ translate['Shares'] + '
    ' + \ translate['Describe a shared item'] + '
  • \n' drop_down_content += \ '
  • ' + \ - '' + \ translate['Wanted'] + '
    ' + \ translate['Describe something wanted'] + '
  • \n' drop_down_content += \ '
  • ' + \ translate['Question'] + '
    ' + \ translate['Ask a question'] + '
  • \n' @@ -225,7 +229,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {}, date_and_time_str = '

    \n' if not is_new_reminder: date_and_time_str += \ - '\n' # select a date and time for this post @@ -652,7 +656,8 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {}, translate['Switch to timeline view'] + '" alt="' + \ translate['Switch to timeline view'] + '" ' + \ 'accesskey="' + access_keys['menuTimeline'] + '">\n' - new_post_form += '\n' + \ '\n' @@ -765,8 +770,8 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {}, new_post_form += \ ' ' + \
         translate['Search for emoji'] + '\n' diff --git a/webapp_frontscreen.py b/webapp_frontscreen.py index 791dd1dc2..e6cc01145 100644 --- a/webapp_frontscreen.py +++ b/webapp_frontscreen.py @@ -144,7 +144,7 @@ def html_front_screen(signing_priv_key_pem: str, banner_file, _ = \ get_banner_file(base_dir, nickname, domain, theme) profile_header_str = \ - '\n' if login_button: profile_header_str += '

    ' + login_button + '
    \n' diff --git a/webapp_hashtagswarm.py b/webapp_hashtagswarm.py index 6ddab1486..4b12ecf4e 100644 --- a/webapp_hashtagswarm.py +++ b/webapp_hashtagswarm.py @@ -220,7 +220,8 @@ def html_search_hashtag_category(css_cache: {}, translate: {}, if os.path.isfile(search_banner_filename): html_str += '\n' - html_str += '\n' html_str += \ diff --git a/webapp_headerbuttons.py b/webapp_headerbuttons.py index 519de7438..63e6a4be1 100644 --- a/webapp_headerbuttons.py +++ b/webapp_headerbuttons.py @@ -220,7 +220,7 @@ def header_buttons_timeline(default_timeline: str, # the search icon tl_str += \ '| ' + \
                 translate['Search and follow'] + \
@@ -248,7 +248,7 @@ def header_buttons_timeline(default_timeline: str,
             tl_str += \
                 '      <a class=| ' + calendar_alt_text + \
                 '\n' @@ -265,7 +265,7 @@ def header_buttons_timeline(default_timeline: str, tl_str += \ ' | ' + translate['Show/Hide Buttons'] + \
                 '\n' @@ -287,7 +287,7 @@ def header_buttons_timeline(default_timeline: str, tl_str += \ '' + \ - '| ' + translate['News'] + \
             '' @@ -305,7 +305,7 @@ def header_buttons_timeline(default_timeline: str, tl_str += \ '' + \ - '| ' + translate['Edit Links'] + \
             '' diff --git a/webapp_likers.py b/webapp_likers.py index 563b77d54..54d51507a 100644 --- a/webapp_likers.py +++ b/webapp_likers.py @@ -73,7 +73,8 @@ def html_likers_of_post(base_dir: str, nickname: str, translate['Switch to timeline view'] + '" alt="' + \ translate['Switch to timeline view'] + '" ' + \ 'accesskey="' + access_keys['menuTimeline'] + '">\n' - html_str += '\n' + \ '\n' diff --git a/webapp_login.py b/webapp_login.py index cf00df87f..dd6fd4b24 100644 --- a/webapp_login.py +++ b/webapp_login.py @@ -166,7 +166,7 @@ def html_login(css_cache: {}, translate: {}, '
    \n' + \ '
    \n' + \ text_mode_logo_html + '\n' + \ - ' ' + instance_title + '\n' + \ login_text + tos_str + '\n' + \ '
    \n' + \ @@ -188,7 +188,7 @@ def html_login(css_cache: {}, translate: {}, '
    \n' + \ '\n' + \ '' + \ - '' + \
         translate['Get the source code'] + '\n' login_form += html_footer() diff --git a/webapp_media.py b/webapp_media.py index 87cd44f25..35dc8b7f5 100644 --- a/webapp_media.py +++ b/webapp_media.py @@ -40,7 +40,7 @@ def _add_embedded_video_from_sites(translate: {}, content: str, if '<' in url: url = url.split('<')[0] content += \ - "
    \n\n" diff --git a/webapp_post.py b/webapp_post.py index 567bdf322..0dfd1a2ef 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -356,7 +356,8 @@ def _get_avatar_image_html(showAvatarOptions: bool, if translate.get(show_profile_str): show_profile_str = translate[show_profile_str] avatar_link += \ - ' \n' @@ -373,7 +374,7 @@ def _get_avatar_image_html(showAvatarOptions: bool, ';' + str(page_number) + ';' + \ avatar_url + message_id_str + '">\n' avatar_link += \ - ' ' + reply_to_this_post_str + \
         ' |\n' return reply_str @@ -520,7 +521,7 @@ def _get_edit_icon_html(base_dir: str, nickname: str, domain_full: str, post_id.split('/statuses/')[1] + \ ';actor=' + actor_nickname + \ '" title="' + edit_blog_post_str + '">' + \ - '' + edit_blog_post_str + \
                     ' |\n' else: @@ -531,7 +532,7 @@ def _get_edit_icon_html(base_dir: str, nickname: str, domain_full: str, post_id.split('/statuses/')[1] + \ '?actor=' + actor_nickname + \ '" title="' + edit_blog_post_str + '">' + \ - '' + edit_blog_post_str + \
                     ' |\n' elif isEvent: @@ -545,7 +546,7 @@ def _get_edit_icon_html(base_dir: str, nickname: str, domain_full: str, post_id.split('/statuses/')[1] + \ '?actor=' + actor_nickname + \ '" title="' + edit_event_str + '">' + \ - '' + edit_event_str + \
                 ' |\n' return edit_str @@ -640,7 +641,7 @@ def _get_announce_icon_html(is_announced: bool, announce_str += \ ' ' + \ - '' + announce_emoji + announce_title + \
         ' |\n' return announce_str @@ -715,7 +716,8 @@ def _get_like_icon_html(nickname: str, domain_full: str, '?tl=' + box_name + '" title="' + like_title + like_count_str + '">\n' like_str += \ ' ' + \ - '' + like_emoji + like_title + \
         ' |\n' return like_str @@ -762,7 +764,8 @@ def _get_bookmark_icon_html(nickname: str, domain_full: str, '?tl=' + box_name + '" title="' + bookmark_title + '">\n' bookmark_str += \ ' ' + \ - '' + \
+        '<img loading=\n' return bookmark_str @@ -800,7 +803,8 @@ def _get_reaction_icon_html(nickname: str, domain_full: str, '?tl=' + box_name + '" title="' + reaction_title + '">\n' reaction_str += \ ' ' + \ - '' + \
+        '<img loading=\n' return reaction_str @@ -834,7 +838,7 @@ def _get_mute_icon_html(is_muted: bool, '" title="' + mute_this_post_str + '">\n' mute_str += \ ' ' + \ - '' + \
+            '<img loading=\n' @@ -849,7 +853,8 @@ def _get_mute_icon_html(is_muted: bool, timeline_post_bookmark + '" title="' + undo_mute_str + '">\n' mute_str += \ ' ' + \ - '🔇 ' + undo_mute_str + \
+            '<img loading=\n' return mute_str @@ -880,7 +885,7 @@ def _get_delete_icon_html(nickname: str, domain_full: str, '" title="' + delete_this_post_str + '">\n' delete_str += \ ' ' + \ - '' + \
+                    '<img loading=\n' @@ -970,7 +975,7 @@ def _boost_own_post_html(translate: {}) -> str: announces_str = 'announces' if translate.get(announces_str): announces_str = translate[announces_str] - return ' ' + announces_str + \
         '' \ - ' \n \n' @@ -1126,7 +1132,7 @@ def _reply_to_yourself_html(translate: {}) -> str: replying_to_themselves_str = 'replying to themselves' if translate.get(replying_to_themselves_str): replying_to_themselves_str = translate[replying_to_themselves_str] - return ' ' + replying_to_themselves_str + \
         '\n' + \ @@ -1153,7 +1159,7 @@ def _mitm_warning_html(translate: {}) -> str: """Returns the html title for a reply to an unknown handle """ mitm_warning_str = translate['mitm'] - return ' ' + \
         mitm_warning_str + '\n' @@ -1168,7 +1174,7 @@ def _reply_with_unknown_path_html(translate: {}, replying_to_str = 'replying to' if translate.get(replying_to_str): replying_to_str = translate[replying_to_str] - return ' ' + replying_to_str + \
         '\n' + \ - '  \n \n' @@ -1712,7 +1719,7 @@ def individual_post_as_html(signing_priv_key_pem: str, # Show a DM icon for DMs in the inbox timeline if post_is_dm: title_str = \ - title_str + ' \n' # check if replying is permitted @@ -2434,8 +2441,8 @@ def html_emoji_reaction_picker(css_cache: {}, '?page=' + str(page_number) + '" title="' + \ translate['Switch to timeline view'] + '" alt="' + \ translate['Switch to timeline view'] + '">\n' - header_str += '\n' + \ '\n' diff --git a/webapp_profile.py b/webapp_profile.py index 62579c754..b5949c6b8 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -411,8 +411,8 @@ def _get_profile_header(base_dir: str, http_prefix: str, ' \n' + \ - ' \n' + ' \n' occupation_str = '' if occupation_name: @@ -517,8 +517,8 @@ def _get_profile_header_after_search(base_dir: str, ' \n' + \ - ' \n' + ' \n' if not display_name: display_name = search_nickname html_str += \ @@ -750,13 +750,13 @@ def html_profile(signing_priv_key_pem: str, if authorized: edit_profile_str = \ '' + \ - '| ' + translate['Edit'] + '\n' logout_str = \ '' + \ - '| ' + translate['Logout'] + \
             '\n' @@ -984,7 +984,7 @@ def html_profile(signing_priv_key_pem: str, license_str = \ '' + \ - '' + \
+        '<img loading=' @@ -1161,7 +1161,8 @@ def _html_profile_following(translate: {}, base_dir: str, http_prefix: str, '
    \n' + \ ' ' + \
                 translate['Page up'] + '\n' + \ @@ -1191,7 +1192,8 @@ def _html_profile_following(translate: {}, base_dir: str, http_prefix: str, '
    \n' + \ ' ' + \
                 translate['Page down'] + '\n' + \ @@ -2137,7 +2139,8 @@ def _html_edit_profile_top_banner(base_dir: str, """ edit_profile_form = \ '' + \ - '\n' edit_profile_form += \ @@ -2513,7 +2516,8 @@ def _individual_follow_as_html(signing_priv_key_pem: str, result_str += \ '\n' - result_str += '

     ' + result_str += '

     ' result_str += title_str + '' + buttons_str + '

    \n' result_str += '\n' return result_str diff --git a/webapp_search.py b/webapp_search.py index 5d543e733..1213593c3 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -98,7 +98,8 @@ def html_search_emoji(css_cache: {}, translate: {}, heading_shown = False emoji_form += '
    ' msg_str1 = translate['Copy the text then paste it into your post'] - msg_str2 = ':\n' shared_items_form += \ - ' ' + title_str + '\n' shared_items_form += '
    \n' @@ -410,7 +412,8 @@ def html_search(css_cache: {}, translate: {}, translate['Switch to timeline view'] + '" alt="' + \ translate['Switch to timeline view'] + '" ' + \ 'accesskey="' + timeline_key + '">\n' - follow_str += '\n' + \ '\n' @@ -579,7 +582,7 @@ def html_skills_search(actor: str, '' ctr += 1 @@ -790,7 +793,8 @@ def html_hashtag_search(css_cache: {}, hashtag_search_form += '' hashtag_search_form += \ 'RSS 2.0
    \n' # edit the category for this hashtag @@ -820,7 +824,8 @@ def html_hashtag_search(css_cache: {}, ' ' + translate['Page up'] + \
@@ -899,7 +904,8 @@ def html_hashtag_search(css_cache: {},
             '  <center>\n' + \
             '    <a href=' + translate['Page down'] + '' + \ '
    ' diff --git a/webapp_theme_designer.py b/webapp_theme_designer.py index 1a76843f2..7fb18299e 100644 --- a/webapp_theme_designer.py +++ b/webapp_theme_designer.py @@ -199,7 +199,7 @@ def html_theme_designer(css_cache: {}, base_dir: str, theme_form += \ '' + \ - '\n' diff --git a/webapp_timeline.py b/webapp_timeline.py index ccabb2f73..f5449072a 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -107,7 +107,8 @@ def _html_timeline_new_post(manually_approve_followers: bool, if not icons_as_buttons: new_post_button_str += \ '| ' + translate['Create a new DM'] + \
@@ -121,7 +122,7 @@ def _html_timeline_new_post(manually_approve_followers: bool,
         if not icons_as_buttons:
             new_post_button_str += \
                 '<a class=| ' + \
                 translate['Create a new post'] + \
@@ -135,7 +136,8 @@ def _html_timeline_new_post(manually_approve_followers: bool,
         if not icons_as_buttons:
             new_post_button_str += \
                 '<a class=' + \ + '| ' + \
                 translate['Create a new shared item'] + \
@@ -149,7 +151,8 @@ def _html_timeline_new_post(manually_approve_followers: bool,
         if not icons_as_buttons:
             new_post_button_str += \
                 '<a class=' + \ + '| ' + \
                 translate['Create a new wanted item'] + \
@@ -164,7 +167,8 @@ def _html_timeline_new_post(manually_approve_followers: bool,
             if not icons_as_buttons:
                 new_post_button_str += \
                     '<a class=' + \ + '| ' + \
                     translate['Create a new post'] + \
@@ -178,7 +182,8 @@ def _html_timeline_new_post(manually_approve_followers: bool,
             if not icons_as_buttons:
                 new_post_button_str += \
                     '<a class=' + \ + '| ' + translate['Create a new post'] + \
@@ -638,7 +643,7 @@ def html_timeline(css_cache: {}, default_timeline: str,
                         '<a href=' + \ - '' + \
                         translate['Approve follow requests'] + \
                         '\n' - tl_str += '\n' + \ '\n' @@ -850,7 +855,7 @@ def html_timeline(css_cache: {}, default_timeline: str, ' ' + \ - '' + \
             translate['Page up'] + '\n' + \ @@ -962,7 +967,7 @@ def html_timeline(css_cache: {}, default_timeline: str, ' ' + \ - '' + \
             translate['Page down'] + '\n' + \ @@ -999,7 +1004,8 @@ def html_individual_share(domain: str, share_id: str, if shared_item.get('imageUrl'): profile_str += '\n' profile_str += \ - '' + translate['Item image'] + '\n\n' profile_str += '

    ' + shared_item['summary'] + '

    \n

    ' if shared_item.get('itemQty'): @@ -1089,7 +1095,8 @@ def _html_shares_timeline(translate: {}, page_number: int, items_per_page: int, '

    \n' + \ ' ' + translate['Page up'] + '\n' + \ '
    \n' @@ -1129,7 +1136,8 @@ def _html_shares_timeline(translate: {}, page_number: int, items_per_page: int, '
    \n' + \ ' ' + translate['Page down'] + '\n' + \ '
    \n' diff --git a/webapp_utils.py b/webapp_utils.py index f4e38f80b..3c54bef59 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -136,13 +136,13 @@ def header_buttons_front_screen(translate: {}, header_str += \ ' ' + \ - '| ' + translate['Newswire'] + '\n' header_str += \ ' ' + \ - '| ' + translate['Links'] + '\n' else: @@ -1117,7 +1117,8 @@ def get_post_attachments_as_html(post_json_object: {}, box_name: str, if not is_muted: gallery_str += ' \n' gallery_str += \ - ' \n' gallery_str += ' \n' if post_json_object['object'].get('url'): @@ -1145,7 +1146,8 @@ def get_post_attachments_as_html(post_json_object: {}, box_name: str, attachment_str += '' attachment_str += \ - '' + image_description + '\n' attachment_ctr += 1 @@ -1492,7 +1494,8 @@ def html_search_result_share(base_dir: str, shared_item: {}, translate: {}, shared_items_form += \ '\n' shared_items_form += \ - 'Item image\n' shared_items_form += '

    ' + shared_item['summary'] + '

    \n

    ' if shared_item.get('itemQty'): @@ -1630,8 +1633,8 @@ def html_show_share(base_dir: str, domain: str, nickname: str, '

    \n' + \ '\n' - share_str += '\n' + \ '

    \n' share_str += \