diff options
author | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2023-07-31 10:56:54 +0700 |
---|---|---|
committer | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2023-07-31 10:56:54 +0700 |
commit | dcbadc3b6117f23107822d80e2d78a365b3970fe (patch) | |
tree | 752d8916bcac7ec727085cd86de4cd32f52378ee /layouts/partials | |
parent | d49f5c58de9308af15aa1665276eab92fe22ac19 (diff) | |
download | victor-dcbadc3b6117f23107822d80e2d78a365b3970fe.tar.gz |
Add recursive TOC and breadcrumbs navigation
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/breadcrumbs.html | 14 | ||||
-rw-r--r-- | layouts/partials/post-navigation-bottom.html | 1 | ||||
-rw-r--r-- | layouts/partials/post-navigation-top.html | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html new file mode 100644 index 0000000..3dc235b --- /dev/null +++ b/layouts/partials/breadcrumbs.html @@ -0,0 +1,14 @@ +<nav aria-label="breadcrumb" class="breadcrumb"> + <ol> + {{ range .Ancestors.Reverse }} + {{ if in .Params.categories "book" }} + <li> + <a href="{{ .Permalink }}">{{ .LinkTitle }}</a> + </li> + {{ end }} + {{ end }} + <li class="active"> + <a aria-current="page">{{ .LinkTitle }}</a> + </li> + </ol> +</nav> diff --git a/layouts/partials/post-navigation-bottom.html b/layouts/partials/post-navigation-bottom.html new file mode 100644 index 0000000..1fcdfb7 --- /dev/null +++ b/layouts/partials/post-navigation-bottom.html @@ -0,0 +1 @@ +{{ partial "post-navigation.html" .}} diff --git a/layouts/partials/post-navigation-top.html b/layouts/partials/post-navigation-top.html new file mode 100644 index 0000000..3bcc39f --- /dev/null +++ b/layouts/partials/post-navigation-top.html @@ -0,0 +1,2 @@ +{{ partial "breadcrumbs.html" .}} +{{ partial "post-navigation.html" .}} |