single.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {{ define "main" }}
  2. <div class="container">
  3. <div class="row my-5 justify-content-center">
  4. <div class="col-12 col-lg-9">
  5. <header>
  6. {{ partial "post-title" . }}
  7. <!-- {{ partial "post-tags" . }} -->
  8. <!-- {{ partial "post-categories" . }} -->
  9. <hr>
  10. </header>
  11. <article class="blog-post content">
  12. <div class="toc-container">
  13. <span class="title">內容目錄</span>
  14. {{ .TableOfContents }}
  15. </div>
  16. <article class="content pt-2">
  17. {{ if eq .Params.image "cover.jpg" }}
  18. {{ else }}
  19. <img src="{{.Params.Image | absURL }}" alt="post-thumb" class="img-fluid rounded float-left mr-5 mb-4">
  20. {{ end }}
  21. {{.Content}}
  22. </article>
  23. <!-- {{ partial "translations.html" . }} -->
  24. <!-- {{ partial "related" . }} -->
  25. <hr>
  26. <a href="javascript:;" onclick="historyBack()" class="back-link mt-4">
  27. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
  28. class="bi bi-chevron-left mb-1" viewBox="0 0 16 16">
  29. <path fill-rule="evenodd"
  30. d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z" />
  31. </svg>
  32. <span>回到上一頁</span>
  33. </a>
  34. </article>
  35. </div>
  36. <div class="col-12 col-lg-3 position-relative mt-2 mt-lg-0">
  37. {{ partial "sidebar.html" . }}
  38. <!-- {{ partial "news-featured.html" . }}
  39. {{ partial "taxonomies.html" . }} -->
  40. </div>
  41. </div>
  42. </div>
  43. {{ end }}