181 lines
6 KiB
HTML
181 lines
6 KiB
HTML
{{ define "title" }}
|
|
{{ .Title }} · {{ .Site.Title }}
|
|
{{ end }}
|
|
{{ define "content" }}
|
|
|
|
<div class="container" itemscope itemtype="http://schema.org/Recipe">
|
|
<article class="post-content px2">
|
|
<!-- call up the main recipe title and content -->
|
|
<header class="post-header">
|
|
<h1 class="post-title center m1 sm-mt3" itemprop="name">{{ .Title }}</h1>
|
|
</header>
|
|
|
|
<div class="recipe-source">
|
|
<div class="clearfix mt3">
|
|
<div class="sm-col sm-col-3">
|
|
Chef:
|
|
{{if .Params.authorurl }}
|
|
<a href="{{.Params.authorurl}}">{{.Params.AuthorName}}</a>
|
|
{{else}}
|
|
{{.Params.AuthorName}}
|
|
{{end}}
|
|
</div>
|
|
<div class="sm-col sm-col-3">
|
|
{{ with .Params.Category }}{{ partial "taxonomy/category" . }}{{ end }}
|
|
</div>
|
|
<div class="sm-col sm-col-3">
|
|
{{ with .Params.Cuisine }}{{ partial "taxonomy/cuisine" . }}{{ end }}
|
|
</div>
|
|
</div>
|
|
|
|
{{ with .Params.Tags }}{{ partial "taxonomy/tags" . }}{{ end }}
|
|
</div>
|
|
|
|
<div class="clearfix mt3">
|
|
{{ with .Params.yield }}
|
|
<div class="sm-col sm-col-3">
|
|
<h4 class="blue mt0 mb2 xs-center">{{ i18n "yields" . }}</h4>
|
|
</div>
|
|
{{ end }}
|
|
{{ with .Params.prepTime }}
|
|
<div class="sm-col sm-col-3">
|
|
<h4 class="blue mt0 mb2 xs-center">{{ i18n "prepTime" . }}</h4>
|
|
</div>
|
|
{{ end }}
|
|
{{ with .Params.cookTime }}
|
|
<div class="sm-col sm-col-3">
|
|
<h4 class="blue mt0 mb2 xs-center">{{ i18n "cookTime" . }}</h4>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<!-- call up recipe and directions -->
|
|
<div class="clearfix mt3">
|
|
<div class="sm-col sm-col-6 lg-col-6 recipeItems">
|
|
<!-- check if it's a component-based recipe -->
|
|
{{ with .Params.Components}}
|
|
<h4 class="blue mt0 mb2 xs-center">{{ i18n "components" }}</h4>
|
|
<ul>
|
|
<!-- list components that make up recipe -->
|
|
{{ range . }}
|
|
<li>
|
|
{{ with ( . | markdownify) }}{{ partial "recipe_item.html" . }}{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
|
|
{{ with .Params.Ingredients }}
|
|
<h4 class="blue mt0 mb2 xs-center">{{ i18n "ingredients" }}</h4>
|
|
<ul itemprop="ingredients">
|
|
<!-- list ingredients that make up recipe -->
|
|
{{ range . }}
|
|
<li itemprop="recipeIngredient">
|
|
{{ with ( . | markdownify) }}{{ partial "recipe_item.html" . }}{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<div class="sm-col sm-col-6 lg-col-6 recipeItems">
|
|
<h4 class="blue mt0 mb2 xs-center">{{ i18n "directions" }}</h4>
|
|
<ul itemprop="recipeInstructions">
|
|
{{ range .Params.Directions }}
|
|
<li>
|
|
{{ with ( . | markdownify) }}{{ partial "recipe_item.html" . }}{{ end }}</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- end recipe and directions -->
|
|
|
|
<div class="px2 mt3 clearfix">
|
|
<div class="sm-col-8 mx-auto" itemprop="description">{{.Content}}</div>
|
|
</div>
|
|
|
|
<!-- check if it's a component-based recipe, render it -->
|
|
{{ with .Params.Components }}
|
|
<div class="components bg-darken-2 p2 mt3 mb3 center">
|
|
↓ {{ i18n "this-is-a" }} <strong class="blue">{{ i18n "component-based-recipe" }}</strong> ({{ i18n "fancy-talk" }}). ↓
|
|
</div>
|
|
|
|
<div class="clearfix mxn2">
|
|
{{ range . }}
|
|
{{ $compTitle := . }}
|
|
<div class="sm-col sm-col-4 px2 recipeItems">
|
|
{{ range where $.Site.Pages "Title" $compTitle }}
|
|
<h4 class="blue center"><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
|
|
{{ range (.Resources.ByType "image") }}
|
|
<div class="image ratio bg-cover" style="background-image:url({{$.Site.BaseURL}}{{ .RelPermalink }});">
|
|
<img class="hide" itemprop="photo" src="{{$.Site.BaseURL}}{{ .RelPermalink }}" />
|
|
</div>
|
|
{{ end }}
|
|
{{ if .Params.Imagecredit }}
|
|
<a href="{{ .Params.Imagecredit }}" class="right">
|
|
<svg class="js-geomicon geomicon" width="14" height="14" data-icon="camera" viewBox="0 0 32 32" style="fill:currentcolor">
|
|
<title>camera icon</title>
|
|
<path d="M0 6 L8 6 L10 2 L22 2 L24 6 L32 6 L32 28 L0 28 z M9 17 A7 7 0 0 0 23 17 A7 7 0 0 0 9 17"></path>
|
|
</svg>
|
|
</a>
|
|
{{ end }}
|
|
|
|
<h4 class="blue regular xs-center">{{ i18n "ingredients" }}</h4>
|
|
<ul class="ingredients" itemprop="ingredients">
|
|
{{ range .Params.Ingredients }}
|
|
<li itemprop="ingredient">
|
|
{{ with ( . | markdownify) }}{{ partial "recipe_item.html" . }}{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
|
|
<h4 class="blue regular xs-center">{{ i18n "steps" }}</h4>
|
|
<ul itemprop="instructions">
|
|
{{ range .Params.Directions }}
|
|
<li>
|
|
{{ with ( . | markdownify) }}{{ partial "recipe_item.html" . }}{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ end }}
|
|
<!-- end components -->
|
|
<br />
|
|
|
|
{{ if .Params.inspiration }}
|
|
<h3 class="blue mt0 mb2 xs-center center">Inspiration & Resources</h3>
|
|
{{ range .Params.inspiration }}
|
|
<ul class="center">
|
|
{{ if .url }}
|
|
<li><a href="{{ .url | safeURL }}">{{ .title }}</a></li>
|
|
{{ else }}
|
|
<li>{{ .title }}</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
<!-- call up the image and image credit link -->
|
|
{{ if .Params.image }}
|
|
<div class="xs-p2 center">
|
|
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
|
|
{{ with .Resources.GetMatch .Params.Image }}
|
|
{{ with .Fit "1000x1000" }}
|
|
<img itemprop="image" src="{{ .RelPermalink }}" {{ if .Params.imagecaption }}alt="{{.Params.imagecaption}}"{{ end }} style="max-width:75%"/>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if .Params.imagecaption }}
|
|
<figcaption><p><b>Pictured:</b> {{ .Params.imagecaption }}</p></figcaption>
|
|
{{ end }}
|
|
</figure>
|
|
</div>
|
|
{{ end }}
|
|
</article>
|
|
</div>
|
|
{{ end }}
|