import common
def html(entries, date):
list_of_entries = (
"
"
+ "".join(
("- " + common.link_to_entry(entry) + "
")
for entry in entries
if entries[entry]["date"].year == date.year
)
+ "
"
)
list_of_dates = (
"Years:
"
+ ""
+ "".join(
(
"- "
+ (
f"{year:%Y}"
if year.year == date.year
else f'{year:%Y}'
)
+ "
"
)
for year in common.years
)
+ "
"
+ "Months:
"
+ ""
+ "".join(
(
"- "
+ f'{month:%B}'
+ "
"
)
for month in common.months
if month.year == date.year
)
+ "
"
)
return common.print_html(
f"""
{common.head}
{common.title(f"{date:%Y}")}
{common.footer}
"""
)