Add a background color to the navbar toggler, better button colors
This commit is contained in:
parent
e5c65068ad
commit
4a4befa2c5
10
index.html
10
index.html
|
@ -24,16 +24,16 @@
|
|||
|
||||
<nav class="navbar navbar-dark bg-dark">
|
||||
<span class="navbar-brand"></span>
|
||||
<button class="btn btn-light navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse"
|
||||
<button class="btn btn-light navbar-toggler toggler-bg-light" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<form class="form-inline">
|
||||
<button class="btn btn-light mr-2 my-1 my-sm-0" type="button" data-Toggle="modal" data-target="#aboutModal"><span class="fas fa-question-circle"></span> About</button>
|
||||
<button class="btn btn-light mr-2 my-1 my-sm-0" type="button" data-Toggle="modal" data-target="#importExportModal"><span class="fas fa-exchange-alt" data-fa-transform="rotate-90"></span> Import/Export</button>
|
||||
<button id="btnEdit" class="btn btn-light mr-2 my-1 my-sm-0" type="button"><span class="fa fa-exclamation-circle"></span> Edit</button>
|
||||
<button class="btn btn-light mr-2 my-1 my-sm-0" type="button" data-toggle="modal" data-target="#newBookmarkModal"><span class="fas fa-plus-circle"></span> Add</button>
|
||||
<button id="btnAbout" class="btn btn-light mr-2 my-1 my-sm-0" type="button" data-Toggle="modal" data-target="#aboutModal"><span class="fas fa-question-circle"></span> About</button>
|
||||
<button id="btnImport" class="btn btn-light mr-2 my-1 my-sm-0" type="button" data-Toggle="modal" data-target="#importExportModal"><span class="fas fa-exchange-alt" data-fa-transform="rotate-90"></span> Import/Export</button>
|
||||
<button id="btnEdit" class="btn btn-light mr-2 my-1 my-sm-0" type="button"><span class="fa fa-pencil-alt"></span> Edit</button>
|
||||
<button id="btnAdd" class="btn btn-light mr-2 my-1 my-sm-0" type="button" data-toggle="modal" data-target="#newBookmarkModal"><span class="fas fa-plus-circle"></span> Add</button>
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
10
js/main.js
10
js/main.js
|
@ -35,12 +35,14 @@ function calcBackground() {
|
|||
|
||||
function setBackground(num, dark) {
|
||||
$("body").css("background-image", "url(img/" + num + ".png)");
|
||||
// dark is a boolean that indicates the brightness of the background
|
||||
|
||||
if (dark) {
|
||||
$(".btn-light").removeClass("btn-light").addClass("btn-dark");
|
||||
$(".navbar").removeClass("navbar-light").addClass("navbar-dark");
|
||||
} else {
|
||||
$(".btn-dark").removeClass("btn-dark").addClass("btn-light");
|
||||
$(".navbar").removeClass("navbar-dark").addClass("navbar-light");
|
||||
$(".navbar-toggler").removeClass("toggler-bg-dark btn-dark").addClass("toggler-bg-light btn-light");
|
||||
} else {
|
||||
$(".navbar").removeClass("navbar-light").addClass("navbar-dark");
|
||||
$(".navbar-toggler").removeClass("toggler-bg-light btn-light").addClass("toggler-bg-dark btn-dark");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue