]> BookStack Code Mirror - website/blob - themes/bookstack/layouts/blog/single.html
Merge pull request #121 from blogmotion/master
[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           {{ partial "signup.html" . }}
28   
29           <div class="text-muted">
30             Want to let me know what you think of BookStack or this post? <br>
31             You can find me on twitter <a href="https://twitter.com/ssddanbrown">@ssddanbrown</a> or on the <a href="https://discord.gg/ztkBqR2">BookStack Discord server</a>. <br>
32             You can <a href="https://github.com/BookStackApp/BookStack/issues">open a suggestion or issue on GitHub</a>.
33           </div>
34   
35           <br>
36   
37         </div>
38       </main>
39     </div>
40
41     <aside class="col-md-3 blog-sidebar-post-list">
42       <h4>Latest Posts</h4>
43       <div class="recent-posts">
44         {{ range first 8 ( where .Site.RegularPages "Section" "blog") }}
45           <a class="blogpost-list-small" href="{{.Permalink}}">
46             <h5 class="text">{{ .Title }}</h5>
47             <time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
48                 {{ .Date.Format "2 Jan 2006" }}
49             </time>
50           </a>
51         {{ end }}
52       </div>
53     </aside>
54
55   </div>
56
57 </div>
58
59 {{ partial "footer.html" . }}