book_layout.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {{ $current_page := . }}
  2. {{/* Check whether to show breadcrumb navigation. */}}
  3. {{ $breadcrumb_page_types := site.Params.breadcrumb.page_types | default dict }}
  4. {{ $show_breadcrumb := index $breadcrumb_page_types .Type | default false }}
  5. <div class="container-fluid docs">
  6. <div class="row flex-xl-nowrap">
  7. <div class="col-12 col-md-3 col-xl-2 docs-sidebar">
  8. {{ partial "book_sidebar" . }}
  9. </div>
  10. {{/* Show ToC by default. */}}
  11. {{ if ne .Params.toc false }}
  12. <div class="d-none d-xl-block col-xl-2 docs-toc">
  13. {{ partial "hooks/page_toc_start" . }}
  14. <ul class="nav toc-top">
  15. <li><a href="#" id="back_to_top" class="docs-toc-title">{{ i18n "on_this_page" }}</a></li>
  16. </ul>
  17. {{ .TableOfContents }}
  18. {{ partial "hooks/page_toc_end" . }}
  19. </div>
  20. {{ end }}
  21. <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 docs-content" role="main">
  22. <article class="article">
  23. <div class="docs-article-container">
  24. {{ if $show_breadcrumb }}
  25. {{ partial "breadcrumb" $current_page }}
  26. {{ end }}
  27. <h1>{{ .Title }}</h1>
  28. <div class="article-style">
  29. {{ .Content }}
  30. </div>
  31. {{ partial "tags.html" . }}
  32. {{/* Show next/previous pages by default. */}}
  33. {{ if ne site.Params.book_section_pager false }}
  34. <div class="article-widget">
  35. {{ partial "section_pager" . }}
  36. </div>
  37. {{ end }}
  38. </div>
  39. <div class="body-footer">
  40. <p>{{ i18n "last_updated" }} {{ $.Lastmod.Format site.Params.date_format }}</p>
  41. {{ partial "page_edit" . }}
  42. {{ partial "comments" . }}
  43. {{ partial "page_related" . }}
  44. </div>
  45. </article>
  46. {{ partial "site_footer" . }}
  47. </main>
  48. </div>
  49. </div>