mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-14 19:26:40 +02:00
Add label for drafts in the UI
This makes it easier to see what a blog will look like when it's published, and decreases the possibility of confusion when trying to publish a post.
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
<li class="post-item">
|
||||
<span class="meta">{{ .Date.Format .Site.Params.dateform }}</span>
|
||||
{{ if .Params.draft }}
|
||||
<a href="{{ .Permalink }}"><span>Draft::{{ .Title }}</span></a>
|
||||
{{ else }}
|
||||
<a href="{{ .Permalink }}"><span>{{ .Title }}</span></a>
|
||||
{{ end }}
|
||||
</li>
|
||||
|
@@ -2,6 +2,10 @@
|
||||
{{ if .Params.heading }}
|
||||
{{ .Params.heading }}
|
||||
{{ else }}
|
||||
{{ if .Params.draft }}
|
||||
Draft::{{ .Title }}
|
||||
{{ else }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user