Skip to content

Commit

Permalink
docs: add mobile menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 6, 2024
1 parent eb16570 commit 99608b2
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 12 deletions.
59 changes: 49 additions & 10 deletions docs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,23 @@ img {
}

.github-corner svg {
z-index: 1;
border-bottom: 0;
position: fixed;
right: 0;
text-decoration: none;
top: 0;
z-index: 1;
color: white;
fill: var(--secondary-color);
height: 80px;
width: 80px;
}

.github-corner:hover svg .octo-arm {
opacity: 1;
animation: b 560ms ease-in-out;
}

.github-corner svg {
color: #fff;
fill: var(--secondary-color);
height: 80px;
width: 80px;
}

main {
display: block;
position: relative;
Expand Down Expand Up @@ -214,16 +211,58 @@ body.sticky .sidebar-toggle {
}

@media screen and (max-width: 768px) {
.github-corner,
.sidebar {
position: fixed;
}

.sidebar,
.github-corner svg {
height: 62px !important;
width: 62px !important;
}

.sidebar {
left: -300px;
}

.sidebar-toggle {
cursor: pointer;
display: inherit;
border: 0;
outline: none;
padding: 0 10px;
left: 6px;
transition: opacity 0.3s;
z-index: 4;
position: fixed;
top: 0;
height: 62px;
width: 100%;
background: var(--bg-color);
}

.sidebar-toggle span {
background-color: var(--secondary-color);
display: block;
margin-bottom: 5px;
width: 24px;
height: 3px;
}

body.sidebar-toggle {
display: none;
}

body.close .sidebar,
body.close .content {
transform: translateX(280px);
}

body.close .sidebar-toggle {
background: var(--background-color);
transition: background-color 0.3s;
width: 284px;
}

main {
height: auto;
overflow-x: hidden;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"@commitlint/config-conventional"
],
"rules": {
"body-max-length": [
"body-max-line-length": [
0
]
}
Expand Down
2 changes: 1 addition & 1 deletion static/style.min.css

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

0 comments on commit 99608b2

Please sign in to comment.