Refactor to use Python for building and YAML for data
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width" />
|
||||
</head>
|
||||
|
||||
<body class="cookbook">
|
||||
{% for section in sections %}
|
||||
<section>
|
||||
<h1>{{ section.title }}</h1>
|
||||
<div class="list">
|
||||
{% for recipe in section.recipes %}
|
||||
<a href="{{section.id}}/{{recipe.id}}">
|
||||
<img src="{{section.id}}/{{recipe.id}}/image.png" />
|
||||
<p>{{ recipe.title }}</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,36 +0,0 @@
|
||||
module.exports = require("../helpers")({
|
||||
title: "",
|
||||
timings: {
|
||||
prep: " min",
|
||||
cook: " hours",
|
||||
},
|
||||
icons: ["gluten-free", "low-carb", "overnight", "vegetarian"],
|
||||
servings: ,
|
||||
description: "",
|
||||
steps: [{
|
||||
ingredients: [
|
||||
{ amount: , unit: "", item: "" },
|
||||
{ amount: , unit: "", item: "" },
|
||||
{ amount: , unit: "", item: "" },
|
||||
],
|
||||
directions: ""
|
||||
}, {
|
||||
ingredients: [
|
||||
{ amount: , unit: "", item: "" },
|
||||
{ amount: , unit: "", item: "" },
|
||||
{ amount: , unit: "", item: "" },
|
||||
],
|
||||
directions: ""
|
||||
}, {
|
||||
ingredients: [
|
||||
{ amount: , unit: "", item: "" },
|
||||
{ amount: , unit: "", item: "" },
|
||||
{ amount: , unit: "", item: "" },
|
||||
],
|
||||
directions: ""
|
||||
}],
|
||||
credit: {
|
||||
name: "",
|
||||
url: ""
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Untitled
|
||||
timings:
|
||||
prep: 0 minutes
|
||||
cook: 0 minutes
|
||||
icons: [gluten-free, low-carb, overnight, vegetarian]
|
||||
servings: 1
|
||||
description: >
|
||||
pass
|
||||
steps:
|
||||
- ingredients:
|
||||
- { amount: , unit: , item: "" }
|
||||
directions: >
|
||||
pass
|
||||
@@ -1,192 +0,0 @@
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
link(rel="stylesheet" type="text/css" href="style.css")
|
||||
meta(name="viewport" content="user-scalable=no, width=device-width")
|
||||
|
||||
body.cookbook
|
||||
h1 Baking
|
||||
|
||||
a(href="bagels")
|
||||
img(src="bagels/large.png")
|
||||
| Bagels
|
||||
|
||||
a(href="challah")
|
||||
img(src="challah/large.png")
|
||||
| Challah
|
||||
|
||||
a(href="fluffy-pancakes")
|
||||
img(src="fluffy-pancakes/large.png")
|
||||
| Fluffy Pancakes
|
||||
|
||||
a(href="gluten-free-flour")
|
||||
img(src="gluten-free-flour/large.png")
|
||||
| Gluten-Free Flour
|
||||
|
||||
a(href="pizza")
|
||||
img(src="pizza/large.png")
|
||||
| Pizza
|
||||
|
||||
a(href="rosemary-dinner-rolls")
|
||||
img(src="rosemary-dinner-rolls/large.png")
|
||||
| Rosemary Dinner Rolls
|
||||
|
||||
a(href="southern-buttermilk-biscuits")
|
||||
img(src="southern-buttermilk-biscuits/large.png")
|
||||
| Southern Buttermilk Biscuits
|
||||
|
||||
h1 Soups
|
||||
|
||||
a(href="caldo-verde")
|
||||
img(src="caldo-verde/large.png")
|
||||
| Caldo Verde
|
||||
|
||||
a(href="clam-chowder")
|
||||
img(src="clam-chowder/large.png")
|
||||
| Clam Chowder
|
||||
|
||||
a(href="cream-of-spinach-soup")
|
||||
img(src="cream-of-spinach-soup/large.png")
|
||||
| Cream of Spinach Soup
|
||||
|
||||
a(href="curry-butternut-squash-and-apple-soup")
|
||||
img(src="curry-butternut-squash-and-apple-soup/large.png")
|
||||
| Curry Butternut Squash & Apple Soup
|
||||
|
||||
a(href="french-onion-soup")
|
||||
img(src="french-onion-soup/large.png")
|
||||
| French Onion Soup
|
||||
|
||||
a(href="hungarian-mushroom-beef-soup")
|
||||
img(src="hungarian-mushroom-beef-soup/large.png")
|
||||
| Hungarian Mushroom Beef Soup
|
||||
|
||||
a(href="winter-lentil-soup")
|
||||
img(src="winter-lentil-soup/large.png")
|
||||
| Winter Lentil Soup
|
||||
|
||||
h1 Salads
|
||||
|
||||
a(href="caesar-salad")
|
||||
img(src="caesar-salad/large.png")
|
||||
| Caesar Salad
|
||||
|
||||
a(href="cucumber-salad")
|
||||
img(src="cucumber-salad/large.png")
|
||||
| Cucumber Salad
|
||||
|
||||
a(href="ruths-chris-chopped-salad")
|
||||
img(src="ruths-chris-chopped-salad/large.png")
|
||||
| Ruth's Chris Chopped Salad
|
||||
|
||||
h1 Main Dish
|
||||
|
||||
a(href="bbq-pork-ribs")
|
||||
img(src="bbq-pork-ribs/large.png")
|
||||
| BBQ Pork Ribs
|
||||
|
||||
a(href="beef-bourguignon")
|
||||
img(src="beef-bourguignon/large.png")
|
||||
| Beef Bourguignon
|
||||
|
||||
a(href="butter-chicken")
|
||||
img(src="butter-chicken/large.png")
|
||||
| Butter Chicken
|
||||
|
||||
a(href="chicken-cordon-bleu")
|
||||
img(src="chicken-cordon-bleu/large.png")
|
||||
| Chicken Cordon Bleu
|
||||
|
||||
a(href="chicken-pot-pie")
|
||||
img(src="chicken-pot-pie/large.png")
|
||||
| Chicken Pot Pie
|
||||
|
||||
a(href="chicken-breasts-with-caper-cream-sauce")
|
||||
img(src="chicken-breasts-with-caper-cream-sauce/large.png")
|
||||
| Chicken Breasts with Caper Cream Sauce
|
||||
|
||||
a(href="chole")
|
||||
img(src="chole/large.png")
|
||||
| Chole
|
||||
|
||||
a(href="garlic-prime-rib")
|
||||
img(src="garlic-prime-rib/large.png")
|
||||
| Garlic Prime Rib
|
||||
|
||||
a(href="gnocchi")
|
||||
img(src="gnocchi/large.png")
|
||||
| Gnocchi
|
||||
|
||||
a(href="kielbasa-and-cabbage")
|
||||
img(src="kielbasa-and-cabbage/large.png")
|
||||
| Kielbasa and Cabbage
|
||||
|
||||
a(href="kofta-kebabs")
|
||||
img(src="kofta-kebabs/large.png")
|
||||
| Kofta Kebabs
|
||||
|
||||
a(href="lemon-chicken-with-mushroom-sauce")
|
||||
img(src="lemon-chicken-with-mushroom-sauce/large.png")
|
||||
| Lemon Chicken with Mushroom Sauce
|
||||
|
||||
a(href="orange-chicken")
|
||||
img(src="orange-chicken/large.png")
|
||||
| Orange Chicken
|
||||
|
||||
a(href="ratatouille")
|
||||
img(src="ratatouille/large.png")
|
||||
| Ratatouille
|
||||
|
||||
a(href="ricotta-meatballs")
|
||||
img(src="ricotta-meatballs/large.png")
|
||||
| Ricotta Meatballs
|
||||
|
||||
a(href="roast-leg-of-lamb-with-rosemary")
|
||||
img(src="roast-leg-of-lamb-with-rosemary/large.png")
|
||||
| Roast Leg of Lamb with Rosemary
|
||||
|
||||
a(href="shrimp-with-sweet-potatoes-and-bacon")
|
||||
img(src="shrimp-with-sweet-potatoes-and-bacon/large.png")
|
||||
| Shrimp with Sweet Potatoes and Bacon
|
||||
|
||||
a(href="sloppy-joe-sandwiches")
|
||||
img(src="sloppy-joe-sandwiches/large.png")
|
||||
| Sloppy Joe Sandwiches
|
||||
|
||||
h1 Sides
|
||||
|
||||
a(href="bok-choy-with-garlic")
|
||||
img(src="bok-choy-with-garlic/large.png")
|
||||
| Bok Choy with Garlic
|
||||
|
||||
a(href="bourbon-glazed-carrots")
|
||||
img(src="bourbon-glazed-carrots/large.png")
|
||||
| Bourbon Glazed Carrots
|
||||
|
||||
a(href="creamed-spinach")
|
||||
img(src="creamed-spinach/large.png")
|
||||
| Creamed Spinach
|
||||
|
||||
a(href="garlic-broccoli")
|
||||
img(src="garlic-broccoli/large.png")
|
||||
| Garlic Broccoli
|
||||
|
||||
a(href="hummus")
|
||||
img(src="hummus/large.png")
|
||||
| Hummus
|
||||
|
||||
a(href="pommes-puree")
|
||||
img(src="pommes-puree/large.png")
|
||||
| Pommes Purée
|
||||
|
||||
a(href="sauteed-mushrooms")
|
||||
img(src="sauteed-mushrooms/large.png")
|
||||
| Sauteed Mushrooms
|
||||
|
||||
a(href="sweet-potatoes-with-honey-and-rosemary")
|
||||
img(src="sweet-potatoes-with-honey-and-rosemary/large.png")
|
||||
| Sweet Potatoes with Honey and Rosemary
|
||||
|
||||
a(href="tzatziki")
|
||||
img(src="tzatziki/large.png")
|
||||
| Tzatziki
|
||||
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link href="../../style2.css" rel="stylesheet" type="text/css" />
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width" />
|
||||
|
||||
<body class="recipe">
|
||||
<section class="header">
|
||||
<div class="image" style="background-image: url('./image.png')"></div>
|
||||
|
||||
<div class="about">
|
||||
<h1>{{ title }}</h1>
|
||||
|
||||
<div class="timing">
|
||||
{% if timings.prep -%}
|
||||
prep {{ timings.prep }}
|
||||
{%- endif -%}
|
||||
{%- if timings.prep and timings.cook -%}
|
||||
,
|
||||
{%- endif -%}
|
||||
{%- if timings.cook -%}
|
||||
cook {{ timings.cook }}
|
||||
{%- endif %}
|
||||
</div>
|
||||
|
||||
<div class="icons">
|
||||
{% for icon in icons %}
|
||||
<div class="icon {{ icon }}"></div>
|
||||
{% endfor %}
|
||||
{% if servings %}
|
||||
<div class="icon serving"></div>× {{ servings }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="description">{{ description }}</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="instructions">
|
||||
{% for step in steps %}
|
||||
<div class="step">
|
||||
<h3>{{ loop.index }}</h3>
|
||||
<div class="ingredients">
|
||||
<ul>
|
||||
{% if step.ingredients %}
|
||||
{% for ingredient in step.ingredients %}
|
||||
<li>
|
||||
<div class="amount">
|
||||
{{ as_fraction(ingredient.amount) }} {{ ingredient.unit }}
|
||||
</div>
|
||||
<div class="item">{{ ingredient.item }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="detail">{{ step.directions }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
{% if credit %}
|
||||
<section class="credits">
|
||||
{% if credit.name %}
|
||||
{{ credit.name -}}
|
||||
{% endif -%}
|
||||
{%- if credit.name and credit.url -%}
|
||||
,
|
||||
{% endif %}
|
||||
{% if credit.url %}
|
||||
<a href="{{ credit.url }}">{{ credit.url }}</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section class="navigation">
|
||||
<a href="../..">« Back</a>
|
||||
</section>
|
||||
</body>
|
||||
</html
|
||||
@@ -1,57 +0,0 @@
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
link(href="../style2.css" rel="stylesheet" type="text/css")
|
||||
meta(charset="UTF-8")
|
||||
meta(name="viewport" content="user-scalable=no, width=device-width")
|
||||
|
||||
body.recipe
|
||||
section.header
|
||||
.image(style="background-image: url('./large.png')")
|
||||
|
||||
.about
|
||||
h1 #{title}
|
||||
|
||||
.timing
|
||||
if timings.prep
|
||||
| prep #{timings.prep}
|
||||
if timings.prep && timings.cook
|
||||
| ,
|
||||
if timings.cook
|
||||
| cook #{timings.cook}
|
||||
|
||||
.icons
|
||||
each icon in icons
|
||||
.icon(class=icon)
|
||||
if servings
|
||||
.icon.serving
|
||||
| × #{servings}
|
||||
|
||||
.description #{description}
|
||||
|
||||
section.instructions
|
||||
- let stepNumber = 1
|
||||
each step in steps
|
||||
.step
|
||||
h3 #{stepNumber}
|
||||
.ingredients
|
||||
ul
|
||||
if step.ingredients
|
||||
each ingredient in step.ingredients
|
||||
li
|
||||
.amount #{asFraction(ingredient.amount)} #{ingredient.unit}
|
||||
.item #{ingredient.item}
|
||||
.detail !{step.directions}
|
||||
- stepNumber++
|
||||
|
||||
if credit
|
||||
section.credits
|
||||
if credit.name
|
||||
| #{credit.name}
|
||||
if credit.name && credit.url
|
||||
| ,
|
||||
if credit.url
|
||||
a(href=credit.url) #{credit.url}
|
||||
|
||||
section.navigation
|
||||
a(href="..") « Back
|
||||
Reference in New Issue
Block a user