diff --git a/assets/scss/components/_nav.scss b/assets/scss/components/_nav.scss index d9c3444d..9ae1ceac 100644 --- a/assets/scss/components/_nav.scss +++ b/assets/scss/components/_nav.scss @@ -1,14 +1,8 @@ -.nav-tabs .nav-tabs { - border: none; +.nav-tabs { + border: none !important; } -.nav-tabs .nav-link.active { - border-bottom-color: var(--bs-body-bg) !important; - border-bottom-style: solid !important; - z-index: 1; -} - -.nav-callout { +.nav-callout, .tab-content { --#{$prefix}nav-callout-bg: var(--#{$prefix}light); --#{$prefix}nav-callout-active-bg: var(--bs-primary-bg-subtle); --#{$prefix}nav-callout-gap: #{$nav-underline-gap}; @@ -92,7 +86,7 @@ @if $enable-dark-mode { @include color-mode(dark) { - .nav-callout { + .nav-callout, .tab-content { --#{$prefix}nav-callout-bg: var(--#{$prefix}tertiary-bg); } diff --git a/data/structures/nav.yml b/data/structures/nav.yml index 38e537e3..b72ac722 100644 --- a/data/structures/nav.yml +++ b/data/structures/nav.yml @@ -7,8 +7,12 @@ arguments: group: partial list: group: partial + nav-disabled: + release: v1.0.0 nav-items: release: v1.0.0 + nav-show: + release: v1.0.0 nav-titles: release: v1.0.0 tab-type: diff --git a/exampleSite/content/en/blog/bootstrap-elements.md b/exampleSite/content/en/blog/bootstrap-elements.md index c0fe2dac..fb492692 100644 --- a/exampleSite/content/en/blog/bootstrap-elements.md +++ b/exampleSite/content/en/blog/bootstrap-elements.md @@ -362,14 +362,14 @@ As an example, the following shortcode displays a tab group with vertically alig {{< example lang="hugo" >}} {{* nav tab-type="pills" vertical="true" */>}} - {{* nav-item title="Nav Item #1" show="true" */>}} + {{* nav-item title="Nav Item #1" */>}} This is the first item's nav body. It supports Markdown content. The item is shown by adding the value `show` to the `class` argument. {{* /nav-item */>}} - {{* nav-item title="Nav Item #2" */>}} + {{* nav-item title="Nav Item #2" show="true" */>}} This is the second item's nav body. {{* /nav-item */>}} - {{* nav-item title="Nav Item #3" */>}} + {{* nav-item title="Nav Item #3" disabled="true" */>}} This is the third item's nav body. {{* /nav-item */>}} {{* /nav */>}} diff --git a/exampleSite/hugo_stats.json b/exampleSite/hugo_stats.json index f58df63d..cf5ea522 100644 --- a/exampleSite/hugo_stats.json +++ b/exampleSite/hugo_stats.json @@ -207,6 +207,7 @@ "d-sm-block", "d-sm-none", "data-table", + "disabled", "display-1", "display-4", "dropdown", @@ -614,16 +615,16 @@ "fab-medium", "fab-whatsapp", "fab-x-twitter", - "faq-34d87c018291b431ca97288bad74039b", - "faq-34d87c018291b431ca97288bad74039b-heading-faq-34d87c018291b431ca97288bad74039b", - "faq-34d87c018291b431ca97288bad74039b-item-0", - "faq-34d87c018291b431ca97288bad74039b-item-1", - "faq-34d87c018291b431ca97288bad74039b-item-2", - "faq-5f40bcb82ce38af994740e507c42561e", - "faq-5f40bcb82ce38af994740e507c42561e-heading-faq-5f40bcb82ce38af994740e507c42561e", - "faq-5f40bcb82ce38af994740e507c42561e-item-0", - "faq-5f40bcb82ce38af994740e507c42561e-item-1", - "faq-5f40bcb82ce38af994740e507c42561e-item-2", + "faq-0a7097f76883a213c55ec2c34a30493c", + "faq-0a7097f76883a213c55ec2c34a30493c-heading-faq-0a7097f76883a213c55ec2c34a30493c", + "faq-0a7097f76883a213c55ec2c34a30493c-item-0", + "faq-0a7097f76883a213c55ec2c34a30493c-item-1", + "faq-0a7097f76883a213c55ec2c34a30493c-item-2", + "faq-f7b9efada37955325b04f32aa6566814", + "faq-f7b9efada37955325b04f32aa6566814-heading-faq-f7b9efada37955325b04f32aa6566814", + "faq-f7b9efada37955325b04f32aa6566814-item-0", + "faq-f7b9efada37955325b04f32aa6566814-item-1", + "faq-f7b9efada37955325b04f32aa6566814-item-2", "fas-1", "fas-2", "fas-3", @@ -703,10 +704,10 @@ "nav-0-0", "nav-0-1", "nav-0-2", + "nav-0-btn-0", + "nav-0-btn-1", + "nav-0-btn-2", "nav-nav-0", - "nav-nav-0-btn-0", - "nav-nav-0-btn-1", - "nav-nav-0-btn-2", "navbar", "navbar-0-collapse", "navbar-mode", diff --git a/go.mod b/go.mod index 1483a451..d0b29182 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/gethinode/mod-simple-datatables v1.1.7 // indirect github.com/gethinode/mod-simple-datatables/v2 v2.0.1 // indirect github.com/gethinode/mod-utils/v3 v3.3.1 // indirect - github.com/gethinode/mod-utils/v4 v4.8.2 // indirect + github.com/gethinode/mod-utils/v4 v4.8.4 // indirect github.com/nextapps-de/flexsearch v0.0.0-20250606060143-c28f52c09b7a // indirect github.com/twbs/bootstrap v5.3.7+incompatible // indirect ) diff --git a/go.sum b/go.sum index 407f23db..20356d1d 100644 --- a/go.sum +++ b/go.sum @@ -448,6 +448,10 @@ github.com/gethinode/mod-utils/v4 v4.8.1 h1:XJULrx5VWO4wR69EsvfPp9bQoRvx8Y7Gwnkn github.com/gethinode/mod-utils/v4 v4.8.1/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4= github.com/gethinode/mod-utils/v4 v4.8.2 h1:mhPmqdeCar2sOdVwKIyJl5la0RVBPtw4d29ncRKN3ek= github.com/gethinode/mod-utils/v4 v4.8.2/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4= +github.com/gethinode/mod-utils/v4 v4.8.3 h1:CSaFR/c1cGrSPpH5ZfrNOoMhAbNb8sw0SCRh9ZxCJTU= +github.com/gethinode/mod-utils/v4 v4.8.3/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4= +github.com/gethinode/mod-utils/v4 v4.8.4 h1:ExD2zZCGonAmbIxC9wBU2dp+V4ZfvG46NWaz+LaV3iQ= +github.com/gethinode/mod-utils/v4 v4.8.4/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4= github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo= github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU= github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg= diff --git a/layouts/_partials/assets/nav-item.html b/layouts/_partials/assets/nav-item.html index 1a89122b..22449812 100644 --- a/layouts/_partials/assets/nav-item.html +++ b/layouts/_partials/assets/nav-item.html @@ -6,16 +6,16 @@ */}} {{/* Initialize arguments */}} -{{ $args := partial "utilities/InitArgs.html" (dict "structure" "nav-item" "args" . "group" "partial") }} -{{ if or $args.err $args.warnmsg }} - {{ partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict +{{- $args := partial "utilities/InitArgs.html" (dict "structure" "nav-item" "args" . "group" "partial") -}} +{{- if or $args.err $args.warnmsg -}} + {{- partial (cond $args.err "utilities/LogErr.html" "utilities/LogWarn.html") (dict "partial" "assets/nav-item.html" "warnid" "warn-invalid-arguments" "msg" "Invalid arguments" "details" ($args.errmsg | append $args.warnmsg) "file" page.File - )}} -{{ end }} + ) -}} +{{- end -}} {{/* Initialize local arguments */}} {{- $parentID := or $args.parentId $args.parentID -}} @@ -36,16 +36,16 @@ "class" "hero-image" "image-overlay" $args.imageOverlay ) }} -{{ else }} - {{ $illustration = partial $args.hook (dict "page" $args.page "image" $args.illustration) }} -{{ end }} +{{- else -}} + {{- $illustration = partial $args.hook (dict "page" $args.page "image" $args.illustration) -}} +{{- end -}} {{/* Main code */}} -{{ if not $args.err }} - {{ if eq $type "accordion" }} +{{- if not $args.err -}} + {{- if eq $type "accordion" -}}