2023-07-13 19:20:00 +00:00
|
|
|
{{define "title"}}{{.Entry.Title}}{{end}}
|
2023-07-08 12:51:56 +00:00
|
|
|
|
2024-02-24 20:21:48 +00:00
|
|
|
{{define "head"}}
|
|
|
|
<meta property="og:url" content="{{ urljoin .SiteConfig.FullUrl "/posts/" .Data.Entry.ID }}/" />
|
|
|
|
<meta property="og:type" content="article" />
|
|
|
|
{{ if .Data.Entry.ImageUrl}}
|
|
|
|
<meta property="og:image" content="{{ urljoin .SiteConfig.FullUrl .Data.Entry.ImageUrl}}" />
|
|
|
|
{{ end }}
|
2024-02-25 13:01:55 +00:00
|
|
|
{{ if .Data.Entry.PublishedAt }}
|
2024-02-24 20:21:48 +00:00
|
|
|
<meta property="og:article:published_time" content="{{.Data.Entry.PublishedAt.Format "2006-01-02T15:04:05" }}" />
|
2024-02-25 13:01:55 +00:00
|
|
|
{{ end }}
|
2024-02-24 20:21:48 +00:00
|
|
|
{{end}}
|
|
|
|
|
2023-07-08 12:51:56 +00:00
|
|
|
{{define "main"}}
|
|
|
|
|
2023-08-05 08:14:05 +00:00
|
|
|
{{ if not .Entry.PublishedAt }}
|
|
|
|
<mark>
|
|
|
|
This entry is a draft. It is only visible to logged in authors.
|
|
|
|
</mark>
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
{{ end }}
|
|
|
|
|
2023-07-13 19:20:00 +00:00
|
|
|
<div class="h-entry">
|
|
|
|
<hgroup>
|
|
|
|
{{if .Entry.Title}}
|
|
|
|
<h1 class="p-name">{{.Entry.Title}}</h1>
|
|
|
|
{{end}}
|
|
|
|
<small>
|
2024-02-24 20:21:48 +00:00
|
|
|
<a class="u-url" href="/posts/{{ .Entry.ID }}/">#</a>
|
2023-07-13 19:20:00 +00:00
|
|
|
Published:
|
2023-08-11 15:37:22 +00:00
|
|
|
{{ if .Entry.PublishedAt }}
|
|
|
|
<time class="dt-published" datetime="{{.Entry.PublishedAt.Format "2006-01-02T15:04:05" }}">
|
|
|
|
{{.Entry.PublishedAt.Format "2006-01-02" }}
|
|
|
|
</time>
|
|
|
|
{{ end }}
|
2023-07-13 19:20:00 +00:00
|
|
|
{{ if .Author.Name }}
|
|
|
|
by
|
|
|
|
<a class="p-author h-card" href="{{.Author.FullUrl}}">
|
|
|
|
{{ if .Author.AvatarUrl }}
|
|
|
|
<img class="u-photo u-logo" style="height: 1em;" src="{{ .Author.AvatarUrl }}" alt="{{ .Author.Config.Title }}" />
|
|
|
|
{{ end }}
|
|
|
|
{{.Author.Name}}
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</small>
|
|
|
|
</hgroup>
|
2023-07-09 17:51:49 +00:00
|
|
|
|
2023-07-25 19:37:26 +00:00
|
|
|
<div class="e-content">
|
|
|
|
{{.Entry.Content}}
|
|
|
|
</div>
|
2023-07-09 17:51:49 +00:00
|
|
|
|
2023-07-13 19:20:00 +00:00
|
|
|
</div>
|
2023-07-09 17:51:49 +00:00
|
|
|
|
2023-08-09 18:36:44 +00:00
|
|
|
{{if .Interactions}}
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<hr>
|
|
|
|
<h4>
|
|
|
|
Interactions
|
|
|
|
</h4>
|
|
|
|
<ul>
|
|
|
|
{{range .Interactions}}
|
|
|
|
<li>
|
|
|
|
{{ .Content }}
|
2023-08-09 18:48:16 +00:00
|
|
|
{{ if $.LoggedIn }}
|
|
|
|
<form method="post" action="/admin/interactions/{{.ID}}/delete/" class="grid">
|
|
|
|
<label for="confirm">
|
|
|
|
Confirm deletion
|
|
|
|
<input type="checkbox" name="confirm" id="confirm" required />
|
|
|
|
</label>
|
|
|
|
<input type="submit" class="secondary outline" value="Delete" />
|
|
|
|
</form>
|
|
|
|
{{ end }}
|
2023-08-09 18:36:44 +00:00
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-25 19:31:03 +00:00
|
|
|
{{ if .LoggedIn }}
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<br>
|
2023-07-25 19:49:09 +00:00
|
|
|
<h3>Actions</h3>
|
2024-01-25 21:12:14 +00:00
|
|
|
|
|
|
|
|
2023-07-25 19:49:09 +00:00
|
|
|
<div class="grid">
|
2024-01-25 21:12:14 +00:00
|
|
|
<div style="margin-bottom:1em;">
|
|
|
|
<a style="width:100%;" href="/editor/edit/{{.Entry.ID}}/" role="button" class="">Edit</a>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<form method="post" action="/editor/unpublish/{{.Entry.ID}}/">
|
|
|
|
<input type="submit" class="secondary" value="Unpublish" />
|
|
|
|
<br>
|
|
|
|
<label for="confirm">
|
|
|
|
Confirm unpublishing
|
|
|
|
<input type="checkbox" name="confirm" id="confirm" required />
|
|
|
|
</label>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<form method="post" action="/editor/delete/{{.Entry.ID}}/">
|
|
|
|
<input type="submit" class="danger" value="Delete" />
|
|
|
|
<br>
|
|
|
|
<label for="confirm">
|
|
|
|
Confirm deletion
|
|
|
|
<input type="checkbox" name="confirm" id="confirm" required />
|
|
|
|
</label>
|
|
|
|
</form>
|
|
|
|
</div>
|
2023-07-25 19:49:09 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2023-07-25 19:31:03 +00:00
|
|
|
{{ end }}
|
|
|
|
|
2023-07-08 12:51:56 +00:00
|
|
|
|
|
|
|
{{end}}
|
|
|
|
|