mirror of https://gitlab.com/bashrc2/epicyon
Reverse order of header icons
parent
2ba2bacf3b
commit
ac27d36b78
|
@ -37,6 +37,7 @@ def header_buttons_timeline(default_timeline: str,
|
||||||
bookmarks_button_str: str,
|
bookmarks_button_str: str,
|
||||||
events_button_str: str,
|
events_button_str: str,
|
||||||
moderation_button_str: str,
|
moderation_button_str: str,
|
||||||
|
header_icons_str: str,
|
||||||
new_post_button_str: str,
|
new_post_button_str: str,
|
||||||
base_dir: str,
|
base_dir: str,
|
||||||
nickname: str, domain: str,
|
nickname: str, domain: str,
|
||||||
|
@ -266,39 +267,65 @@ def header_buttons_timeline(default_timeline: str,
|
||||||
tl_str += \
|
tl_str += \
|
||||||
shares_button_str + wanted_button_str + \
|
shares_button_str + wanted_button_str + \
|
||||||
bookmarks_button_str + events_button_str + \
|
bookmarks_button_str + events_button_str + \
|
||||||
moderation_button_str + happening_str + new_post_button_str
|
moderation_button_str + happening_str
|
||||||
else:
|
else:
|
||||||
tl_str += happening_str
|
tl_str += happening_str
|
||||||
|
|
||||||
|
# start of headericons div
|
||||||
if not is_text_browser:
|
if not is_text_browser:
|
||||||
if not features_header:
|
if not features_header:
|
||||||
if not icons_as_buttons:
|
tl_str += header_icons_str
|
||||||
# the search icon
|
|
||||||
|
# 1. follow request icon
|
||||||
|
if not features_header:
|
||||||
|
tl_str += follow_approvals
|
||||||
|
|
||||||
|
# 2. edit profile on features header
|
||||||
|
if features_header:
|
||||||
tl_str += \
|
tl_str += \
|
||||||
'<a class="imageAnchor" href="' + users_path + \
|
'<a href="' + users_path + '/editprofile" tabindex="2">' + \
|
||||||
'/search" accesskey="' + access_keys['menuSearch'] + \
|
'<button class="buttonDesktop">' + \
|
||||||
'" tabindex="3">' + \
|
'<span>' + translate['Settings'] + '</span></button></a>'
|
||||||
'<img loading="lazy" decoding="async" src="/' + \
|
|
||||||
'icons/search.png" title="' + \
|
# 3. the newswire and links button to show right column links
|
||||||
translate['Search and follow'] + '" alt="| ' + \
|
if not is_text_browser:
|
||||||
translate['Search and follow'] + \
|
# the links button to show left column links
|
||||||
|
if not icons_as_buttons:
|
||||||
|
tl_str += \
|
||||||
|
'<a class="imageAnchorMobile" href="' + \
|
||||||
|
users_path + '/linksmobile">' + \
|
||||||
|
'<img loading="lazy" decoding="async" src="/icons' + \
|
||||||
|
'/links.png" title="' + translate['Edit Links'] + \
|
||||||
|
'" alt="| ' + translate['Edit Links'] + \
|
||||||
'" class="timelineicon"/></a>'
|
'" class="timelineicon"/></a>'
|
||||||
else:
|
else:
|
||||||
# the search button
|
# NOTE: deliberately no \n at end of line
|
||||||
tl_str += \
|
tl_str += \
|
||||||
'<a href="' + users_path + \
|
'<a href="' + \
|
||||||
'/search" tabindex="3">' + \
|
users_path + '/linksmobile' + \
|
||||||
'<button class="button" ' + \
|
'" tabindex="2"><button class="buttonMobile">' + \
|
||||||
'accesskey="' + access_keys['menuSearch'] + '>' + \
|
'<span>' + translate['Links'] + \
|
||||||
'<span>' + translate['Search'] + \
|
|
||||||
'</span></button></a>'
|
'</span></button></a>'
|
||||||
|
|
||||||
# benchmark 5
|
# the newswire button to show left column links
|
||||||
time_diff = int((time.time() - timeline_start_time) * 1000)
|
if not icons_as_buttons:
|
||||||
if time_diff > 100:
|
tl_str += \
|
||||||
print('TIMELINE TIMING ' + box_name + ' 5 = ' + str(time_diff))
|
'<a class="imageAnchorMobile" href="' + \
|
||||||
|
users_path + '/newswiremobile">' + \
|
||||||
|
'<img loading="lazy" decoding="async" src="/icons' + \
|
||||||
|
'/newswire.png" title="' + translate['News'] + \
|
||||||
|
'" alt="| ' + translate['News'] + \
|
||||||
|
'" class="timelineicon"/></a>'
|
||||||
|
else:
|
||||||
|
# NOTE: deliberately no \n at end of line
|
||||||
|
tl_str += \
|
||||||
|
'<a href="' + \
|
||||||
|
users_path + '/newswiremobile' + \
|
||||||
|
'" tabindex="2"><button class="buttonMobile">' + \
|
||||||
|
'<span>' + translate['Newswire'] + \
|
||||||
|
'</span></button></a>'
|
||||||
|
|
||||||
# the calendar button
|
# 4. the calendar button
|
||||||
if not is_text_browser:
|
if not is_text_browser:
|
||||||
if not features_header:
|
if not features_header:
|
||||||
calendar_alt_text = translate['Calendar']
|
calendar_alt_text = translate['Calendar']
|
||||||
|
@ -374,54 +401,42 @@ def header_buttons_timeline(default_timeline: str,
|
||||||
'><button class="button">' + \
|
'><button class="button">' + \
|
||||||
'<span>' + translate['User'] + '</span></button></a>'
|
'<span>' + translate['User'] + '</span></button></a>'
|
||||||
|
|
||||||
|
# 5. search button
|
||||||
if not is_text_browser:
|
if not is_text_browser:
|
||||||
# the newswire button to show right column links
|
|
||||||
if not icons_as_buttons:
|
|
||||||
tl_str += \
|
|
||||||
'<a class="imageAnchorMobile" href="' + \
|
|
||||||
users_path + '/newswiremobile">' + \
|
|
||||||
'<img loading="lazy" decoding="async" src="/icons' + \
|
|
||||||
'/newswire.png" title="' + translate['News'] + \
|
|
||||||
'" alt="| ' + translate['News'] + \
|
|
||||||
'" class="timelineicon"/></a>'
|
|
||||||
else:
|
|
||||||
# NOTE: deliberately no \n at end of line
|
|
||||||
tl_str += \
|
|
||||||
'<a href="' + \
|
|
||||||
users_path + '/newswiremobile' + \
|
|
||||||
'" tabindex="2"><button class="buttonMobile">' + \
|
|
||||||
'<span>' + translate['Newswire'] + \
|
|
||||||
'</span></button></a>'
|
|
||||||
|
|
||||||
# the links button to show left column links
|
|
||||||
if not icons_as_buttons:
|
|
||||||
tl_str += \
|
|
||||||
'<a class="imageAnchorMobile" href="' + \
|
|
||||||
users_path + '/linksmobile">' + \
|
|
||||||
'<img loading="lazy" decoding="async" src="/icons' + \
|
|
||||||
'/links.png" title="' + translate['Edit Links'] + \
|
|
||||||
'" alt="| ' + translate['Edit Links'] + \
|
|
||||||
'" class="timelineicon"/></a>'
|
|
||||||
else:
|
|
||||||
# NOTE: deliberately no \n at end of line
|
|
||||||
tl_str += \
|
|
||||||
'<a href="' + \
|
|
||||||
users_path + '/linksmobile' + \
|
|
||||||
'" tabindex="2"><button class="buttonMobile">' + \
|
|
||||||
'<span>' + translate['Links'] + \
|
|
||||||
'</span></button></a>'
|
|
||||||
|
|
||||||
if features_header:
|
|
||||||
tl_str += \
|
|
||||||
'<a href="' + users_path + '/editprofile" tabindex="2">' + \
|
|
||||||
'<button class="buttonDesktop">' + \
|
|
||||||
'<span>' + translate['Settings'] + '</span></button></a>'
|
|
||||||
|
|
||||||
if not features_header:
|
if not features_header:
|
||||||
tl_str += follow_approvals
|
|
||||||
|
|
||||||
if not icons_as_buttons:
|
if not icons_as_buttons:
|
||||||
|
# the search icon
|
||||||
|
tl_str += \
|
||||||
|
'<a class="imageAnchor" href="' + users_path + \
|
||||||
|
'/search" accesskey="' + access_keys['menuSearch'] + \
|
||||||
|
'" tabindex="3">' + \
|
||||||
|
'<img loading="lazy" decoding="async" src="/' + \
|
||||||
|
'icons/search.png" title="' + \
|
||||||
|
translate['Search and follow'] + '" alt="| ' + \
|
||||||
|
translate['Search and follow'] + \
|
||||||
|
'" class="timelineicon"/></a>'
|
||||||
|
else:
|
||||||
|
# the search button
|
||||||
|
tl_str += \
|
||||||
|
'<a href="' + users_path + \
|
||||||
|
'/search" tabindex="3">' + \
|
||||||
|
'<button class="button" ' + \
|
||||||
|
'accesskey="' + access_keys['menuSearch'] + '>' + \
|
||||||
|
'<span>' + translate['Search'] + \
|
||||||
|
'</span></button></a>'
|
||||||
|
|
||||||
|
# 6. new post
|
||||||
|
if not is_text_browser:
|
||||||
|
if not features_header:
|
||||||
|
tl_str += new_post_button_str
|
||||||
|
|
||||||
|
# benchmark 5
|
||||||
|
time_diff = int((time.time() - timeline_start_time) * 1000)
|
||||||
|
if time_diff > 100:
|
||||||
|
print('TIMELINE TIMING ' + box_name + ' 5 = ' + str(time_diff))
|
||||||
|
|
||||||
# end of headericons div
|
# end of headericons div
|
||||||
|
if not icons_as_buttons:
|
||||||
tl_str += '</div>'
|
tl_str += '</div>'
|
||||||
|
|
||||||
# end of the button header with inbox, outbox, etc
|
# end of the button header with inbox, outbox, etc
|
||||||
|
|
|
@ -770,14 +770,14 @@ def html_timeline(default_timeline: str,
|
||||||
if default_timeline == 'tlfeatures' and box_name == 'tlfeatures':
|
if default_timeline == 'tlfeatures' and box_name == 'tlfeatures':
|
||||||
news_header = True
|
news_header = True
|
||||||
|
|
||||||
new_post_button_str = ''
|
header_icons_str = ''
|
||||||
# start of headericons div
|
# start of headericons div
|
||||||
if not news_header:
|
if not news_header:
|
||||||
if not icons_as_buttons:
|
if not icons_as_buttons:
|
||||||
new_post_button_str += '<div class="headericons">'
|
header_icons_str = '<div class="headericons">'
|
||||||
|
|
||||||
# what screen to go to when a new post is created
|
# what screen to go to when a new post is created
|
||||||
new_post_button_str += \
|
new_post_button_str = \
|
||||||
_html_timeline_new_post(manually_approve_followers, box_name,
|
_html_timeline_new_post(manually_approve_followers, box_name,
|
||||||
icons_as_buttons, users_path, translate,
|
icons_as_buttons, users_path, translate,
|
||||||
access_keys)
|
access_keys)
|
||||||
|
@ -815,6 +815,7 @@ def html_timeline(default_timeline: str,
|
||||||
shares_button_str, wanted_button_str,
|
shares_button_str, wanted_button_str,
|
||||||
bookmarks_button_str,
|
bookmarks_button_str,
|
||||||
events_button_str, moderation_button_str,
|
events_button_str, moderation_button_str,
|
||||||
|
header_icons_str,
|
||||||
new_post_button_str, base_dir, nickname,
|
new_post_button_str, base_dir, nickname,
|
||||||
domain, timeline_start_time,
|
domain, timeline_start_time,
|
||||||
new_calendar_event, calendar_path,
|
new_calendar_event, calendar_path,
|
||||||
|
@ -867,6 +868,7 @@ def html_timeline(default_timeline: str,
|
||||||
shares_button_str, wanted_button_str,
|
shares_button_str, wanted_button_str,
|
||||||
bookmarks_button_str,
|
bookmarks_button_str,
|
||||||
events_button_str, moderation_button_str,
|
events_button_str, moderation_button_str,
|
||||||
|
header_icons_str,
|
||||||
new_post_button_str, base_dir, nickname,
|
new_post_button_str, base_dir, nickname,
|
||||||
domain, timeline_start_time,
|
domain, timeline_start_time,
|
||||||
new_calendar_event, calendar_path,
|
new_calendar_event, calendar_path,
|
||||||
|
|
Loading…
Reference in New Issue