Skip to content

Commit e757590

Browse files
Added active indicator to nav-items
Allows the user to have SQL that indicates that a navigation bar should be shown as "active" in the shell.
1 parent f205b65 commit e757590

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlpage/templates/shell.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
{{~#if (or (eq (typeof this) 'object') (and (eq (typeof this) 'string') (starts_with this '{')))}}
9595
{{~#with (parse_json this)}}
9696
{{#if (or (or this.title this.icon) this.image)}}
97-
<li class="nav-item{{#if this.submenu}} dropdown{{/if}}">
97+
<li class="nav-item{{#if this.submenu}} dropdown{{/if}}{{#if this.active}} active{{/if}}">
9898
<a class="nav-link {{#if this.submenu}}dropdown-toggle{{/if}}" href="{{#if this.link}}{{this.link}}{{else}}#{{/if}}"
9999
{{~#if this.submenu}} data-bs-toggle="dropdown" data-bs-auto-close="outside" {{/if~}}
100100
{{#if this.target}}target="{{this.target}}"{{/if}}

0 commit comments

Comments
 (0)