Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

single.html 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. {{ with .Params.author }}
  20. <p class="tracked">
  21. By <strong>{{ . | markdownify }}</strong>
  22. </p>
  23. {{ end }}
  24. {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
  25. <time class="f6 mv4 dib tracked" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
  26. {{- .Date.Format "January 2, 2006" -}}
  27. </time>
  28. {{/*
  29. Show "reading time" and "word count" but only if one of the following are true:
  30. 1) A global config `params` value is set `show_reading_time = true`
  31. 2) A section front matter value is set `show_reading_time = true`
  32. 3) A page front matter value is set `show_reading_time = true`
  33. */}}
  34. {{ if (or (eq (.Param "show_reading_time") true) (eq $section.Params.show_reading_time true) )}}
  35. <span class="f6 mv4 dib tracked"> - {{ .ReadingTime}} minutes read</span>
  36. <span class="f6 mv4 dib tracked"> - {{ .WordCount}} words</span>
  37. {{ end }}
  38. </header>
  39. <section class="nested-copy-line-height lh-copy serif f4 nested-links nested-img mid-gray pr4-l w-two-thirds-l">
  40. {{- .Content -}}
  41. {{- partial "tags.html" . -}}
  42. <div class="mt6">
  43. {{ if .Site.DisqusShortname }}
  44. {{ template "_internal/disqus.html" . }}
  45. {{ end }}
  46. {{ if .Site.Params.commentoEnable }}
  47. {{- partial "commento.html" . -}}
  48. {{ end }}
  49. </div>
  50. </section>
  51. <aside class="w-30-l mt6-l">
  52. {{- partial "menu-contextual.html" . -}}
  53. </aside>
  54. </article>
  55. {{ end }}