|
71 | 71 | {{#if (or (or title (or icon image)) menu_item)}}
|
72 | 72 | <header id="sqlpage_header">
|
73 | 73 | <nav class="navbar navbar-expand-md navbar-light{{#if fixed_top_menu}} fixed-top{{/if}}">
|
74 |
| - <div class="container-fluid gap-2"> |
| 74 | + <div class="container-fluid gap-2 flex-nowrap justify-content-start" style="min-width:0"> |
75 | 75 | <a class="navbar-brand" href="{{#if link}}{{link}}{{else}}/{{/if}}">
|
76 | 76 | {{#if image}}
|
77 | 77 | <img src="{{image}}" alt="{{title}}" width="32" height="32"
|
|
81 | 81 | {{~icon_img icon~}}
|
82 | 82 | {{/if}}
|
83 | 83 | </a>
|
84 |
| - {{#if title}}<h1 class="mb-0 fs-2 text-truncate"><a class="navbar-brand" href="{{#if link}}{{link}}{{else}}/{{/if}}">{{title}}</a></h1>{{/if}} |
| 84 | + {{#if title}}<h1 class="mb-0 fs-2 text-truncate flex-grow-1"><a href="{{#if link}}{{link}}{{else}}/{{/if}}">{{title}}</a></h1>{{/if}} |
85 | 85 | <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
86 | 86 | data-bs-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false"
|
87 | 87 | aria-label="Toggle navigation">
|
88 | 88 | <span class="navbar-toggler-icon"></span>
|
89 | 89 | </button>
|
90 |
| - <div class="collapse navbar-collapse" id="navbar-menu"> |
91 |
| - <ul class="navbar-nav ms-auto"> |
92 |
| - {{~#each (to_array menu_item)~}} |
93 |
| - {{~#if (or (eq (typeof this) 'object') (and (eq (typeof this) 'string') (starts_with this '{')))}} |
94 |
| - {{~#with (parse_json this)}} |
95 |
| - {{#if (or (or this.title this.icon) this.image)}} |
96 |
| - <li class="nav-item{{#if this.submenu}} dropdown{{/if}}"> |
97 |
| - <a class="nav-link {{#if this.submenu}}dropdown-toggle{{/if}}" href="{{#if this.link}}{{this.link}}{{else}}#{{/if}}" |
98 |
| - {{~#if this.submenu}} data-bs-toggle="dropdown" data-bs-auto-close="outside" {{/if~}} |
99 |
| - role="button" |
100 |
| - > |
101 |
| - {{~#if this.image~}} |
102 |
| - <span {{~#if this.title}} class="me-1"{{/if}}> |
103 |
| - {{~#if (eq this.size 'sm')}} |
104 |
| - <img width=16 height=16 src="{{this.image}}"> |
105 |
| - {{~else~}} |
106 |
| - <img width=24 height=24 src="{{this.image}}"> |
107 |
| - {{~/if~}} |
108 |
| - </span> |
109 |
| - {{~/if~}} |
110 |
| - {{#if this.icon}} |
111 |
| - {{#if this.title}}<span class="me-1">{{/if}} |
112 |
| - {{~icon_img this.icon~}} |
113 |
| - {{#if this.title}}</span>{{/if}} |
114 |
| - {{/if}} |
115 |
| - {{~this.title~}} |
116 |
| - </a> |
117 |
| - {{~#if this.submenu~}} |
118 |
| - <div class="dropdown-menu dropdown-menu-end" data-bs-popper="static"> |
119 |
| - {{~#each this.submenu~}} |
120 |
| - {{#if (or (or this.title this.icon) this.image)}} |
121 |
| - <a class="dropdown-item" href="{{this.link}}"> |
122 |
| - {{~#if this.image~}} |
123 |
| - <span {{~#if this.title}} class="me-1"{{/if}}> |
124 |
| - {{~#if (eq ../this.size 'sm')}} |
125 |
| - <img width=16 height=16 src="{{this.image}}"> |
126 |
| - {{~else~}} |
127 |
| - <img width=24 height=24 src="{{this.image}}"> |
128 |
| - {{~/if~}} |
129 |
| - </span> |
130 |
| - {{~/if~}} |
131 |
| - {{#if this.icon}} |
132 |
| - {{#if this.title}}<span class="me-1">{{/if}} |
133 |
| - {{~icon_img this.icon~}} |
134 |
| - {{#if this.title}}</span>{{/if}} |
135 |
| - {{/if}} |
136 |
| - {{~this.title~}} |
137 |
| - </a> |
138 |
| - {{~/if~}} |
139 |
| - {{~/each~}} |
140 |
| - </div> |
| 90 | + </div> |
| 91 | + <div class="collapse navbar-collapse" id="navbar-menu"> |
| 92 | + <ul class="navbar-nav ms-auto"> |
| 93 | + {{~#each (to_array menu_item)~}} |
| 94 | + {{~#if (or (eq (typeof this) 'object') (and (eq (typeof this) 'string') (starts_with this '{')))}} |
| 95 | + {{~#with (parse_json this)}} |
| 96 | + {{#if (or (or this.title this.icon) this.image)}} |
| 97 | + <li class="nav-item{{#if this.submenu}} dropdown{{/if}}"> |
| 98 | + <a class="nav-link {{#if this.submenu}}dropdown-toggle{{/if}}" href="{{#if this.link}}{{this.link}}{{else}}#{{/if}}" |
| 99 | + {{~#if this.submenu}} data-bs-toggle="dropdown" data-bs-auto-close="outside" {{/if~}} |
| 100 | + role="button" |
| 101 | + > |
| 102 | + {{~#if this.image~}} |
| 103 | + <span {{~#if this.title}} class="me-1"{{/if}}> |
| 104 | + {{~#if (eq this.size 'sm')}} |
| 105 | + <img width=16 height=16 src="{{this.image}}"> |
| 106 | + {{~else~}} |
| 107 | + <img width=24 height=24 src="{{this.image}}"> |
| 108 | + {{~/if~}} |
| 109 | + </span> |
| 110 | + {{~/if~}} |
| 111 | + {{#if this.icon}} |
| 112 | + {{#if this.title}}<span class="me-1">{{/if}} |
| 113 | + {{~icon_img this.icon~}} |
| 114 | + {{#if this.title}}</span>{{/if}} |
141 | 115 | {{/if}}
|
142 |
| - </li> |
143 |
| - {{/if}} |
144 |
| - {{/with}} |
145 |
| - {{~else}} |
146 |
| - {{~#if (gt (len this) 0)~}} |
147 |
| - <li class="nav-item"> |
148 |
| - <a class="nav-link text-capitalize" href="{{this}}.sql">{{this}}</a> |
| 116 | + {{~this.title~}} |
| 117 | + </a> |
| 118 | + {{~#if this.submenu~}} |
| 119 | + <div class="dropdown-menu dropdown-menu-end" data-bs-popper="static"> |
| 120 | + {{~#each this.submenu~}} |
| 121 | + {{#if (or (or this.title this.icon) this.image)}} |
| 122 | + <a class="dropdown-item" href="{{this.link}}"> |
| 123 | + {{~#if this.image~}} |
| 124 | + <span {{~#if this.title}} class="me-1"{{/if}}> |
| 125 | + {{~#if (eq ../this.size 'sm')}} |
| 126 | + <img width=16 height=16 src="{{this.image}}"> |
| 127 | + {{~else~}} |
| 128 | + <img width=24 height=24 src="{{this.image}}"> |
| 129 | + {{~/if~}} |
| 130 | + </span> |
| 131 | + {{~/if~}} |
| 132 | + {{#if this.icon}} |
| 133 | + {{#if this.title}}<span class="me-1">{{/if}} |
| 134 | + {{~icon_img this.icon~}} |
| 135 | + {{#if this.title}}</span>{{/if}} |
| 136 | + {{/if}} |
| 137 | + {{~this.title~}} |
| 138 | + </a> |
| 139 | + {{~/if~}} |
| 140 | + {{~/each~}} |
| 141 | + </div> |
| 142 | + {{/if}} |
149 | 143 | </li>
|
150 |
| - {{~/if~}} |
| 144 | + {{/if}} |
| 145 | + {{/with}} |
| 146 | + {{~else}} |
| 147 | + {{~#if (gt (len this) 0)~}} |
| 148 | + <li class="nav-item"> |
| 149 | + <a class="nav-link text-capitalize" href="{{this}}.sql">{{this}}</a> |
| 150 | + </li> |
151 | 151 | {{~/if~}}
|
152 |
| - {{~/each}} |
153 |
| - </ul> |
154 |
| - {{#if search_target}} |
155 |
| - <form class="d-flex" role="search" action="{{search_target}}"> |
156 |
| - <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" name="search" value="{{search_value}}"> |
157 |
| - <button class="btn btn-outline-success" type="submit">Search</button> |
158 |
| - </form> |
159 |
| - {{/if}} |
160 |
| - </div> |
| 152 | + {{~/if~}} |
| 153 | + {{~/each}} |
| 154 | + </ul> |
| 155 | + {{#if search_target}} |
| 156 | + <form class="d-flex" role="search" action="{{search_target}}"> |
| 157 | + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" name="search" value="{{search_value}}"> |
| 158 | + <button class="btn btn-outline-success" type="submit">Search</button> |
| 159 | + </form> |
| 160 | + {{/if}} |
161 | 161 | </div>
|
162 | 162 | </nav>
|
163 | 163 | </header>
|
|
0 commit comments