You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.6 KiB

4 years ago
  1. {{ define "main" }}
  2. {{ with .Content }}
  3. <div class="index-content">
  4. {{ . }}
  5. </div>
  6. {{ end }}
  7. <div class="posts">
  8. {{ range .Pages }}
  9. <div class="post on-list">
  10. <h1 class="post-title">
  11. <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
  12. </h1>
  13. <div class="post-meta">
  14. <span class="post-date">
  15. {{ .Date.Format "2006-01-02" }}
  16. </span>
  17. {{ with .Params.Author }}
  18. <span class="post-author">:: {{ . }}</span>
  19. {{ end }}
  20. </div>
  21. {{ if .Params.tags }}
  22. <span class="post-tags">
  23. {{ range .Params.tags }}
  24. #<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
  25. {{- . -}}
  26. </a>&nbsp;
  27. {{ end }}
  28. </span>
  29. {{ end }}
  30. {{ if .Params.Cover }}
  31. <img src="{{ .Params.Cover | absURL }}" class="post-cover" alt="{{ .Title | plainify | default " " }}" />
  32. {{ end }}
  33. <div class="post-content">
  34. {{ if .Params.showFullContent }}
  35. {{ .Content | markdownify }}
  36. {{ else if .Description }}
  37. {{ .Description | markdownify }}
  38. {{ else }}
  39. {{ if .Truncated }}
  40. {{ .Summary }}
  41. {{ end }}
  42. {{ end }}
  43. </div>
  44. {{ if not .Params.showFullContent }}
  45. <div>
  46. <a class="read-more button"
  47. href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
  48. </div>
  49. {{ end }}
  50. </div>
  51. {{ end }}
  52. {{ partial "pagination.html" . }}
  53. </div>
  54. {{ end }}