Deployed new layout, Added second page, Added meta information, Compressed images and cleaned folders, Added imprint and privacy links, Changed screenshot and README

This commit is contained in:
2021-05-18 17:24:11 +02:00
parent c6aa110b19
commit e81d6c98c9
41 changed files with 243 additions and 75 deletions

View File

@@ -14,6 +14,7 @@ content_folder = os.path.join(__location__, 'content')
output_folder = os.path.join(__location__, 'dist')
config_file = sys.argv[1]
output_file = sys.argv[2]
yaml = YAML(typ='safe')
@@ -28,18 +29,26 @@ template_item_text = codecs.open(os.path.join(content_folder, 'item.tmpl.html'),
encoding='utf-8').read()
template_item = Template(template_item_text)
items = ''
navigation_item_text = codecs.open(os.path.join(content_folder, 'navigation.tmpl.html'), 'r',
encoding='utf-8').read()
navigation_item = Template(navigation_item_text)
for config_item in config['items']:
items += template_item.substitute(config_item)
items = ''
navigation = ''
for config_item_1 in config['items']:
items += template_item.substitute(config_item_1)
for config_item_2 in config['navigation']:
navigation += navigation_item.substitute(config_item_2)
template_page_text = codecs.open(os.path.join(content_folder, 'index.tmpl.html'), 'r', encoding='utf-8').read()
template_page = Template(template_page_text)
outcome = template_page.substitute(items=items)
outcome = template_page.substitute(items=items, nav=navigation)
os.makedirs(output_folder, exist_ok=True)
outfile_index = os.path.join(output_folder, 'index.html')
outfile_index = os.path.join(output_folder, output_file)
copy_tree(static_folder, output_folder)