{{ define "main" }}
<main class="content-page container pt-7 pb-5">
    {{ $page := . }}
    <div class="row">
        <div class="col">
            <article>
                <div class="row justify-content-center">
                    <div class="col-lg-8">
                        <div class="meta text-muted mb-3">
                            <p class="created text-muted text-uppercase font-weight-bold mb-1">{{ $page.Date.Format "January 2, 2006" }}</p>
                            <span class="mr-2">{{ $page.WordCount }}</span>
                            <span><i class="fas fa-clock mr-2"></i>{{ T "readingTime" $page.ReadingTime }}</span>
                        </div>

                        <h1>{{ $page.Title }}</h1>
                        {{ partial "authors.html" $page }}
                    </div>
                </div>

                {{- with .Resources.Match "images/banner.svg" -}}
                {{ range . }}
                    <div class="row justify-content-center mb-3">
                        <div class="col-lg-10">
                            <img data-src="{{ .RelPermalink }}" class="img-fluid rounded mx-auto d-block" alt="{{ $page.Title }}" data-aos="zoom-in">
                        </div>
                    </div>
                {{- end -}}
                {{- end -}}

                {{- with $page.Params.tags -}}
                <div class="row justify-content-center">
                    <div class="col-lg-8">
                        <div class="tags my-3">
                            {{- range . -}}
                                <a class="badge badge-pill badge-light border mr-2" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
                                    <i class="fas fa-tag mr-2"></i>{{ . }}
                                </a>
                            {{- end -}}
                        </div>
                    </div>
                </div>
                {{- end -}}

                <div class="row justify-content-center">
                    <div class="col-lg-8">
                        <div class="content">
                            {{ $page.Content }}
                        </div>

                        {{ partial "sharer.html" . }}
                    </div>
                </div>

                <div class="row justify-content-center">
                    <div class="col-lg-8">
                        {{ template "_internal/disqus.html" . }}
                    </div>
                </div>

                {{- if .Site.Params.commento.enable -}}
                <div class="row justify-content-center my-3">
                    <div class="col-lg-8">
                        <div id="commento"></div>
                        <script src="{{ .Site.Params.commento.url }}"></script>
                    </div>
                </div>
                {{- end -}}
            </article>
        </div>
    </div>

    {{ partial "related.html" $page }}
</main>
{{ end }}
