blob: 36981cef85d62bc43c2b32cf8a52b3b7e4145bfb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
{{ define "head" }}
<script type="text/javascript" src="/js/cookbook.js"></script>
{{ end }}
{{ define "main" }}
<article>
<header>
<h1>{{ .Title }}</h1>
{{- range .Params.tags }}
<a href="/tags/{{ . | lower }}">#{{ . }}</a>
{{- end }}
</header>
<main>
{{ .Content }}
<table>
<tbody>
<tr>
<td>Preparation time</td>
<td>{{ .Params.preptime }} minutes</td>
</tr>
<tr>
<td>Cooking time</td>
<td>{{ .Params.cooktime }} minutes</td>
</tr>
<tr>
<td>Serves</td>
<td data-serves="{{ .Params.serves }}">{{ .Params.serves }}</td>
</tr>
</tbody>
</table>
<h2>Ingredients</h2>
<table>
<thead>
<tr>
<th> </th>
<th>Ingredient</th>
<th>Amount</th>
<th>Unit</th>
</tr>
</thead>
<tbody>
{{- range .Params.ingredients }}
<tr>
<td>
<input type="checkbox">
</td>
<td>{{ .label }}</td>
{{- if .unit }}
<td data-unit="{{ .unit }}" data-amount="{{ .amount }}">{{ .amount }}</td>
<td data-unit="{{ .unit }}">{{ .unit }}</td>
{{- else }}
<td colspan="2">{{ .amount }}</td>
{{- end }}
</tr>
{{- end }}
</tbody>
</table>
<h2>Instructions</h2>
{{- range .Params.stages }}
<h3>{{ .label }}</h3>
<ol>
{{- range .steps }}
<li>
<input type="checkbox"> {{ . | $.Page.RenderString }}
</li>
{{- end }}
</ol>
{{- end }}
</main>
<footer>
<p class="text-center">
<a class="image-link" rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License" src="/img/cc-by-sa.png">
</a>
</p>
</footer>
</article>
{{ end }}
|