diff --git a/public/illustrations/french-tartiflette.png b/public/illustrations/french-tartiflette.png new file mode 100644 index 0000000..01b88f2 Binary files /dev/null and b/public/illustrations/french-tartiflette.png differ diff --git a/recipe_compiler/parse.py b/recipe_compiler/parse.py index 6e80071..3c787f6 100644 --- a/recipe_compiler/parse.py +++ b/recipe_compiler/parse.py @@ -128,6 +128,11 @@ def parse_to_recipe(content: str) -> Recipe: cover_img = recipe_metadata["cover_img"] if "cover_img" in recipe_metadata else (category.value.lower() + ".png") # print(recipe_name, cover_img) + style_block = None + css_html_background = recipe_metadata["css_html_background"] if "css_html_background" in recipe_metadata else None + if css_html_background: + style_block = f"" + return Recipe( name=recipe_metadata["name"], residence=recipe_metadata["residence"], @@ -137,4 +142,5 @@ def parse_to_recipe(content: str) -> Recipe: quote=recipe_metadata["quote"] if "quote" in recipe_metadata else "", ingredients="\n".join(ingredients), instructions="\n".join(instructions), + style_block=style_block ) diff --git a/recipe_compiler/recipe.py b/recipe_compiler/recipe.py index c342f7a..be5acb5 100644 --- a/recipe_compiler/recipe.py +++ b/recipe_compiler/recipe.py @@ -19,6 +19,7 @@ class Recipe: category: RecipeCategory recipe_name: str cover_img: str + style_block: str quote: str ingredients: str instructions: str diff --git a/recipe_compiler/templates/recipe.html b/recipe_compiler/templates/recipe.html index a2ecdfe..93827a2 100644 --- a/recipe_compiler/templates/recipe.html +++ b/recipe_compiler/templates/recipe.html @@ -26,4 +26,5 @@