{{ define "main" }}
<div class="container">
    <article>
        <header class="article-header">
            <div class="thumb">
                <div>
                    <h1>{{ .Title }}</h1>
                    <div class="post-meta">
                        <div>
                            {{ $author := .Params.author }}
                            {{ if eq $author nil }}
                              {{ $author = .Site.Params.author }}
                            {{ end }}
                            Por {{ $author  }} | <time>{{ .Date.Format "January 02, 2006" }}</time>
                            | {{ .ReadingTime }} minutos
                        </div>
                        <div class="tags">
                            {{ range (.GetTerms "tags") }}
                            <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
                            {{ end }}
                        </div>
                    </div>
                </div>
            </div>
        </header>
    </article>

    <div class="article-post">
    {{ .Content }}
    </div>
</div>

<div class="container">
    {{ if .Section }}
    <nav class="flex container suggested">
        {{ with .PrevInSection }}
        <a rel="prev" href="{{ .RelPermalink }}" title="Postagem Anterior">
            <span>Anterior</span>
            {{ .Title }}
            </a>
        {{ end }}
        
        {{ with .NextInSection }}
        <a rel="next" href="{{ .RelPermalink }}" title="Próxima Postagem">
            <span>Próxima</span>
            {{ .Title }}
            </a> 
        {{ end }}
    </nav>
    {{ end }}
</div>
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}} 
<div class="container">
    {{ partial "comments/include" . }}
</div>
{{ end }}
</main>

{{ end }}
