Add icon to drafts

Fix #23
This commit is contained in:
BBaoVanC 2021-10-10 17:28:05 -05:00
parent 6ce4cdad32
commit f0cddf7e42
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,9 @@
{{ define "main" }}
<div class="post-title">
<h1>{{ .Title | markdownify }}</h1>
<h1>
{{ .Title | markdownify }}
{{ if .Draft }}{{ partial "icon.html" "edit" }}{{ end }}
</h1>
</div>
{{ partial "post-metadata.html" . }}

View File

@ -2,6 +2,7 @@
<h2 class="post-title">
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "edit" }}{{ end }}
</h2>
{{ partial "post-metadata.html" . }}