{{ define "main" }}
<main class="center mv4 content-width ph3">
  <div class="f3 fw6 heading-color heading-font post-title">{{ .Title }}</div>
  <p class="silver f6 mt1 mb4 post-meta">
    {{ if not .Date.IsZero }}<time>{{ .Date.Format "02 Jan 2006" }}</time> {{ end }}
    {{ if or .Params.tags .Params.categories .Params.series }} | {{ end }}
    {{ if isset .Params "categories" }}
    categories: [ {{ range .Params.categories }}<a href='{{ "/categories/" | relLangURL }}{{ . | urlize }}' class="link silver">{{ . }}</a> {{ end }} ]
    {{ end }}
    {{ if isset .Params "tags" }}
    tags: [ {{ range .Params.tags }}<a href='{{ "/tags/" | relLangURL }}{{ . | urlize }}' class="link silver">{{ . }}</a> {{ end }} ]
    {{ end }}
  </p>
  <div class="lh-copy post-content">{{ .Content }}</div>
</main>
{{ partial "table-of-contents" . }}


<div class="pagination tc tr-l db fixed-l bottom-2-l right-2-l mb3 mb0-l">
  {{ partial "back-to-top.html" . }}<br>
  <p class="mb0 mt2">
  {{ with .PrevInSection }}{{ if . }}<a href="{{ .Permalink }}">prev post</a>{{ end }}{{ end }}
  {{ with .NextInSection }}{{ if . }}<a href="{{ .Permalink }}">next post</a>{{ end }}{{ end }}
  </p>
</div>
{{ end }}