Improve output HTML tags for styling.
This commit is contained in:
parent
dc86a9235e
commit
b8cc999ffd
@ -59,9 +59,11 @@ print("<!DOCTYPE html>")
|
||||
print("<html lang='en'>")
|
||||
print(f"<head><title>{recipe_name}</title>")
|
||||
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("<body>")
|
||||
|
||||
print("<header>")
|
||||
print("<div id='title'>")
|
||||
print(f"<h1>{recipe_name}</h1>")
|
||||
print("</div>")
|
||||
@ -69,14 +71,19 @@ print("</div>")
|
||||
print("<div id='description'>")
|
||||
print(f"<p>{recipe_desc}</p>")
|
||||
print("</div>")
|
||||
print("</header>")
|
||||
|
||||
print("<main>")
|
||||
print("<div id='needs'>")
|
||||
print("<h2>Needs</h2>")
|
||||
print("<ul>")
|
||||
|
||||
for sub_recipe in sub_recipes:
|
||||
for ingredient in sub_recipe.leaves:
|
||||
print(f" <li>{ingredient.name}</li>")
|
||||
if ingredient.description:
|
||||
print(f" <li>{ingredient.name} -- {ingredient.description}</li>")
|
||||
else:
|
||||
print(f" <li>{ingredient.name}</li>")
|
||||
|
||||
print("</ul>")
|
||||
print("</div>")
|
||||
@ -92,8 +99,9 @@ for sub_recipe in sub_recipes:
|
||||
|
||||
print("</ol>")
|
||||
print("</div>")
|
||||
print("</main>")
|
||||
|
||||
print("<div id='tables'>")
|
||||
print("<summary>")
|
||||
print("<h2>Tabular Layout</h2>")
|
||||
|
||||
for sub_recipe in sub_recipes:
|
||||
@ -116,7 +124,7 @@ for sub_recipe in sub_recipes:
|
||||
print("</table>")
|
||||
print("</p>")
|
||||
|
||||
print("</div>")
|
||||
print("</summary>")
|
||||
|
||||
print("</body>")
|
||||
print("</html>")
|
||||
|
Loading…
x
Reference in New Issue
Block a user