Skip to content

Commit

Permalink
v1.8.1 - Animação no hamburguer do menu flutuante.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarlos-ig committed Apr 14, 2022
1 parent 7c2b780 commit 41c547a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 36 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "igai",
"version": "1.8.0",
"version": "1.8.1",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
2 changes: 1 addition & 1 deletion public/css/styles.min.css

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,38 @@ img {
.hamburger {
width: 32px;
height: 32px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

.hamburger-line {
width: 32px;
height: 3px;
background-color: rgb(var(--light));
border-radius: 4px;
transition: transform 300ms ease-in-out, opacity 300ms ease-in-out;
}

.hamburger-line:nth-child(1) {
transform: translateY(-7px);
}

.hamburger-line:nth-child(3) {
transform: translateY(7px);
}

#menu-open:checked + .menu-open-button .hamburger-line:nth-child(1) {
transform: translateY(3px) rotate(45deg);
}

#menu-open:checked + .menu-open-button .hamburger-line:nth-child(2) {
opacity: 0;
}

#menu-open:checked + .menu-open-button .hamburger-line:nth-child(3) {
transform: translateY(-3px) rotate(-45deg);
}

.menu-item-1 {
Expand Down
19 changes: 3 additions & 16 deletions views/partials/logoutButtonAdmin.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,9 @@
<input type="checkbox" name="menu-open" id="menu-open" class="opacity-0">
<label class="menu-open-button" for="menu-open">
<span class="hamburger">
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-menu"
>
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
</span>
</label>
<button class="menu-item menu-item-1" onclick="window.location='/audit'">
Expand Down
19 changes: 3 additions & 16 deletions views/partials/logoutButtonBasic.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,9 @@
<input type="checkbox" name="menu-open" id="menu-open" class="opacity-0">
<label class="menu-open-button" for="menu-open">
<span class="hamburger">
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-menu"
>
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
</span>
</label>
<button class="menu-item menu-item-3" onclick="window.location='/audit'">
Expand Down

0 comments on commit 41c547a

Please sign in to comment.