added showcase, credits, and fixed hover bug

This commit is contained in:
2024-06-20 17:51:58 +01:00
parent 8b16166e6c
commit 67bf94c851
21 changed files with 555 additions and 127 deletions

View File

@@ -48,14 +48,13 @@ class Website:
filename = page.get_filename()
html_content = page.get_content()
html_output = template.render(
title=metadata['title'],
year=metadata['year'],
date=metadata['date'],
tags=metadata.get('tags', []),
image=metadata['image'],
showcase=metadata['showcase'],
credits=metadata['credits'],
references=page.get_references(),
title=metadata.get('title', ''),
year=metadata.get('year', ''), # Assuming year is a string
date=metadata.get('date', ''), # Assuming date is a string
tags=metadata.get('tags', []),
image=metadata.get('image', ''), # Assuming image is a string
showcase=metadata.get('showcase', []),
credits=metadata.get('credits', []), # Assuming credits is a string
content=html_content)
with open(os.path.join(self.output_dir_root, filename), 'w', encoding='utf8') as output_file:
output_file.write(html_output)
@@ -105,6 +104,7 @@ class Website:
def format_content(self, content):
# convert all (link)(src) to <a> tags
content = re.sub(r'\(([^)]+)\)\[([^\]]+)\]', r'<a href="\2">\1</a>', content)
# convert all video links to embedded code
return content
def fetch_all_images(self):