29 lines
649 B
Plaintext
29 lines
649 B
Plaintext
{{ define "title" }}{{ .Data.Post.Title }}{{ end }}
|
|
{{ define "content" }}
|
|
|
|
{{ $p := .Data.Post }}
|
|
{{ RenderPost .Request $p false 0 }}
|
|
|
|
{{ if and .LoggedIn .CurrentUser.Admin }}
|
|
<small>
|
|
<strong>Admin Actions:</strong>
|
|
[
|
|
<a href="/blog/edit?id={{ $p.ID }}">Edit</a> |
|
|
<a href="/blog/delete?id={{ $p.ID }}">Delete</a>
|
|
]
|
|
</small>
|
|
{{ end }}
|
|
|
|
{{ if $p.EnableComments }}
|
|
<h2 id="comments" class="mt-4">Comments</h2>
|
|
|
|
{{ $idStr := printf "%d" $p.ID}}
|
|
{{ RenderComments .Request $p.Title "post" $idStr }}
|
|
{{ else }}
|
|
<hr>
|
|
<em>Comments are disabled on this post.</em>
|
|
{{ end }}
|
|
|
|
|
|
{{ end }}
|