mirror of https://gitlab.com/bashrc2/epicyon
Show page numbers on following lists
parent
5373c377aa
commit
a50f9c8b75
|
@ -74,6 +74,7 @@ from webapp_utils import end_edit_section
|
||||||
from blog import get_blog_address
|
from blog import get_blog_address
|
||||||
from webapp_post import individual_post_as_html
|
from webapp_post import individual_post_as_html
|
||||||
from webapp_timeline import html_individual_share
|
from webapp_timeline import html_individual_share
|
||||||
|
from webapp_timeline import page_number_buttons
|
||||||
from blocking import get_cw_list_variable
|
from blocking import get_cw_list_variable
|
||||||
from blocking import is_blocked
|
from blocking import is_blocked
|
||||||
from content import bold_reading_string
|
from content import bold_reading_string
|
||||||
|
@ -1223,6 +1224,10 @@ def _html_profile_following(translate: {}, base_dir: str, http_prefix: str,
|
||||||
translate['Page down'] + '" alt="' + \
|
translate['Page down'] + '" alt="' + \
|
||||||
translate['Page down'] + '"></a>\n' + \
|
translate['Page down'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
# list of page numbers
|
||||||
|
profile_str += \
|
||||||
|
page_number_buttons(actor, feed_name, page_number,
|
||||||
|
'buttonheader')
|
||||||
|
|
||||||
return profile_str
|
return profile_str
|
||||||
|
|
||||||
|
|
|
@ -428,8 +428,8 @@ def _html_timeline_end(base_dir: str, nickname: str, domain_full: str,
|
||||||
return tl_str
|
return tl_str
|
||||||
|
|
||||||
|
|
||||||
def _page_number_buttons(users_path: str, box_name: str,
|
def page_number_buttons(users_path: str, box_name: str,
|
||||||
page_number: int) -> str:
|
page_number: int, header: str) -> str:
|
||||||
"""Shows selactable page numbers at the bottom of the screen
|
"""Shows selactable page numbers at the bottom of the screen
|
||||||
"""
|
"""
|
||||||
pages_width = 3
|
pages_width = 3
|
||||||
|
@ -451,7 +451,7 @@ def _page_number_buttons(users_path: str, box_name: str,
|
||||||
curr_page_str = 'Current Page, '
|
curr_page_str = 'Current Page, '
|
||||||
num_str += \
|
num_str += \
|
||||||
'<a href="' + users_path + '/' + box_name + '?page=' + \
|
'<a href="' + users_path + '/' + box_name + '?page=' + \
|
||||||
str(page) + '#timelineposts" class="pageslist" ' + \
|
str(page) + '#' + header + '" class="pageslist" ' + \
|
||||||
'aria-label="' + curr_page_str + 'Page ' + str(page) + \
|
'aria-label="' + curr_page_str + 'Page ' + str(page) + \
|
||||||
'"' + aria_page_str + ' tabindex="11">' + page_str + '</a>'
|
'"' + aria_page_str + ' tabindex="11">' + page_str + '</a>'
|
||||||
return '<center>\n' + \
|
return '<center>\n' + \
|
||||||
|
@ -908,7 +908,8 @@ def html_timeline(css_cache: {}, default_timeline: str,
|
||||||
if page_number > 1:
|
if page_number > 1:
|
||||||
tl_str += text_mode_separator
|
tl_str += text_mode_separator
|
||||||
tl_str += '<br>' + \
|
tl_str += '<br>' + \
|
||||||
_page_number_buttons(users_path, box_name, page_number)
|
page_number_buttons(users_path, box_name, page_number,
|
||||||
|
'timelineposts')
|
||||||
tl_str += \
|
tl_str += \
|
||||||
' <center>\n' + \
|
' <center>\n' + \
|
||||||
' <a href="' + users_path + '/' + box_name + \
|
' <a href="' + users_path + '/' + box_name + \
|
||||||
|
@ -1033,7 +1034,8 @@ def html_timeline(css_cache: {}, default_timeline: str,
|
||||||
translate['Page down'] + '" alt="' + \
|
translate['Page down'] + '" alt="' + \
|
||||||
translate['Page down'] + '"></a>\n' + \
|
translate['Page down'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
tl_str += _page_number_buttons(users_path, box_name, page_number)
|
tl_str += page_number_buttons(users_path, box_name, page_number,
|
||||||
|
'timelineposts')
|
||||||
tl_str += '<br>'
|
tl_str += '<br>'
|
||||||
tl_str += text_mode_separator
|
tl_str += text_mode_separator
|
||||||
elif item_ctr == 0:
|
elif item_ctr == 0:
|
||||||
|
@ -1152,7 +1154,8 @@ def _html_shares_timeline(translate: {}, page_number: int, items_per_page: int,
|
||||||
|
|
||||||
if page_number > 1:
|
if page_number > 1:
|
||||||
timeline_str += '<br>' + \
|
timeline_str += '<br>' + \
|
||||||
_page_number_buttons(actor, 'tl' + shares_file_type, page_number)
|
page_number_buttons(actor, 'tl' + shares_file_type, page_number,
|
||||||
|
'timelineposts')
|
||||||
timeline_str += \
|
timeline_str += \
|
||||||
' <center>\n' + \
|
' <center>\n' + \
|
||||||
' <a href="' + actor + '/tl' + shares_file_type + '?page=' + \
|
' <a href="' + actor + '/tl' + shares_file_type + '?page=' + \
|
||||||
|
@ -1207,7 +1210,8 @@ def _html_shares_timeline(translate: {}, page_number: int, items_per_page: int,
|
||||||
'" alt="' + translate['Page down'] + '"></a>\n' + \
|
'" alt="' + translate['Page down'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
timeline_str += \
|
timeline_str += \
|
||||||
_page_number_buttons(actor, 'tl' + shares_file_type, page_number)
|
page_number_buttons(actor, 'tl' + shares_file_type, page_number,
|
||||||
|
'timelineposts')
|
||||||
timeline_str += '<br>'
|
timeline_str += '<br>'
|
||||||
|
|
||||||
return timeline_str
|
return timeline_str
|
||||||
|
|
Loading…
Reference in New Issue