summaryrefslogtreecommitdiff
path: root/layouts/recipe/single.html
blob: fb88d7f43d8269973752f032f183d8acea88b1a3 (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
{{ define "head" }}
<link rel="stylesheet" href='{{ "css/single.css" | absURL }}'>
<script type="application/ld+json">
  {{ .RawContent }}
</script>
{{ end }}

{{ define "main" }}
{{- $data := transform.Unmarshal .RawContent -}}
<main id="main" class="post">
  <a href="{{- $data.url -}}">
    <h1 class="title">{{ .Title }}</h1>
  </a>
  <article class="content recipe">
    <div><i>{{ .PublishDate.Format "January 2, 2006"}}</i></div>
    <p>{{- $data.description -}}</p>
    
    <div class="body">
      <div class="ingredients">
        <h2>Ingredients</h2>
        <ul>
        {{- range $data.recipeIngredient -}}
          <li>
            <input type="checkbox" id="{{ . }}">
            <label for="{{ . }}">{{ . }}</label>
          </li>
        {{ end }}
      </ul>
    </div>

      <div class="instructions">
        <h2>Instructions</h2>
        <ol>
        {{- range $data.recipeInstructions -}}
        <li>
          <input type="checkbox" id="{{ . }}">
          <label for="{{ . }}">{{ . }}</label>
        </li>
        {{ end }}
        </ol>
      </div>
    </div>

  </article>
</main>
{{ end }}