A fast and simple blog backend.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
mediocre-blog/srv/src/http/tpl/post.html

48 lines
1.4 KiB

{{ define "body" }}
<header id="post-header">
<h1 id="post-headline">
{{ .Payload.Title }}
</h1>
<div class="light">
{{ DateTimeFormat .Payload.PublishedAt }}
&nbsp;&nbsp;
{{ if not .Payload.LastUpdatedAt.IsZero }}
(Updated {{ DateTimeFormat .Payload.LastUpdatedAt }})
&nbsp;&nbsp;
{{ end }}
<em>{{ .Payload.Description }}</em>
</div>
</header>
{{ if (or .Payload.SeriesPrevious .Payload.SeriesNext) }}
<p class="light"><em>
This post is part of a series:<br/>
{{ if .Payload.SeriesPrevious }}
Previously: <a href="{{ PostURL .Payload.SeriesPrevious.ID }}">{{ .Payload.SeriesPrevious.Title }}</a></br>
{{ end }}
{{ if .Payload.SeriesNext }}
Next: <a href="{{ PostURL .Payload.SeriesNext.ID }}">{{ .Payload.SeriesNext.Title }}</a></br>
{{ end }}
</em></p>
{{ end }}
<div id="post-content">
{{ .Payload.Body }}
</div>
{{ if (or .Payload.SeriesPrevious .Payload.SeriesNext) }}
<p class="light"><em>
If you liked this post, consider checking out other posts in the series:<br/>
{{ if .Payload.SeriesPrevious }}
Previously: <a href="{{ PostURL .Payload.SeriesPrevious.ID }}">{{ .Payload.SeriesPrevious.Title }}</a></br>
{{ end }}
{{ if .Payload.SeriesNext }}
Next: <a href="{{ PostURL .Payload.SeriesNext.ID }}">{{ .Payload.SeriesNext.Title }}</a></br>
{{ end }}
</em></p>
{{ end }}
{{ end }}
{{ template "base.html" . }}