abdullahtarawneh.com/layouts/blog/single.html
2024-03-21 18:04:33 -05:00

67 lines
1.8 KiB
HTML

{{ define "main" }}
<main class="blog">
<div class="container">
<article class="post h-entry">
<header>
<h1 class="title">{{ .Title }}</h1>
<p class="summary">{{.Summary}}</p>
{{ with .Params.cover }}
<img class="cover" src="{{.}}">
{{end}}
</header>
<aside class="meta">
<datetime class="date"> {{ .Date.Format "Mon Jan 2, 2006" }} </datetime>
<p class="wordcount"> {{.WordCount}} words</p>
{{ with .Params.tags }}
<p class="tags-title">Keywords</p>
<ul class="tags">
{{ range . }}
<li><a href='{{"tags/" | absURL }}{{. | urlize}}'>{{.}}</a></li>
{{ end }}
</ul>
{{ end }}
{{- if .Params.series -}}
{{- with index (.GetTerms "series") 0 -}}
<div class="notice--info">
<p>This post is part of the <a href="{{ .Permalink }}" style="font-weight: bold">{{ .LinkTitle }}</a> series.</p>
</div>
{{- end -}}
{{- end -}}
{{ if ne .TableOfContents "<nav id=\"TableOfContents\"></nav>" }}
<p class="toc-title">Table of contents:</p>
{{ .TableOfContents }}
{{ end }}
</aside>
<section class="content">
{{ .Content }}
</section>
<footer>
{{- if .Params.series -}}
<div class="post-series">
{{- $series := or (where .Site.RegularPages.ByDate ".Params.series" "intersect" .Params.series) (where .Site.RegularPages.ByDate ".Params.series" "eq" .Params.series) -}}
{{- with $series -}}
<h3 id="series">This series</h3>
<ol>
{{- range . -}}
<li>
{{- if eq .File.UniqueID $.File.UniqueID -}}
<b>{{ .Title }}</b>
{{- else -}}
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{- end -}}
</li>
{{- end -}}
</ol>
{{- end -}}
</div>
{{- end -}}
</footer>
</article>
</div>
</main>
{{ end }}