update theme to only show modified date if its different than post date ; add ability to add 'changelog' header to notes/recipes

This commit is contained in:
KemoNine 2022-12-10 12:18:10 -05:00
parent 4c5c39be4d
commit 0fe8352233
2 changed files with 36 additions and 2 deletions

View file

@ -12,7 +12,10 @@
<div class="recipe-source center">
<div class="clearfix mt3">
Published: {{ .PublishDate.Format "January 2, 2006" }} &bull; Last Updated: {{ .Lastmod.Format "January 2, 2006" }}
Published: {{ .PublishDate.Format "January 2, 2006" }}
{{ if ne .PublishDate .Lastmod }}
&bull; Last Updated: {{ .Lastmod.Format "January 2, 2006" }}
{{ end }}
</div>
<div class="clearfix mt3">
@ -27,6 +30,20 @@
{{ with .Params.Tags }}{{ partial "taxonomy/tags" . }}{{ end }}
</div>
{{ if .Params.changelog }}
<div class="px2 mt3 clearfix center">
<div class="sm-col-8 mx-auto" itemprop="description">
<h3 class="blue mt0 mb2 xs-center">Changelog</h3>
<dl>
{{ range .Params.changelog }}
<dt>{{ .changedate }}</dt>
<dd>{{ .change }}</dd>
{{ end }}
</dl>
</div>
</div>
{{ end }}
<div class="px2 mt3 clearfix">
<div class="sm-col-8 mx-auto" itemprop="description">{{.Content}}</div>
</div>

View file

@ -12,7 +12,10 @@
<div class="recipe-source center">
<div class="clearfix mt3">
Published: {{ .PublishDate.Format "January 2, 2006" }} &bull; Last Updated: {{ .Lastmod.Format "January 2, 2006" }}
Published: {{ .PublishDate.Format "January 2, 2006" }}
{{ if ne .PublishDate .Lastmod }}
&bull; Last Updated: {{ .Lastmod.Format "January 2, 2006" }}
{{ end }}
</div>
<div class="clearfix mt3">
Chef:
@ -37,6 +40,20 @@
{{ end }}
</div>
{{ if .Params.changelog }}
<div class="px2 mt3 clearfix center">
<div class="sm-col-8 mx-auto" itemprop="description">
<h3 class="blue mt0 mb2 xs-center">Changelog</h3>
<dl>
{{ range .Params.changelog }}
<dt>{{ .changedate }}</dt>
<dd>{{ .change }}</dd>
{{ end }}
</dl>
</div>
</div>
{{ end }}
<!-- call up recipe and directions -->
<div class="clearfix mt3">
<div class="sm-col sm-col-6 lg-col-6 recipeItems">