[gimp-web-devel/pat/bootstrap] layouts: also add a table of contents to "section" layout.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-web-devel/pat/bootstrap] layouts: also add a table of contents to "section" layout.
- Date: Tue, 13 Sep 2022 19:19:16 +0000 (UTC)
commit e126eafd0e6ef9553199b60c76905491f600256a
Author: Jehan <jehan girinstud io>
Date: Tue Sep 13 21:15:03 2022 +0200
layouts: also add a table of contents to "section" layout.
layouts/_default/section.html | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
index 5bdbbf6..537f27c 100644
--- a/layouts/_default/section.html
+++ b/layouts/_default/section.html
@@ -4,6 +4,14 @@
<section class="{{ .Title | urlize }}-page col-lg-8">
<h1 class="title">{{ .Title }}</h1>
+ {{ if gt .WordCount 400 }}
+ {{ if or (not (isset .Params "toc")) (.Params.toc) }}
+ <div class='col border-bottom border-top pt-2 my-3'>
+ {{ partial "toc.html" . }}
+ </div>
+ {{ end }}
+ {{ end }}
+
{{ .Content }}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]