Add pencil icon to drafts

This commit is contained in:
Dmitry Kolosov 2020-06-21 23:02:58 +03:00
parent 4c54e7a425
commit 6e0b0b6fc7
4 changed files with 15 additions and 4 deletions

View File

@ -3,12 +3,12 @@
{{ .Content }}
</div>
<h1 class="post-title{{ if .Params.favorite }} favorite{{end}}">{{ i18n .Title }}</h1>
<h1 class="post-title">{{ i18n .Title }}</h1>
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ range $pages }}
<div class="post-short-list">
<header>
<h2 class="post-title{{ if .Params.favorite }} favorite{{end}}"><a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h2>
<h2 class="post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h2>
</header>
{{ partial "postInfo.html" . }}
</div>

View File

@ -2,7 +2,7 @@
<article class="post">
<header>
<h1 class="post-title{{ if .Params.favorite }} favorite{{end}}">{{ trim .Title " " }}</h1>
<h1 class="post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " }}</h1>
</header>
<div class="content">
{{ .Content }}

View File

@ -1,6 +1,6 @@
<article class="post-list">
<header>
<h1 class="post-title{{ if .Params.favorite }} favorite{{end}}"><a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h1>
<h1 class="post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h1>
</header>
<div class="content post-summary">

View File

@ -221,6 +221,17 @@ main h1 {
margin-left: 0.2em;
}
.post-title.draft::after {
content: "✎";
display: inline-block;
margin-left: 0.2em;
}
.post-title.favorite.draft::after {
content: "★ ✎";
display: inline-block;
margin-left: 0.2em;
}
article:not(:last-of-type) {
border-bottom: thin solid #f1f1f1;