mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-17 06:15:02 +00:00
51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
{{ define "title" }}
|
|
<title>{{ with p .Data "title" }}{{ . }} - {{end}}{{ .Blog.Title }}</title>
|
|
{{ include "postheadmeta" . }}
|
|
{{ with shorturl .Data }}<link rel="shortlink" href="{{ . }}">{{ end }}
|
|
{{ 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 }}
|
|
{{ include "oldcontentwarning" . }}
|
|
<div class=e-content>
|
|
{{ with p .Data "audio" }}
|
|
<audio controls preload="none" 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>
|
|
{{ if .LoggedIn }}
|
|
<div class="p">
|
|
<form class="in" method="post" action="{{ blogrelative .Blog "/editor" }}#update">
|
|
<input type="hidden" name="editoraction" value="loadupdate">
|
|
<input type="hidden" name="url" value="{{ .Canonical }}">
|
|
<input type="submit" value="{{ string .Blog.Lang "update" }}">
|
|
</form>
|
|
<form class="in" method="post" action="{{ blogrelative .Blog "/editor" }}#delete">
|
|
<input type="hidden" name="editoraction" value="loaddelete">
|
|
<input type="hidden" name="url" value="{{ .Canonical }}">
|
|
<input type="submit" value="{{ string .Blog.Lang "delete" }}">
|
|
</form>
|
|
</div>
|
|
{{ end }}
|
|
{{ if .CommentsEnabled }}
|
|
{{ include "interactions" . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ define "post" }}
|
|
{{ template "base" . }}
|
|
{{ end }} |