single.html 2.2 KB
Newer Older
Miykael_xxm's avatar
Miykael_xxm 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
{{ partial "header.html" . }}
    <main id="main">
        <div class="container">
            <div class="row justify-content-center text-center my-5">
                <div class="col-lg-10">
                    {{ range .Params.categories }}
                    <a href="{{ $.Site.BaseURL }}categories/{{ . | urlize }}/" class="d-inline-block link-cta mb-4 text-uppercase">{{ . }}</a>
                    {{ end }}
                    <h1 class="mb-4 text-center">{{ .Title }}</h1>
                    <p class="small mb-5 text-center"><span class="text-uppercase">{{.Date.Format "January 2, 2006"}}</span></p>
                </div>
            </div>
        </div>
        <div class="bg-skew bg-skew-light">
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-lg-8">
                        <article class="pb-2">
                            {{ .Content }}
                            <p class="mt-5 text-center">
                                {{ with .Params.tags }}
                                <span class="text-secondary">Tagged: </span>
                                {{ end }}
                                {{ range .Params.tags }}
                                <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}/" class="link-tag text-dark">#{{ . }}</a>
                                {{ end }}
                            </p>
                        </article>
                        <div class="row pt-5 pb-5">
                            <div class="col-6 text-left">
                            {{ with .PrevInSection }}
                              <a class="text-reset" href="{{ .Permalink }}">&larr; {{ .Title }}</a>
                            {{ end }}
                            </div>
                            <div class="col-6 text-right">
                            {{ with .NextInSection }}
                              <a class="text-reset" href="{{ .Permalink }}">{{ .Title }} &rarr;</a>
                            {{ end }}
                            </div>
                        </div>                                                
                    </div>
                </div>
            </div>
        </div>
    </main>
{{ partial "footer.html" . }}