Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

single.html 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {{ define "header" }}
  2. {{/* We can override any block in the baseof file be defining it in the template */}}
  3. {{ partial "page-header.html" . }}
  4. {{ end }}
  5. {{ define "main" }}
  6. {{ $section := .Site.GetPage "section" .Section }}
  7. <article class="flex-l flex-wrap justify-between mw8 center ph3">
  8. <header class="mt4 w-100">
  9. <p class="f6 b helvetica tracked">
  10. {{/*
  11. CurrentSection allows us to use the section title instead of inferring from the folder.
  12. https://gohugo.io/variables/page/#section-variables-and-methods
  13. */}}
  14. {{with .CurrentSection.Title }}{{. | upper }}{{end}}
  15. </p>
  16. <h1 class="f1 athelas mb1">
  17. {{- .Title -}}
  18. </h1>
  19. {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
  20. <time class="f6 mv4 dib tracked" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
  21. {{- .Date.Format "January 2, 2006" -}}
  22. </time>
  23. {{/*
  24. Show "reading time" and "word count" but only if one of the following are true:
  25. 1) A global config `params` value is set `show_reading_time = true`
  26. 2) A section front matter value is set `show_reading_time = true`
  27. 3) A page front matter value is set `show_reading_time = true`
  28. */}}
  29. {{ if (or (eq (.Param "show_reading_time") true) (eq $section.Params.show_reading_time true) )}}
  30. <span class="f6 mv4 dib tracked"> - {{ .ReadingTime}} minutes read</span>
  31. <span class="f6 mv4 dib tracked"> - {{ .WordCount}} words</span>
  32. {{ end }}
  33. </header>
  34. <section class="nested-copy-line-height lh-copy serif f4 nested-links nested-img mid-gray pr4-l w-two-thirds-l">
  35. {{- .Content -}}
  36. {{- partial "tags.html" . -}}
  37. <div class="mt6">
  38. {{ template "_internal/disqus.html" . }}
  39. </div>
  40. </section>
  41. <aside class="w-30-l mt6-l">
  42. {{- partial "menu-contextual.html" . -}}
  43. </aside>
  44. </article>
  45. {{ end }}