{{ define "main" }}
{{ if not .Params.menu }}
<h1>{{ .Title }}</h1>
{{ if not .Params.hideDate }}
<p class="byline">
  <time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
    {{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
  </time>
  {{ with .Params.author }}· {{.}}{{ end }}
</p>
{{ end }}
{{ end }}
<content>
  {{ .Content }}
</content>
<p>
  {{ range (.GetTerms "tags") }}
    <a class="blog-tags" href="{{ .RelPermalink }}">#{{ lower .LinkTitle }}</a>
  {{ end }}
</p>
{{ if not .Params.hideReply }}
{{ with .Site.Params.author.email }}
  <p>
    <a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'>
      {{ i18n "email-reply" }} ↪
    </a>
  </p>
{{ end }}
{{ end }}
{{ if and .Site.Params.upvotes (not .Params.hideUpvotes) }}
<div class="upvote">
  <button id="upvote-btn" aria-label="Upvote">
    <span id="upvote-chevron">&#8963;</span>
    <span id="upvote-count">—</span>
  </button>
</div>
<script>window.UPVOTE_API = "{{ .Site.Params.upvoteApi }}";</script>
<script src="/upvote.js"></script>
{{ end }}
{{ end }}
