Add 'active' class to active nav item
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{ template "inc_header.html.tpl" . }}
|
||||
{{ template "inc_header.html.tpl" set . "activeNav" "clients" }}
|
||||
<div class="card-body p-0">
|
||||
{{ template "inc_alerts.html.tpl" .alerts }}
|
||||
<h4 class="card-title p-3 border-bottom">Authorized clients</h4>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ template "inc_header.html.tpl" . }}
|
||||
{{ template "inc_header.html.tpl" set . "activeNav" "security" }}
|
||||
<div class="card-body p-0">
|
||||
{{ template "inc_alerts.html.tpl" .alerts }}
|
||||
<h4 class="card-title p-3 border-bottom">Change your password</h4>
|
||||
|
||||
@@ -15,20 +15,19 @@
|
||||
</div>
|
||||
{{ else if .user }}
|
||||
<ul class="nav ml-1 d-flex justify-content-around">
|
||||
{{/* @TO-DO Denis -- apply active class to selected nav item */}}
|
||||
<li class="nav-item active">
|
||||
<li class="nav-item {{ if eq .activeNav "profile" }}active{{ end }}">
|
||||
<a class="nav-link" href="{{ links.Profile }}">Your profile</a>
|
||||
</li>
|
||||
{{ if .settings.LocalEnabled }}
|
||||
<li class="nav-item">
|
||||
<li class="nav-item {{ if eq .activeNav "security" }}active{{ end }}">
|
||||
<a class="nav-link" href="{{ links.ChangePassword }}">Security</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="nav-item">
|
||||
<li class="nav-item {{ if eq .activeNav "sessions" }}active{{ end }}">
|
||||
<a class="nav-link" href="{{ links.Sessions }}">Login sessions</a>
|
||||
</li>
|
||||
{{ if .settings.ExternalEnabled }}
|
||||
<li class="nav-item">
|
||||
<li class="nav-item {{ if eq .activeNav "clients" }}active{{ end }}">
|
||||
<a class="nav-link" href="{{ links.AuthorizedClients }}">Authorized clients</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ template "inc_header.html.tpl" . }}
|
||||
{{ template "inc_header.html.tpl" set . "activeNav" "profile" }}
|
||||
<div class="card-body p-0">
|
||||
{{ template "inc_alerts.html.tpl" .alerts }}
|
||||
<h4 class="card-title p-3 border-bottom">Your profile</h4>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ template "inc_header.html.tpl" . }}
|
||||
{{ template "inc_header.html.tpl" set . "activeNav" "sessions" }}
|
||||
<div class="card-body p-0">
|
||||
{{ template "inc_alerts.html.tpl" .alerts }}
|
||||
<div class="card-title p-3 border-bottom">
|
||||
|
||||
Reference in New Issue
Block a user