GoBlog/templates/post.gohtml

32 lines
988 B
Plaintext

{{ define "title" }}
<title>{{ with p .Data "title" }}{{ . }} - {{end}}{{ .Blog.Title }}</title>
{{ include "postheadmeta" . }}
{{ end }}
{{ define "main" }}
<main class=h-entry>
<article>
<data class="u-url hide" value="{{ absolute .Data.Path }}"></data>
{{ with title .Data }}<h1 class=p-name>{{ . }}</h1>{{ end }}
{{ include "postmeta" . }}
{{ include "postactions" . }}
{{ if .Data.Content }}
<div class=e-content>
{{ with p .Data "audio" }}
<audio controls preload="metadata" class="fw"><source src="{{ . }}"/></audio>
{{ end }}
{{ content .Data }}
{{ with p .Data "link" }}
<p><a class="u-bookmark-of" href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a></p>
{{ end }}
</div>
{{ end }}
{{ include "posttax" . }}
</article>
{{ include "author" . }}
</main>
{{ end }}
{{ define "post" }}
{{ template "base" . }}
{{ end }}