GoBlog/templates/post.gohtml

45 lines
1.6 KiB
Plaintext
Raw Normal View History

2020-07-31 13:48:01 +00:00
{{ define "title" }}
2021-08-05 06:09:34 +00:00
<title>{{ with .Data.RenderedTitle }}{{ . }} - {{end}}{{ mdtitle .Blog.Title }}</title>
2020-11-01 17:37:21 +00:00
{{ include "postheadmeta" . }}
2020-12-22 21:15:29 +00:00
{{ with shorturl .Data }}<link rel="shortlink" href="{{ . }}">{{ end }}
2020-07-31 13:48:01 +00:00
{{ end }}
{{ define "main" }}
<main class=h-entry>
<article>
2020-11-01 17:37:21 +00:00
<data class="u-url hide" value="{{ absolute .Data.Path }}"></data>
2021-08-05 06:09:34 +00:00
{{ with .Data.RenderedTitle }}<h1 class=p-name>{{ . }}</h1>{{ end }}
2020-11-01 17:37:21 +00:00
{{ include "postmeta" . }}
{{ include "postactions" . }}
{{ if .Data.Content }}
2020-11-03 17:00:03 +00:00
{{ include "oldcontentwarning" . }}
2020-11-01 17:37:21 +00:00
<div class=e-content>
{{ content .Data false }}
2020-11-01 17:37:21 +00:00
</div>
2020-09-01 17:08:57 +00:00
{{ end }}
2020-11-01 17:37:21 +00:00
{{ include "posttax" . }}
</article>
{{ include "author" . }}
2020-07-31 13:48:01 +00:00
</main>
{{ if .LoggedIn }}
2021-06-24 17:09:59 +00:00
<div id="posteditactions" class="p">
<form class="in" method="post" action="{{ .Blog.RelativePath "/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="{{ .Blog.RelativePath "/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 }}
2021-01-23 16:24:47 +00:00
{{ include "interactions" . }}
{{ end }}
{{ end }}
2020-08-05 17:14:10 +00:00
{{ define "post" }}
{{ template "base" . }}
2020-07-31 13:48:01 +00:00
{{ end }}