diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-05-13 11:47:29 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-05-14 15:22:10 -0600 |
commit | 2929b4279c7a8128bd305290cc4187b6afb11cde (patch) | |
tree | d5ee6a82a21cc3c74c5f5359479b67291b9dbb27 /srv/src/tpl/html/post.html | |
parent | d284fe2d2518c43097c0fea436d2073de14f3ada (diff) |
Implement rendering Posts to html
Diffstat (limited to 'srv/src/tpl/html/post.html')
-rw-r--r-- | srv/src/tpl/html/post.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/srv/src/tpl/html/post.html b/srv/src/tpl/html/post.html new file mode 100644 index 0000000..22a5b97 --- /dev/null +++ b/srv/src/tpl/html/post.html @@ -0,0 +1,48 @@ +{{ define "body" }} + +<header id="post-header"> + <h1 id="post-headline"> + {{ .Title }} + </h1> + <div class="light"> + {{ .PublishedAt.Format "2006-01-02" }} + • + {{ if not .LastUpdatedAt.IsZero }} + (Updated {{ .LastUpdatedAt.Format "2006-01-02" }}) + • + {{ end }} + <em>{{ .Description }}</em> + </div> +</header> + +{{ if (or .SeriesPrevious .SeriesNext) }} +<p class="light"><em> + This post is part of a series:<br/> + {{ if .SeriesPrevious }} + Previously: <a href="{{ .SeriesPrevious.HTTPPath }}">{{ .SeriesPrevious.Title }}</a></br> + {{ end }} + {{ if .SeriesNext }} + Next: <a href="{{ .SeriesNext.HTTPPath }}">{{ .SeriesNext.Title }}</a></br> + {{ end }} +</em></p> +{{ end }} + +<div id="post-content"> + {{ .Body }} +</div> + +{{ if (or .SeriesPrevious .SeriesNext) }} +<p class="light"><em> + If you liked this post, consider checking out other posts in the series:<br/> + {{ if .SeriesPrevious }} + Previously: <a href="{{ .SeriesPrevious.HTTPPath }}">{{ .SeriesPrevious.Title }}</a></br> + {{ end }} + {{ if .SeriesNext }} + Next: <a href="{{ .SeriesNext.HTTPPath }}">{{ .SeriesNext.Title }}</a></br> + {{ end }} +</em></p> +{{ end }} + +{{ end }} + +{{ template "base.html" . }} |