mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 03:36:41 +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">
|
<li class="post-item">
|
||||||
<span class="meta">{{ .Date.Format .Site.Params.dateform }}</span>
|
<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>
|
<a href="{{ .Permalink }}"><span>{{ .Title }}</span></a>
|
||||||
|
{{ end }}
|
||||||
</li>
|
</li>
|
||||||
|
@@ -1,7 +1,11 @@
|
|||||||
<div class="page-heading">
|
<div class="page-heading">
|
||||||
{{ if .Params.heading }}
|
{{ if .Params.heading }}
|
||||||
{{ .Params.heading }}
|
{{ .Params.heading }}
|
||||||
|
{{ else }}
|
||||||
|
{{ if .Params.draft }}
|
||||||
|
Draft::{{ .Title }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user