feat: add draft label for draft posts

This commit is contained in:
cgiacomi 2019-10-11 21:25:17 +02:00
parent 3bceb9f94e
commit a021ff0f78
2 changed files with 10 additions and 1 deletions

View File

@ -7,7 +7,7 @@
<div class="post-header">
<h1 class="title">{{ .Title }}</h1>
<div class="meta">Posted at &mdash; {{ dateFormat "Jan 2, 2006" .Date }}</div>
<div class="meta">Posted at &mdash; {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
</div>
<div class="markdown">

View File

@ -284,6 +284,15 @@ ul {
margin-top: 10px;
}
.post .draft-label {
color: #a00;
text-decoration: none;
padding: 2px 4px;
border-radius: 4px;
margin-left: 6px;
background-color: #f9f2f4;
}
.list .posts .post .meta {
margin-bottom: 0;
margin-left: 5px;