Skip to content

Commit 16441fc

Browse files
authored
feat: add the hb.docs.navs_reduce_font_size parameter, default to true (#809)
Do not reduce submenus font size if `false`
1 parent 8c52d8b commit 16441fc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

hugo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ cache_key = "page.Type"
1414

1515
[params.hb.docs]
1616
date_format = ":date_long"
17+
navs_reduce_font_size = false
1718

1819
# Takes the full width by default.
1920
[params.hb.full_width_types.docs]

layouts/partials/hb/modules/docs/nav.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ <h5 class="offcanvas-title" id="hb-docs-nav-label">
2828
{{- define "walk-docs-tree" }}
2929
{{- $page := .Page }}
3030
{{- $border := default true site.Params.hb.docs.navs_border }}
31+
{{- $reduceFontSize := default true site.Params.hb.docs.navs_reduce_font_size }}
3132
{{- range .Tree }}
3233
{{- $node := . }}
3334
{{- if $node.Page.IsSection }}
@@ -65,7 +66,7 @@ <h5 class="offcanvas-title" id="hb-docs-nav-label">
6566
</div>
6667
{{- with .Children }}
6768
<ul
68-
class="collapse list-unstyled fw-normal small {{ cond $border `ms-1 ps-1 border-start` `ms-2` }}"
69+
class="collapse list-unstyled fw-normal {{ cond $reduceFontSize `small` `` }} {{ cond $border `ms-1 ps-1 border-start` `ms-2` }}"
6970
id="{{ $collapseId }}">
7071
{{- template "walk-docs-tree" (dict "Tree" . "Page" $page) }}
7172
{{- with $node.Page.Params.nav_menus }}

0 commit comments

Comments
 (0)