Semantic markup for month and day

main
Bob Mottram 2022-05-23 17:11:35 +01:00
parent 863a92ece9
commit cd650026fb
1 changed files with 8 additions and 3 deletions

View File

@ -133,9 +133,11 @@ def _html_calendar_day(person_cache: {}, css_cache: {}, translate: {},
calendar_str += \
' <a href="' + cal_actor + '/calendar?year=' + str(year) + \
'?month=' + str(month_number) + '">\n'
datetime_str = str(year) + '-' + str(month_number) + '-' + str(day_number)
calendar_str += \
' <h1>' + str(day_number) + ' ' + month_name + \
'</h1></a><br><span class="year">' + str(year) + '</span>\n'
' <h1><time datetime="' + datetime_str + '">' + \
str(day_number) + ' ' + month_name + \
'</time></h1></a><br><span class="year">' + str(year) + '</span>\n'
calendar_str += '</caption>\n'
calendar_str += '<tbody>\n'
@ -436,7 +438,10 @@ def html_calendar(person_cache: {}, css_cache: {}, translate: {},
calendar_str += ' <a href="' + cal_actor + '/inbox" title="'
calendar_str += translate['Switch to timeline view'] + '" ' + \
'accesskey="' + access_keys['menuTimeline'] + '">'
calendar_str += ' <h1>' + month_name + '</h1></a>\n'
calendar_str += \
' <h1><time datetime="' + \
str(year) + '-' + str(month_number) + '">' + month_name + \
'</time></h1></a>\n'
calendar_str += \
' <a href="' + cal_actor + '/calendar?year=' + str(next_year) + \
'?month=' + str(next_month_number) + '" ' + \