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 @@

Instructions

+ {{ recipe.style_block | safe }} {% endblock content %} diff --git a/recipes/french-tartiflette.md b/recipes/french-tartiflette.md new file mode 100644 index 0000000..84f3954 --- /dev/null +++ b/recipes/french-tartiflette.md @@ -0,0 +1,41 @@ +--- +name: Émeline +residence: The Alps, France +category: entree +cover_img: french-tartiflette.png +css_html_background: fcfbf5 +--- + +# Tartiflette + +## Ingredients +* 1 well-made reblochon > 250g + * when you press on the side of the reblochon, your finger should sink in a little +* 200g onion +* 200g smoked bacon +* 1kg of potato +* 1 clove of garlic +* 2 Tbsp of olive oil +* Pepper +* Salt + +## Instructions +### Preparation +* Chop onions +* Cut bacon in smaller pieces +* Peel & cut potatoes, wash & rinse them well and dry them in a clean cloth +* Cut reblochon crust and separate them from the "heart". Cut the heart into cubes + +### Cooking +* Add the olive oil a frying pan +* Sauté onions for 5-10min +* In another frying pan + * Brown the bacon to melt the fat + * Remove excess fat with a paper towel +* Add potatoes to the first pan and brown them +* When they are golden, add the bacon from the other pan +* Preheat the oven to 200°C (thermostat 6-7) +* Prepare a gratin dish by rubbing the bottom and sides with the peeled garlic clove +* In the gratin dish, spread the potatoes with bacon and onions, add the reblochon cubes and place the crusts on top +* Bake for about 20 minutes +* Bon Appétit