Make navbar responsive

This does not work currently because we do not include bootstrap js
This commit is contained in:
Jan Eitzinger 2022-02-11 16:51:49 +01:00
parent 992518f2c7
commit e6b664f16c
2 changed files with 78 additions and 71 deletions

View File

@ -103,6 +103,8 @@ func setupRoutes(router *mux.Router, routes []Route) {
route.Title = strings.Replace(route.Title, "<ID>", id.(string), 1)
}
infos["clusters"] = config.Clusters
page := templates.Page{
Title: route.Title,
Config: conf,

View File

@ -23,6 +23,10 @@
<img alt="ClusterCockpit Logo" src="/img/logo.png" class="d-inline-block align-top">
{{end}}
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
{{block "navigation" .}}
<ul class="navbar-nav mr-auto">
{{block "navitem_joblist" .}}
@ -35,16 +39,16 @@
{{end}}
{{if .Infos.admin }}
{{block "navitem_analysis" .}}
<li class="nav-item">
<a class="nav-link fs-5" href="/monitoring/analysis/">
<li class="nav-item ">
<a class="nav-link disabled fs-5" href="/monitoring/analysis/">
<span class="cc-nav-text">Analysis</span>
<i class="bi-graph-up"></i>
</a>
</li>
{{end}}
{{block "navitem_systems" .}}
<li class="nav-item">
<a class="nav-link fs-5" href="/monitoring/systems/">
<li class="nav-item ">
<a class="nav-link disabled fs-5" href="/monitoring/systems/">
<span class="cc-nav-text">Systems</span>
<i class="bi-graph-up"></i>
</a>
@ -77,6 +81,7 @@
{{end}}
{{end}}
</ul>
</div>
{{if .Infos.loginId }}
<div class="d-flex align-items-end">
<ul class="navbar-nav ml-auto">