single.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {{ define "header"}}
  2. {{- partial "_shared/navbar.html" . -}}
  3. {{ end }}
  4. {{ define "main" }}
  5. {{- partial "_shared/title.html" . -}}
  6. <div class="main-content">
  7. <!-- Begin Article
  8. ================================================== -->
  9. <div class="container">
  10. <div class="row">
  11. <!-- Post Share -->
  12. <div class="col-md-2 pl-0">
  13. {{- partial "single-partials/share.html" . -}}
  14. </div>
  15. <!-- Post -->
  16. <div class="col-md-9 flex-first flex-md-unordered">
  17. <div class="mainheading">
  18. <!-- Author Box -->
  19. {{if isset .Site.Params.author "name"}}
  20. {{if isset .Site.Params.author "thumbnail"}}
  21. {{if isset .Site.Params.author "description"}}
  22. <div class="row post-top-meta">
  23. <div class="col-xs-12 col-md-3 col-lg-2 text-center text-md-left mb-4 mb-md-0 md-nopad-right">
  24. <img class="author-thumb" src="{{ .Site.Params.author.thumbnail | urlize | relURL}}" alt="{{ .Site.Params.author.name }}">
  25. </div>
  26. <div class="col-xs-12 col-md-9 col-lg-10 text-center text-md-left md-nopad-left">
  27. <a target="_blank" class="link-dark">{{ .Site.Params.author.name }}</a><br>
  28. <span class="author-description">
  29. {{ .Site.Params.author.description }}<br>
  30. <i class="far fa-star"></i>
  31. {{ dateFormat "Jan 2, 2006" .PublishDate }}
  32. <i class="far fa-clock clock"></i>
  33. {{ .ReadingTime }} min read
  34. </span>
  35. </div>
  36. </div>
  37. {{end}}
  38. {{end}}
  39. {{end}}
  40. <!-- Post Title -->
  41. <h1 class="posttitle">{{ .Title }}</h1>
  42. </div>
  43. <!-- Post Featured Image -->
  44. {{$images := .Resources.ByType "image"}}
  45. {{with $images.GetMatch "*cover*" }}
  46. <img class="featured-image img-fluid" src="{{ .Permalink }}" alt="thumbnail for this post">
  47. {{end}}
  48. <!-- End Featured Image -->
  49. <!-- Post Content -->
  50. <div class="article-post">
  51. {{ .Content}}
  52. </div>
  53. <!-- Post Categories -->
  54. <div class="after-post-tags">
  55. <ul class="tags">
  56. {{ range .Params.tags }}
  57. <li>
  58. <a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{.}}</a>
  59. </li>
  60. {{ end }}
  61. </ul>
  62. </div>
  63. <!-- End Categories -->
  64. <!-- Next and PrevPage inside current section -->
  65. <div class="row PageNavigation d-flex justify-content-between font-weight-bold">
  66. {{with .NextInSection}}
  67. <a class="d-block col-md-6" href="{{.Permalink}}"> &laquo; {{.Title}}</a>
  68. {{end}}
  69. {{with .PrevInSection}}
  70. <a class="d-block col-md-6 text-lg-right" href="{{.Permalink}}">{{.Title}} &raquo;</a>
  71. {{end}}
  72. <div class="clearfix"></div>
  73. </div>
  74. <!-- End Next and PrevPage -->
  75. </div>
  76. <!-- End Post -->
  77. </div>
  78. </div>
  79. <!-- End Article
  80. ================================================== -->
  81. {{ if .Params.comments }}
  82. {{- partial "single-partials/comments.html" . -}}
  83. {{ end }}
  84. </div>
  85. {{- partial "_shared/alertbar.html" . -}}
  86. {{ end }}
  87. {{ define "footer"}}
  88. {{- partial "_shared/jumbotron.html" . -}}
  89. {{- partial "_shared/footer.html" . -}}
  90. {{ end }}