blog/layouts/posts/single.html

57 lines
1.8 KiB
HTML
Raw Normal View History

{{ define "title" }}
{{ .Title }} – {{ .Site.Title }}
{{ end }}
{{ define "main" }}
<main id="post" aria-role="main">
<aside>
{{ with (.Params.banner) }}
<img src="{{ . }}" id="banner">
{{ end }}
<h1>
{{ .Title }}
</h1>
<time>
{{ .PublishDate.Format "January 2, 2006" }}
</time>
</aside>
<article>
{{ .Content }}
</article>
</main>
<footer id="byline" class="border">
<section class="post">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="var(--text-color)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z" />
<line x1="16" y1="8" x2="2" y2="22" />
<line x1="17.5" y1="15" x2="9" y2="15" />
</svg>
<span>Written by {{ .Params.author }}</span>
<span>on {{ .PublishDate.Format "January 2, 2006" }}.</span>
</section>
<section class="post">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="24" height="24" viewBox="0 0 24 24" stroke="var(--text-color)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" />
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />
</svg>
<span>Last edited on {{ .Lastmod.Format "January 2, 2006" }}.</span>
</section>
{{ with (.Params.tags) }}
<ul id="tags" class="tags">
{{ range . }}
<li>
<a href="{{ "tags/" | absURL }}{{ . | urlize }}">{{ . }}</a>
</li>
{{ end }}
</ul>
{{ end }}
<a id="top" class="arrow back" href="#">To the top!</a>
</footer>
<div id="toc">
{{ .TableOfContents }}
</div>
{{ end }}