single.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. <link rel="stylesheet" href="/assets/css/navigators/sidebar.css">
  8. {{ end }}
  9. {{ define "navbar" }}
  10. {{ partial "navigators/navbar-2.html" . }}
  11. {{ end }}
  12. {{ define "sidebar" }}
  13. <section class="sidebar-section" id="sidebar-section">
  14. <div class="sidebar-holder">
  15. <div class="sidebar" id="sidebar">
  16. <input type="text" value="" placeholder="Search" data-search="" id="search-box" />
  17. <div class="sidebar-tree">
  18. <ul class="tree" id="tree">
  19. <li id="list-heading"><a href="/posts" data-filter="all">Posts</a></li>
  20. <div class="subtree">
  21. {{ partial "navigators/sidebar.html" (dict "menus" .Site.Menus.sidebar "ctx" .) }}
  22. </div>
  23. </ul>
  24. </div>
  25. </div>
  26. </div>
  27. </section>
  28. {{ end }}
  29. {{ define "content" }}
  30. <section class="content-section" id="content-section">
  31. <div class="content">
  32. <div class="container p-0 read-area">
  33. <!--Hero Area-->
  34. <div class="hero-area col-sm-12" id="hero-area" style='background-image: url({{ strings.TrimSuffix "/" .Site.BaseURL }}{{ partial "helpers/get-hero.html" . }});'>
  35. </div>
  36. <!--Content Start-->
  37. <div class="page-content">
  38. <div class="author-profile ml-auto align-self-lg-center">
  39. <img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}'/>
  40. <h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
  41. <p>{{ .Page.Date.Format "January 2, 2006" }}</p>
  42. </div>
  43. <div class="title">
  44. <h1>{{ .Page.Title }}</h1>
  45. </div>
  46. <div class="post-content" id="post-content">
  47. {{ .Page.Content }}
  48. </div>
  49. <!--- Improve this page button --->
  50. {{ if .Site.Params.GitRepo }}
  51. <div class="btn-improve-page">
  52. <a href="{{ .Site.Params.GitRepo }}/edit/master/content/{{ .File.Path }}">
  53. <i class="fas fa-code-branch"></i>
  54. Improve This Page
  55. </a>
  56. </div>
  57. {{ end }}
  58. <!---Next and Previous Navigator -->
  59. <hr />
  60. {{ partial "navigators/next-prev-navigator.html" . }}
  61. <hr />
  62. <!-- Add Disqus forum -->
  63. {{ if .Site.DisqusShortname }}
  64. {{ partial "disqus.html" . }}
  65. {{ end }}
  66. </div>
  67. </div>
  68. </div>
  69. </section>
  70. {{ end }}
  71. {{ define "toc" }}
  72. <section class="toc-section" id="toc-section">
  73. {{ if site.Params.enableTOC }}
  74. <div class="toc-holder">
  75. <h5 class="text-center pl-3">Table of Contents</h5>
  76. <hr>
  77. <div class="toc">
  78. {{ .TableOfContents }}
  79. </div>
  80. </div>
  81. {{ end }}
  82. </section>
  83. {{ end }}
  84. {{ define "scripts" }}
  85. <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
  86. <script src="/assets/js/single.js"></script>
  87. <script>
  88. hljs.initHighlightingOnLoad();
  89. </script>
  90. {{ if .Params.math }}
  91. {{ partial "math.html" . }}
  92. {{ end }}
  93. {{ end }}