Welcome to mirror list, hosted at ThFree Co, Russian Federation.

single.html « posts « layouts « src - github.com/twbs/blog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 107938e76e9859948391b796042add94952de971 (plain)
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
{{ define "main" }}
<div class="posts-container mx-auto my-5">
  <div class="post">
    <h1 class="post-title fw-600">{{ .Page.Title }}</h1>
    {{ partial "author-info" (dict "context" .) -}}

    {{- if .Page.Params.video -}}
      {{- partial "video" (dict "context" .) -}}
    {{- end -}}

    {{- if .Page.Params.banner -}}
      {{- partial "banner" (dict "context" .) -}}
    {{- end -}}

    {{ .Content }}
  </div>

  <div class="related">
    <h2>Related posts</h2>
    <ul class="related-posts list-unstyled">
      {{ $related := .Site.RegularPages.Related . | first 3 -}}
      {{- range $related -}}
      <li>
        <h4>
          <a href="{{ .RelPermalink  }}">
            {{ .Title }}
            <small>{{ .Date | dateFormat "02 Jan 2006" }}</small>
          </a>
        </h4>
      </li>
      {{- end }}
    </ul>
  </div>
</div>
{{- end }}