From 430bfc2c4629be07c9900daee1a9a200ddf948b0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 12 Aug 2024 20:40:16 +0100 Subject: [PATCH] Include youtube, peertube and pixelfed links on profile after search --- webapp_profile.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index 0d2582216..8a82ab136 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -329,6 +329,9 @@ def html_profile_after_search(authorized: bool, display_name += '🔒' pronouns = get_pronouns(profile_json) + youtube = get_youtube(profile_json) + peertube = get_peertube(profile_json) + pixelfed = get_pixelfed(profile_json) moved_to = '' if profile_json.get('movedTo'): @@ -452,7 +455,8 @@ def html_profile_after_search(authorized: bool, send_blocks_str, authorized, person_url, no_of_books, - birth_date) + birth_date, + youtube, peertube, pixelfed) domain_full = get_full_domain(domain, port) @@ -819,7 +823,10 @@ def _get_profile_header_after_search(base_dir: str, authorized: bool, person_url: str, no_of_books: str, - birth_date: str) -> str: + birth_date: str, + youtube: str, + peertube: str, + pixelfed: str) -> str: """The header of a searched for handle, containing background image and avatar """ @@ -932,6 +939,15 @@ def _get_profile_header_after_search(base_dir: str, if website_url: html_str += '

🌐 ' + \ website_url + '

\n' + if youtube: + html_str += '

YouTube: ' + \ + youtube + '

\n' + if peertube: + html_str += '

PeerTube: ' + \ + peertube + '

\n' + if pixelfed: + html_str += '

Pixelfed: ' + \ + pixelfed + '

\n' if repo_url: html_str += '

💻 ' + \ repo_url + '

\n'