Fix block overwrite issue for navbar

This commit is contained in:
Jan Eitzinger 2022-02-03 07:25:02 +01:00
parent 7c901a57f9
commit 221fe54545
2 changed files with 24 additions and 23 deletions

View File

@ -69,28 +69,28 @@
{{end}}
{{end}}
</ul>
{{end}}
{{if .Infos.username }}
<div class="d-flex align-items-end">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<form method="post" action="/logout">
<button type="submit" class="btn btn-link nav-link fs-5">
<span class="cc-nav-text">{{ .Infos.username }} Logout</span>
<i class="bi-box-arrow-right"></i>
</button>
</form>
</li>
</ul>
<form class="d-flex my-0" onsubmit="this.action='/search';">
{{if .Infos.admin }}
<input class="form-control me-2" type="search" name="searchId" placeholder="jobId / userId" id="searchId" aria-label="Search">
{{else}}
<input class="form-control me-2" type="search" name="searchId" placeholder="jobId" id="searchId" aria-label="Search">
{{end}}
<button class="btn btn-outline-success fs-6" type="submit">Search</button>
</form>
</div>
{{if .Infos.username }}
<div class="d-flex align-items-end">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<form method="post" action="/logout">
<button type="submit" class="btn btn-link nav-link fs-5">
<span class="cc-nav-text">{{ .Infos.username }} Logout</span>
<i class="bi-box-arrow-right"></i>
</button>
</form>
</li>
</ul>
<form class="d-flex my-0" onsubmit="this.action='/search';">
{{if .Infos.admin }}
<input class="form-control me-2" type="search" name="searchId" placeholder="jobId / userId" id="searchId" aria-label="Search">
{{else}}
<input class="form-control me-2" type="search" name="searchId" placeholder="jobId" id="searchId" aria-label="Search">
{{end}}
<button class="btn btn-outline-success fs-6" type="submit">Search</button>
</form>
</div>
{{end}}
{{end}}
</div>
</nav>

View File

@ -1,4 +1,5 @@
{{define "navigation"}}
{{""}}
{{end}}
{{define "content"}}
@ -32,7 +33,7 @@
<label class="form-label" for="password">Password</label>
<input class="form-control" type="password" id="password" name="password" required/>
</div>
<button type="submit" class="btn btn-success">Login</button>
<button type="submit" class="btn btn-success">Submit</button>
</form>
</div>
</div>