Page number icons

main
Bob Mottram 2022-07-04 11:29:54 +01:00
parent e624d00cd9
commit dcf300cf0d
2 changed files with 13 additions and 5 deletions

View File

@ -120,7 +120,7 @@ def html_watch_points_graph(base_dir: str, fitness: {}, fitness_id: str,
return html_str
def fitness_thread(base_dir: str, fitness: {}):
def fitness_thread(base_dir: str, fitness: {}) -> None:
"""Thread used to save fitness function scores
"""
fitness_filename = base_dir + '/accounts/fitness.json'

View File

@ -432,6 +432,14 @@ def _page_number_buttons(users_path: str, box_name: str,
page_number: int) -> str:
"""Shows selactable page numbers at the bottom of the screen
"""
page_number_chars_highlighted = (
'', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', ''
)
page_number_chars = (
'', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', ''
)
pages_width = 3
min_page_number = page_number - pages_width
min_page_number = max(min_page_number, 1)
@ -443,13 +451,13 @@ def _page_number_buttons(users_path: str, box_name: str,
'<label class="pageslistDash">────</label>'
num_str += html_hide_from_screen_reader(separator_str)
aria_page_str = ''
page_str = ' ' + str(page) + ' '
page_str = ' ' + page_number_chars[page] + ' '
curr_page_str = ''
if page == page_number:
page_str = \
html_hide_from_screen_reader('[<mark>') + \
str(page) + \
html_hide_from_screen_reader('</mark>]')
html_hide_from_screen_reader('<mark>') + \
page_number_chars_highlighted[page] + \
html_hide_from_screen_reader('</mark>')
aria_page_str = ' aria-current="true"'
curr_page_str = 'Current Page, '
num_str += \