single.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {{ define "header" }}
  2. <link
  3. rel="stylesheet"
  4. href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/atom-one-dark.min.css"
  5. />
  6. <link rel="stylesheet" href="/assets/css/single.css" />
  7. {{ end }}
  8. {{ define "navbar" }}
  9. {{ partial "navbar-2.html" (dict "baseURL" .Site.BaseURL "title" .Site.Title "hasToggleButton" false "navBrandURL" "/posts") }}
  10. {{ end }}
  11. {{ define "content" }}
  12. <div class="container p-0 read-area">
  13. <!--Hero Area-->
  14. <div class="hero-area col-sm-12" style='background-image: url({{ strings.TrimSuffix "/" .Site.BaseURL }}{{ partial "helpers/get-hero.html" . }});'>
  15. </div>
  16. <!--Content Start-->
  17. <div class="page-content">
  18. <div class="author-profile ml-auto align-self-lg-center">
  19. <img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}'/>
  20. <h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
  21. <p>{{ .Page.Date.Format "January 2, 2006" }}</p>
  22. </div>
  23. <div class="title">
  24. <h1>{{ .Page.Title }}</h1>
  25. </div>
  26. <div class="post-content" id="post-content">
  27. {{ .Page.Content }}
  28. </div>
  29. <!--- Improve this page button --->
  30. {{ if .Site.Params.GitRepo }}
  31. <div class="btn-improve-page">
  32. <a href="{{ .Site.Params.GitRepo }}/edit/master/content/{{ .File.Path }}">
  33. <i class="fas fa-code-branch"></i>
  34. Improve This Page
  35. </a>
  36. </div>
  37. {{ end }}
  38. <!---Next and Previous Navigator -->
  39. <hr />
  40. {{ partial "next-prev-navigator.html" . }}
  41. <hr />
  42. <!-- Add Disqus forum -->
  43. {{ if .Site.DisqusShortname }}
  44. {{ partial "disqus.html" . }}
  45. {{ end }}
  46. </div>
  47. {{ end }}
  48. {{ define "scripts" }}
  49. <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
  50. <script src="/assets/js/single.js"></script>
  51. <script>
  52. hljs.initHighlightingOnLoad();
  53. </script>
  54. {{ if .Params.math }}
  55. {{ partial "math.html" . }}
  56. {{ end }}
  57. {{ end }}