mirror of https://gitlab.com/bashrc2/epicyon
Set profile background image
parent
bc8f080299
commit
0abfb4fafc
|
@ -404,8 +404,8 @@ def html_profile_after_search(recent_posts_cache: {}, max_recent_posts: int,
|
||||||
profile_str + html_footer()
|
profile_str + html_footer()
|
||||||
|
|
||||||
|
|
||||||
def _get_profile_header(http_prefix: str, nickname: str,
|
def _get_profile_header(base_dir: str, http_prefix: str, nickname: str,
|
||||||
domain_full: str, translate: {},
|
domain: str, domain_full: str, translate: {},
|
||||||
default_timeline: str,
|
default_timeline: str,
|
||||||
display_name: str,
|
display_name: str,
|
||||||
profile_description_short: str,
|
profile_description_short: str,
|
||||||
|
@ -419,6 +419,8 @@ def _get_profile_header(http_prefix: str, nickname: str,
|
||||||
"""The header of the profile screen, containing background
|
"""The header of the profile screen, containing background
|
||||||
image and avatar
|
image and avatar
|
||||||
"""
|
"""
|
||||||
|
banner_file, _ = \
|
||||||
|
get_banner_file(base_dir, nickname, domain, theme)
|
||||||
html_str = \
|
html_str = \
|
||||||
'\n\n <figure class="profileHeader">\n' + \
|
'\n\n <figure class="profileHeader">\n' + \
|
||||||
' <a href="/users/' + \
|
' <a href="/users/' + \
|
||||||
|
@ -427,7 +429,7 @@ def _get_profile_header(http_prefix: str, nickname: str,
|
||||||
'accesskey="' + access_keys['menuTimeline'] + '">\n' + \
|
'accesskey="' + access_keys['menuTimeline'] + '">\n' + \
|
||||||
' <img class="profileBackground" ' + \
|
' <img class="profileBackground" ' + \
|
||||||
'alt="" ' + \
|
'alt="" ' + \
|
||||||
'src="/users/' + nickname + '/image_' + theme + '.png" /></a>\n' + \
|
'src="/users/' + nickname + '/' + banner_file + '" /></a>\n' + \
|
||||||
' <figcaption>\n' + \
|
' <figcaption>\n' + \
|
||||||
' <a href="/users/' + \
|
' <a href="/users/' + \
|
||||||
nickname + '/' + default_timeline + '" title="' + \
|
nickname + '/' + default_timeline + '" title="' + \
|
||||||
|
@ -904,9 +906,9 @@ def html_profile(signing_priv_key_pem: str,
|
||||||
pinned_content = pin_file.read()
|
pinned_content = pin_file.read()
|
||||||
|
|
||||||
profile_header_str = \
|
profile_header_str = \
|
||||||
_get_profile_header(http_prefix,
|
_get_profile_header(base_dir, http_prefix,
|
||||||
nickname,
|
nickname,
|
||||||
domain_full, translate,
|
domain, domain_full, translate,
|
||||||
default_timeline, display_name,
|
default_timeline, display_name,
|
||||||
profile_description_short,
|
profile_description_short,
|
||||||
login_button, avatar_url, theme,
|
login_button, avatar_url, theme,
|
||||||
|
|
Loading…
Reference in New Issue