rj1
about | log | files | refs

single.html (1059B) - raw


{{ define "main" }}
<main>
	<article>
		<div class="title">
			<h1 class="title">{{ .Title }}</h1>
            {{ if .Date }}
			<div class="meta">
              posted on {{ dateFormat "Jan 2, 2006" .Date | lower }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}
              {{ if .Lastmod }} 
                {{ if ne .Lastmod .Date }}
                  - last updated on {{ dateFormat "Jan 2, 2006" .Lastmod | lower }}
                {{ end }}
              {{ end }}
            </div>
          {{ end }}
		</div>
		{{ if isset .Params "tldr" }}
		<div class="tldr">
			<strong>tl;dr:</strong>
			{{ .Params.tldr }}
		</div>{{ end }}

		<section class="body">
			{{ .Content }}
		</section>

		<div class="post-tags">
			{{ if ne .Type "page" }}
			{{ if gt .Params.tags 0 }}
			<nav class="nav tags">
				<ul class="tags">
					{{ range .Params.tags }}
					<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
					{{ end }}
				</ul>
			</nav>
			{{ end }}
			{{ end }}
		</div>
	</article>
</main>
{{ end }}