Some changes to navbar

This commit is contained in:
Dorian Zedler 2021-07-11 18:23:14 +02:00
parent 64aeb01b64
commit 0e4695f77a
Signed by: dorian
GPG key ID: 989DE36109AFA354

View file

@ -146,6 +146,14 @@ class LandingpageTheme
$this->_printHeader(); $this->_printHeader();
?> ?>
<style> <style>
.mr-2, .mx-2 {
margin-right: 0.5rem !important;
}
.ml-auto {
margin-left: auto !important;
}
.flex-equal>* { .flex-equal>* {
flex: 1; flex: 1;
} }
@ -161,21 +169,21 @@ class LandingpageTheme
<main> <main>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="#"><?= $this->_trId("globals.title") ?></a> <a href="<?= $this->_globalConfig["basePath"] ?>/manage">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation"> <img class="d-inline-block align-top mr-2" src="<?= $this->_globalConfig['mainIcon'] ?>" alt="" width="40px">
</a>
<a class="navbar-brand" href="<?= $this->_globalConfig["basePath"] ?>/manage"><?= $this->_trId("globals.title") ?></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02"> <div class="collapse navbar-collapse" id="navbarToggler">
<ul class="navbar-nav nav-pills me-auto mb-2 mb-lg-0"> <ul class="navbar-nav ml-auto mb-2 mb-lg-0">
<li class="nav-item"> <li class="nav-item mr-2">
<a class="nav-link active" aria-current="page" href="#"><?= $this->_trId("home.menu.manageTimerLabel") ?></a> <a class="nav-link active" aria-current="page" target="blank" href="<?= $this->_globalConfig["basePath"] ?>/t/<?= $_SESSION["auth"]["username"] ?>"><?= $this->_trId("home.menu.openTimerLabel") ?></a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" target="blank" href="<?= $this->_globalConfig["basePath"] ?>/t/<?= $_SESSION["auth"]["username"] ?>"><?= $this->_trId("home.menu.openTimerLabel") ?></a>
</li> </li>
</ul> </ul>
<form action="logout/submit" method="post" class="d-felx"> <form action="logout/submit" method="post" class="d-felx">
<input type="submit" value="<?= $this->_trId("home.menu.logoutLabel") ?>" class="btn btn-secondary"> <button type="submit" class="btn btn-outline-light"><?= $this->_trId("home.menu.logoutLabel") ?></button>
</form> </form>
</div> </div>
</div> </div>
@ -450,7 +458,6 @@ class LandingpageTheme
for (const button of formButtons) { for (const button of formButtons) {
if (button.type === "submit") { if (button.type === "submit") {
form.addEventListener("submit", () => { form.addEventListener("submit", () => {
console.log(button)
button.innerHTML += ' <div class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></div>' button.innerHTML += ' <div class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></div>'
button.disabled = true button.disabled = true
}) })