Skip to content

Commit

Permalink
Minor nav bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Krucksy committed Nov 22, 2023
1 parent d33f97a commit 94910ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 5 additions & 7 deletions resources/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ body {
background-size: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
width: 100%;
z-index: -2;
transition: right 0.5s ease-in-out;

.bg-gradient {
position: fixed;
Expand Down Expand Up @@ -141,7 +142,7 @@ header {
background-color: $background;
overflow-x: hidden;
padding-top: 60px;
transition: 0.5s;
transition: 0.5s ease-in-out;

a {
padding: 8px 8px 8px 32px;
Expand All @@ -159,14 +160,11 @@ header {
}
}

#body {
transition: margin-right .5s;
}

.openNavBtn {
#openNavBtn {
position: absolute;
top: 20px;
right: 20px;
transition: opacity .5s ease-in-out;

&:hover {
cursor: pointer;
Expand Down
12 changes: 9 additions & 3 deletions resources/views/layout/nav.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<a href="/">Inscription</a>
</nav>

<span onclick="openNav()" class="openNavBtn">
<span onclick="openNav()" id="openNavBtn">
<div class="icon-burger">
<div></div>
<div></div>
Expand All @@ -17,11 +17,17 @@
<script>
function openNav() {
document.getElementById("sideBarNav").style.width = "250px";
document.getElementById("body").style.marginRight = "250px";
document.getElementById("bg-bricks").style.right = "250px";
let openNavBtn = document.getElementById("openNavBtn");
openNavBtn.style.opacity = "0";
openNavBtn.style.cursor = "default";
}
function closeNav() {
document.getElementById("sideBarNav").style.width = "0";
document.getElementById("body").style.marginRight = "0";
document.getElementById("bg-bricks").style.right = "0";
let openNavBtn = document.getElementById("openNavBtn");
openNavBtn.style.opacity = "1";
openNavBtn.style.cursor = "pointer";
}
</script>

0 comments on commit 94910ca

Please sign in to comment.