Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vividvilla/ezhil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcgiacomi <christiangiacomi@gmail.com>2019-10-11 22:25:17 +0300
committercgiacomi <christiangiacomi@gmail.com>2019-10-11 22:25:17 +0300
commita6070f540823d83621b5baf38601a978a87a3ffd (patch)
tree30120c238194df998142d8a8a4047118637d14b0
parent6e5bf0c053c93be02982d1d265b468b853ecae30 (diff)
feat: add draft label for draft posts
-rw-r--r--layouts/_default/single.html2
-rw-r--r--static/css/main.css9
2 files changed, 10 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 26d1c1b..61ec209 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -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">
diff --git a/static/css/main.css b/static/css/main.css
index c0f2453..7a5fc9c 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -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;