post.html 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {{ partial "header.html" . }}
  2. {{ partial "navbar.html" . }}
  3. {{ partial "header_image.html" . }}
  4. <div class="universal-wrapper">
  5. <h1>{{ .Title | default (i18n "posts") }}</h1>
  6. {{ with .Content }}
  7. <div class="article-style" itemprop="articleBody">{{ . }}</div>
  8. {{ end }}
  9. {{ $paginator := .Paginate .Data.Pages }}
  10. {{ range $paginator.Pages }}
  11. <div>
  12. {{ if .Params.image }}
  13. <a href="{{ .Permalink }}">
  14. <img src="{{ $.Site.BaseURL }}img/{{ .Params.image }}" class="article-banner">
  15. </a>
  16. {{end}}
  17. <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
  18. {{ partial "article_metadata" (dict "content" . "is_list" 1) }}
  19. <div class="article-style"><p>
  20. {{ if .Params.summary }}
  21. {{ printf "%s" .Params.summary | markdownify }}
  22. {{ else if .Truncated }}
  23. {{ printf "%s" .Summary | markdownify }}
  24. {{ else }}
  25. {{ .Content }}
  26. {{ end }}
  27. </p></div>
  28. </div>
  29. {{ end }}
  30. {{ partial "pagination" . }}
  31. </div>
  32. {{ partial "footer_container.html" . }}
  33. {{ partial "footer.html" . }}