book_layout.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. <ul class="nav toc-top">
  14. <li><a href="#" id="back_to_top" class="docs-toc-title">{{ i18n "on_this_page" }}</a></li>
  15. </ul>
  16. {{ .TableOfContents }}
  17. {{ partial "docs_toc_foot" . }}
  18. </div>
  19. {{ end }}
  20. <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 docs-content" role="main">
  21. <article class="article">
  22. <div class="docs-article-container">
  23. {{ if $show_breadcrumb }}
  24. {{ partial "breadcrumb" $current_page }}
  25. {{ end }}
  26. <h1>{{ .Title }}</h1>
  27. <div class="article-style">
  28. {{ .Content }}
  29. </div>
  30. {{ partial "tags.html" . }}
  31. {{/* Show next/previous pages by default. */}}
  32. {{ if ne site.Params.book_section_pager false }}
  33. <div class="article-widget">
  34. {{ partial "section_pager" . }}
  35. </div>
  36. {{ end }}
  37. </div>
  38. <div class="body-footer">
  39. <p>{{ i18n "last_updated" }} {{ $.Lastmod.Format site.Params.date_format }}</p>
  40. {{ partial "page_edit" . }}
  41. {{ partial "comments" . }}
  42. {{ partial "page_related" . }}
  43. </div>
  44. </article>
  45. {{ partial "site_footer" . }}
  46. </main>
  47. </div>
  48. </div>