add [draft] mark

- to identify drafts from other posts
This commit is contained in:
Aditya Telange 2020-07-24 20:46:33 +05:30
parent 523098f87e
commit d005d7d2bb
4 changed files with 19 additions and 4 deletions

View File

@ -77,3 +77,9 @@
top: 0;
bottom: 0;
}
.entry-isdraft {
display: inline;
color: var(--secondary);
font-size: 14px;
}

View File

@ -22,7 +22,10 @@
{{- end }}
<article class="{{ $class }}">
<header class="entry-header">
<h2>{{ .Title }}</h2>
<h2>
{{ .Title }}
<div class="entry-isdraft">{{- if .Draft }}<sup>[draft]</sup>{{- end }}</div>
</h2>
</header>
<section class="entry-content">
<p>{{ .Summary | plainify | htmlUnescape }}...</p>

View File

@ -14,7 +14,10 @@
{{- end }}
<article class="{{ $class }}">
<header class="entry-header">
<h2>{{ .Title }}</h2>
<h2>
{{ .Title }}
<div class="entry-isdraft">{{- if .Draft }}<sup>[draft]</sup>{{- end }}</div>
</h2>
</header>
<section class="entry-content">
<p>{{ .Summary | plainify | htmlUnescape }}...</p>

View File

@ -2,7 +2,10 @@
<article class="post-single">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
<h1 class="post-title">
{{ .Title }}
<div class="entry-isdraft">{{- if .Draft }}<sup>[draft]</sup>{{- end }}</div>
</h1>
<div class="post-meta">
{{- if or .Params.author .Site.Params.author }}
{{- .Params.author | default .Site.Params.author }} · {{ end }}