Include youtube, peertube and pixelfed links on profile after search

main
Bob Mottram 2024-08-12 20:40:16 +01:00
parent 4893a7f0c6
commit 430bfc2c46
1 changed files with 18 additions and 2 deletions

View File

@ -329,6 +329,9 @@ def html_profile_after_search(authorized: bool,
display_name += '🔒' display_name += '🔒'
pronouns = get_pronouns(profile_json) pronouns = get_pronouns(profile_json)
youtube = get_youtube(profile_json)
peertube = get_peertube(profile_json)
pixelfed = get_pixelfed(profile_json)
moved_to = '' moved_to = ''
if profile_json.get('movedTo'): if profile_json.get('movedTo'):
@ -452,7 +455,8 @@ def html_profile_after_search(authorized: bool,
send_blocks_str, send_blocks_str,
authorized, authorized,
person_url, no_of_books, person_url, no_of_books,
birth_date) birth_date,
youtube, peertube, pixelfed)
domain_full = get_full_domain(domain, port) domain_full = get_full_domain(domain, port)
@ -819,7 +823,10 @@ def _get_profile_header_after_search(base_dir: str,
authorized: bool, authorized: bool,
person_url: str, person_url: str,
no_of_books: 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 """The header of a searched for handle, containing background
image and avatar image and avatar
""" """
@ -932,6 +939,15 @@ def _get_profile_header_after_search(base_dir: str,
if website_url: if website_url:
html_str += ' <p>🌐 <a href="' + website_url + '">' + \ html_str += ' <p>🌐 <a href="' + website_url + '">' + \
website_url + '</a></p>\n' website_url + '</a></p>\n'
if youtube:
html_str += ' <p>YouTube: <a href="' + youtube + '">' + \
youtube + '</a></p>\n'
if peertube:
html_str += ' <p>PeerTube: <a href="' + peertube + '">' + \
peertube + '</a></p>\n'
if pixelfed:
html_str += ' <p>Pixelfed: <a href="' + pixelfed + '">' + \
pixelfed + '</a></p>\n'
if repo_url: if repo_url:
html_str += ' <p>💻 <a href="' + repo_url + '">' + \ html_str += ' <p>💻 <a href="' + repo_url + '">' + \
repo_url + '</a></p>\n' repo_url + '</a></p>\n'