{{ define "main" }}

<h1 class="post-title">{{ .Title }}</h1>
    {{ if .Date }}
    <time>{{ .Date.Format "January 2, 2006" }}</time>
    {{ end }}
    {{ $readingTime := div (float .WordCount) .Site.Params.reading_speed }}
    {{ $readingTime = math.Ceil $readingTime }}
    <p class="ettr">{{ i18n "estimated_time_to_read" }}: {{ $readingTime }} {{ i18n "minutes" }}</p>

    <div>
        <p>
        {{ .Content }}
        </p>
    </div>
    {{ template "_internal/disqus.html" . }}

    {{ if .Site.Params.enableKofi }}

        <script type='text/javascript' src='https://ko-fi.com/widgets/widget_2.js'></script>
        <script type='text/javascript'>
            const kofiId = '{{ .Site.Params.Kofi }}';
            kofiwidget2.init('Support Me on Ko-fi', '#29abe0', kofiId);
            kofiwidget2.draw();
        </script> 

    {{ end }}

    <div class="page-footer">
        {{if .Params.tags}}
        <hr class="footer-divider">
        {{ range .Params.tags }}
            <a class="tag" href="{{ "/tags/" | relURL }}{{ . | urlize }}">#{{.}}</a>
        {{ end }}
      {{ end }}
    </div>

{{end}}
