Hugo Dark Theme Site Generator https://after-dark.habd.as
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.

single.html 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {{ define "header" }}
  2. {{ partial "menu.html" . }}
  3. {{ end }}
  4. {{ define "main" }}
  5. <article itemscope itemtype="http://schema.org/BlogPosting">
  6. {{ template "_internal/schema.html" . }}
  7. <header>
  8. <h1 itemprop="headline">{{ .Title }}</h1>
  9. <p class="muted">
  10. {{ partial "post/meta.html" . }}
  11. </p>
  12. {{ if .Description }}
  13. <blockquote itemprop="description">{{ .Description }}</blockquote>
  14. {{ end }}
  15. {{ if .Resources.GetMatch "header" }}
  16. {{ $image600 := (.Resources.GetMatch "header").Fill "600x338 q60 Center" }}
  17. {{ $image900 := (.Resources.GetMatch "header").Fill "900x506 q70 Center" }}
  18. {{ $image1200 := (.Resources.GetMatch "header").Fill "1200x675 q80 Center" }}
  19. {{ $image1600 := (.Resources.GetMatch "header").Fill "1600x900 q90 Center" }}
  20. <img
  21. alt=""
  22. class="lazyload blur-up"
  23. src="{{ $image600.RelPermalink }}"
  24. data-sizes="auto"
  25. data-src="{{ $image1200.RelPermalink }}"
  26. data-srcset="{{ $image600.RelPermalink }} 600w, {{ $image900.RelPermalink }} 900w, {{ $image1200.RelPermalink }} 1200w, {{ $image1600.RelPermalink }} 1600w"
  27. >
  28. {{ end }}
  29. </header>
  30. {{ partial "toc-maybe.html" . }}
  31. <div itemprop="articleBody">
  32. {{ .Content }}
  33. </div>
  34. {{ if .Site.DisqusShortname }}
  35. <article>
  36. {{ template "_internal/disqus.html" . }}
  37. </article>
  38. {{ end }}
  39. <footer>
  40. <hr>
  41. {{ partial "post/byline.html" . }}
  42. {{ partial "post/related-content.html" . }}
  43. </footer>
  44. </article>
  45. {{ end }}
  46. {{ define "footer" }}
  47. {{ partial "powered-by.html" . }}
  48. {{ end }}