fixed use of Now.unix

This commit is contained in:
Jeremy Kidwell 2018-04-16 14:51:42 +01:00
parent 3efbbc0846
commit 56f8dd457b
3 changed files with 3 additions and 21 deletions

View file

@ -11,24 +11,6 @@
</div>
</div>
<!--
Attempting to add granularity on itemtypes - need to fix later
<div class="wrapper" itemscope itemtype="http://schema.org/Book">
<div class="units-row">
<div class="unit-20">&nbsp;</div>
<div class="unit-60">
<h2><a href="">{{ .Title }}</a></h2>
</div>
</div>
<div class="units-row">
<div class="unit-20 dateblock"><h4>{{ .Date.Format "January 2, 2006" }}</h4>
{{ if (ge .Date.Unix .Now.Unix) }}{{ if (le .Date.Unix (add .Now.Unix 7776000)) }}<span class="badge badge-small badge-yellow">coming soon</span>{{ end }}{{ end }}
</div>
<div class="unit-60">{{ .Content }}</div>
</div>
</div>
-->
<div class="wrapper" itemscope itemtype="http://schema.org/Article">
<div class="units-row">
<div class="unit-20">&nbsp;</div>
@ -38,7 +20,7 @@ Attempting to add granularity on itemtypes - need to fix later
</div>
<div class="units-row">
<div class="unit-20 dateblock"><h4>{{ .Date.Format "January 2, 2006" }}</h4>
{{ if (ge .Date.Unix .Now.Unix) }}{{ if (le .Date.Unix (add .Now.Unix 7776000)) }}<span class="badge badge-small badge-yellow">coming soon</span>{{ end }}{{ end }}
{{ if (ge .Date.Unix now.Unix) }}{{ if (le .Date.Unix (add now.Unix 7776000)) }}<span class="badge badge-small badge-yellow">coming soon</span>{{ end }}{{ end }}
</div>
<div class="unit-60">{{ .Content }}</div>
</div>