From a190487ef793aeeb0937322cf98383b7505b5ceb Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Mon, 18 Apr 2022 11:22:33 +0200 Subject: Add a cookbook section --- layouts/_default/baseof.html | 21 ++++++------ layouts/_default/list.html | 8 ++--- layouts/recipes/list.html | 17 ++++++++++ layouts/recipes/single.html | 78 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 15 deletions(-) create mode 100644 layouts/recipes/list.html create mode 100644 layouts/recipes/single.html (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a88cca2..c61432e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,30 +5,29 @@ - - - {{ range .AlternativeOutputFormats -}} - - {{ end }} - + {{- range .AlternativeOutputFormats }} + + {{- end }} {{ .Page.Title }} - {{ .Site.Title }} + {{- block "head" . }} + {{- end }} - {{ block "body" . }} + {{- block "body" . }}
- {{ block "main" . }}{{ end }} + {{- block "main" . }}{{ end }}
- {{ end }} + {{- end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a9698f8..6ba66fc 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,11 +1,11 @@ -{{ define "main" }} +{{- define "main" }}

{{ .Title }}

{{ .Content }} -{{ end }} +{{- end }} diff --git a/layouts/recipes/list.html b/layouts/recipes/list.html new file mode 100644 index 0000000..0565d93 --- /dev/null +++ b/layouts/recipes/list.html @@ -0,0 +1,17 @@ +{{- define "main" }} +

{{ .Title }}

+{{ .Content }} + +{{- end }} diff --git a/layouts/recipes/single.html b/layouts/recipes/single.html new file mode 100644 index 0000000..36981ce --- /dev/null +++ b/layouts/recipes/single.html @@ -0,0 +1,78 @@ +{{ define "head" }} + +{{ end }} + +{{ define "main" }} +
+
+

{{ .Title }}

+ {{- range .Params.tags }} + #{{ . }} + {{- end }} +
+
+ {{ .Content }} + + + + + + + + + + + + + + + +
Preparation time{{ .Params.preptime }} minutes
Cooking time{{ .Params.cooktime }} minutes
Serves{{ .Params.serves }}
+

Ingredients

+ + + + + + + + + + + {{- range .Params.ingredients }} + + + + {{- if .unit }} + + + {{- else }} + + {{- end }} + + {{- end }} + +
 IngredientAmountUnit
+ + {{ .label }}{{ .amount }}{{ .unit }}{{ .amount }}
+

Instructions

+ {{- range .Params.stages }} +

{{ .label }}

+
    + {{- range .steps }} +
  1. + {{ . | $.Page.RenderString }} +
  2. + {{- end }} +
+ {{- end }} +
+ +
+{{ end }} -- cgit v1.1