{{ define "title" }}{{ .Data.Post.Title }}{{ end }}
{{ define "content" }}

{{ $p := .Data.Post }}
{{ RenderPost $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 $p.Title "post" $idStr }}
{{ else }}
    <hr>
    <em>Comments are disabled on this post.</em>
{{ end }}


{{ end }}
