My personal website built with Hugo https://mehl.mx
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 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {{ partial "head" . }}
  2. <body>
  3. <div id="wrap">
  4. <!-- Header -->
  5. {{ partial "header" . }}
  6. <div class="container {{ replace (.LinkTitle | lower) " " "_" }}"> <!-- add link title add class -->
  7. <div class="blog-post">
  8. <h1>{{ .Title }}</h1>
  9. </div>
  10. {{ if ne .Params.page true }}
  11. <div class="blog-title">
  12. <h4>
  13. {{ .Date.Format "January 2, 2006" }}
  14. &nbsp;&nbsp;
  15. {{ range .Params.tags }}
  16. <span class="label label-success">{{ . }}</span>
  17. {{ end }}
  18. </h4>
  19. </div>
  20. {{ end }}
  21. <div class="panel panel-default">
  22. <div class="panel-body">
  23. <div class="blogpost">
  24. {{ .Content }}
  25. <!-- only show related posts if param is true, or if it's not a page -->
  26. {{ if or (eq .Params.related true) (ne .Params.page true) }}
  27. <hr>
  28. <div class="related-posts">
  29. <h5>Related Posts</h5>
  30. {{ range first 3 ( where ( where .Site.Pages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags ) "Permalink" "!=" .Permalink ) }}
  31. <div class="row">
  32. <div class="col-sm-4 col-md-4 col-lg-4">
  33. <h6 style="text-align: right">
  34. {{ .Date.Format "January 2, 2006" }}
  35. </h6>
  36. </div>
  37. <div class="col-sm-8 col-md-8 col-lg-8">
  38. <h6 style="text-align: left">
  39. <strong><a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a></strong>
  40. </h6>
  41. </div>
  42. </div>
  43. {{ end }}
  44. </div>
  45. {{ end }}
  46. </div>
  47. </div>
  48. <hr>
  49. {{ partial "social" . }}
  50. </div>
  51. </div>
  52. </div>
  53. <!-- Footer -->
  54. {{ partial "footer" . }}
  55. <!-- JS -->
  56. {{ partial "js" . }}
  57. <!-- Matomo -->
  58. {{ partial "matomo" . }}
  59. </body>
  60. </html>