From 60c3e4fdbfe2cf9579dcf68f64ba92ff25cb0ff0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 2 May 2022 11:21:57 +0100 Subject: [PATCH] Semantic markup for posts --- webapp_post.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index 4716c3a11..4e989b8c6 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -1025,7 +1025,9 @@ def _announce_with_display_name_html(translate: {}, 'icons/repeat_inactive.png" ' + \ 'class="announceOrReply"/>\n' + \ ' ' + announce_display_name + '\n' + 'class="announceOrReply">' + \ + '\n' def _get_post_title_announce_html(base_dir: str, @@ -1210,7 +1212,8 @@ def _get_reply_html(translate: {}, 'class="announceOrReply"/>\n' + \ ' ' + \ - reply_display_name + '\n' + '' + \ + reply_display_name + '\n' def _get_post_title_reply_html(base_dir: str, @@ -1419,11 +1422,13 @@ def _get_footer_with_icons(show_icons: bool, footer_str += delete_str + mute_str + edit_str if not is_news_post(post_json_object): footer_str += ' ' + published_str + '\n' + time_class + '">' + \ + published_str + '\n' else: footer_str += ' ' + published_str + '\n' + '" class="' + time_class + '">' + \ + published_str + '\n' footer_str += ' \n' footer_str += ' \n' return footer_str @@ -1718,7 +1723,9 @@ def individual_post_as_html(signing_priv_key_pem: str, ' ' + display_name + '\n' + '">' + \ + '' + display_name + '' + \ + '\n' else: if not message_id: # pprint(post_json_object) @@ -1729,11 +1736,12 @@ def individual_post_as_html(signing_priv_key_pem: str, if not actor_domain: # pprint(post_json_object) print('ERROR: no actor_domain') + actor_handle = actor_nickname + '@' + actor_domain title_str += \ ' @' + actor_nickname + '@' + actor_domain + '\n' + '">@' + actor_handle + '\n' # benchmark 9 _log_post_timing(enable_timing_log, post_start_time, '9') @@ -2137,7 +2145,9 @@ def individual_post_as_html(signing_priv_key_pem: str, box_name, page_number) if post_is_sensitive and reaction_str: reaction_str = '
' + reaction_str - post_html = '
\n' post_html += avatar_image_in_post post_html += '
\n' + \