]> BookStack Code Mirror - website/blob - themes/bookstack/layouts/blog/single.html
f022bd365d0bfa17961f1ecc1c84d207f71fe3d7
[website] / themes / bookstack / layouts / blog / single.html
1 {{ partial "header.html" . }}
2
3
4   {{ if .Params.image }}
5     <div class="post-image" style="background-image: url({{.Params.image}});"></div>
6   {{ end }}
7
8 <div class="container">
9
10   <div class="row">
11
12     <div class="col-md-9">
13
14       <main class="post-content">
15         <h1>{{.Title}}</h1>
16
17         <p class="post-date text-muted" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
18             {{$author := index .Site.Data.authors (or .Params.author .Site.Params.author)}}
19             {{$authorname := or $author.name .Site.Params.author }}
20             {{$authorthumbnail := or $author.thumbnail .Site.Params.author }}
21             <img class="post-avatar no-border" width="32" src="{{$authorthumbnail}}" alt="{{$authorname}}"> {{$authorname}} posted on the {{ .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }} of {{ .Date.Format "January 2006" }}
22         </p>
23   
24         {{.Content}}
25   
26         <div class="footer-content">
27           <div class="text-muted">
28             Want to let me know what you think of BookStack or this post? <br>
29             You can find me on Mastodon <a href="https://fosstodon.org/@danb">@[email protected]</a> or on the <a href="https://discord.gg/ztkBqR2">BookStack Discord server</a>. <br>
30           </div>
31
32           {{ partial "signup.html" . }}
33   
34         </div>
35       </main>
36     </div>
37
38     <aside class="col-md-3 blog-sidebar-post-list">
39       <h4>Latest Posts</h4>
40       <div class="recent-posts">
41         {{ range first 8 ( where .Site.RegularPages "Section" "blog") }}
42           <a class="blogpost-list-small" href="{{.Permalink}}">
43             <h5 class="text">{{ .Title }}</h5>
44             <time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
45                 {{ .Date.Format "2 Jan 2006" }}
46             </time>
47           </a>
48         {{ end }}
49       </div>
50     </aside>
51
52   </div>
53
54 </div>
55
56 {{ partial "footer.html" . }}