Add a draft tag to drafts in recent_posts

This commit is contained in:
Eryn Wells 2021-10-10 18:42:11 -07:00
parent 36b65cba15
commit 933081348c

View file

@ -8,6 +8,9 @@
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date | time.Format ":date_medium" }}</time>
{{ if $page.Draft }}
<span class="draft">draft</span>
{{ end }}
</li>
{{ end }}
</ul>
@ -15,10 +18,10 @@
{{ if gt $paginator.TotalPages 1 }}
<nav class="main-nav">
{{ if $paginator.HasPrev }}
<a class="prev" href="{{ $paginator.Prev.URL }}">← {{ i18n "prev_page" }}</a>
{{ end }}<!---->
<a class="prev" href="{{ $paginator.Prev.URL }}">← {{ i18n "prev_page" }}</a>
{{ end }}
{{ if $paginator.HasNext }}
<a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "next_page" }} →</a>
<a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "next_page" }} →</a>
{{ end }}
</nav>
{{ end }}<!---->
{{ end }}