Compare commits

..

No commits in common. "b8cc999ffd1efecd58cd4568e948296a9e9104eb" and "163f5cacab83f16830798a92441d60f1ff56a61e" have entirely different histories.

2 changed files with 4 additions and 12 deletions

View File

@ -52,5 +52,5 @@ if name:
filename = name.replace(" ", "_").lower() filename = name.replace(" ", "_").lower()
with open(f"{filename}.json", 'w') as f: with open(f"{filename}.json", 'w') as f:
f.write(json.dumps(recipe, indent=2)) f.write(json.dumps(recipe))

View File

@ -59,11 +59,9 @@ print("<!DOCTYPE html>")
print("<html lang='en'>") print("<html lang='en'>")
print(f"<head><title>{recipe_name}</title>") print(f"<head><title>{recipe_name}</title>")
print("<link rel='stylesheet' type='text/css' href='style.css'>") print("<link rel='stylesheet' type='text/css' href='style.css'>")
print("<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>")
print("</head>") print("</head>")
print("<body>") print("<body>")
print("<header>")
print("<div id='title'>") print("<div id='title'>")
print(f"<h1>{recipe_name}</h1>") print(f"<h1>{recipe_name}</h1>")
print("</div>") print("</div>")
@ -71,18 +69,13 @@ print("</div>")
print("<div id='description'>") print("<div id='description'>")
print(f"<p>{recipe_desc}</p>") print(f"<p>{recipe_desc}</p>")
print("</div>") print("</div>")
print("</header>")
print("<main>")
print("<div id='needs'>") print("<div id='needs'>")
print("<h2>Needs</h2>") print("<h2>Needs</h2>")
print("<ul>") print("<ul>")
for sub_recipe in sub_recipes: for sub_recipe in sub_recipes:
for ingredient in sub_recipe.leaves: for ingredient in sub_recipe.leaves:
if ingredient.description:
print(f" <li>{ingredient.name} -- {ingredient.description}</li>")
else:
print(f" <li>{ingredient.name}</li>") print(f" <li>{ingredient.name}</li>")
print("</ul>") print("</ul>")
@ -99,9 +92,8 @@ for sub_recipe in sub_recipes:
print("</ol>") print("</ol>")
print("</div>") print("</div>")
print("</main>")
print("<summary>") print("<div id='tables'>")
print("<h2>Tabular Layout</h2>") print("<h2>Tabular Layout</h2>")
for sub_recipe in sub_recipes: for sub_recipe in sub_recipes:
@ -124,7 +116,7 @@ for sub_recipe in sub_recipes:
print("</table>") print("</table>")
print("</p>") print("</p>")
print("</summary>") print("</div>")
print("</body>") print("</body>")
print("</html>") print("</html>")