Skip to content

Commit faaf5f3

Browse files
committed
fix: add responsive hamburger menu for smaller width devices
1 parent 4c51831 commit faaf5f3

3 files changed

Lines changed: 46 additions & 16 deletions

File tree

web-app/css/styles.css

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3774,10 +3774,6 @@ body.sidebar-collapsed .playground-section {
37743774
width: 100%;
37753775
}
37763776

3777-
.mobile-menu-toggle {
3778-
display: flex;
3779-
}
3780-
37813777
.nav-controls {
37823778
display: none;
37833779
flex-direction: column;
@@ -6580,6 +6576,10 @@ body.sidebar-collapsed .sidebar-dock .sidebar-footer .sidebar-main-controls {
65806576
padding: 0 !important;
65816577
}
65826578

6579+
.hamburger{
6580+
display: none;
6581+
}
6582+
65836583
/* Force 3 equal columns on desktop (when sidebar is expanded OR collapsed) */
65846584
@media (min-width: 1100px) {
65856585

@@ -6611,6 +6611,15 @@ body.sidebar-collapsed .sidebar-dock .sidebar-footer .sidebar-main-controls {
66116611
margin-left: 0 !important;
66126612
width: 100% !important;
66136613
}
6614+
6615+
}
6616+
6617+
@media (max-width: 1280px) {
6618+
6619+
.sticky-filter-bar{
6620+
display:none ;
6621+
}
6622+
66146623
}
66156624

66166625
/* Make cards take full width of their grid cell */
@@ -7158,4 +7167,33 @@ body.sidebar-collapsed .sidebar-dock .sidebar-footer .sidebar-main-controls {
71587167
display: flex !important;
71597168
visibility: visible !important;
71607169
opacity: 1 !important;
7170+
}
7171+
7172+
@media (max-width: 900px) {
7173+
7174+
.mobile-menu-toggle{
7175+
display:flex !important;
7176+
position: fixed;
7177+
top: 16px;
7178+
right: 16px;
7179+
7180+
width:44px;
7181+
height:44px;
7182+
box-shadow: var(--shadow-sm);
7183+
backdrop-filter: blur(18px);
7184+
-webkit-backdrop-filter: blur(18px);
7185+
7186+
align-items:center;
7187+
justify-content:center;
7188+
7189+
border-radius:12px;
7190+
7191+
z-index:9999;
7192+
}
7193+
7194+
.mobile-menu-toggle i{
7195+
font-size:22px;
7196+
color:var(--text);
7197+
}
7198+
71617199
}

web-app/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
</head>
3737

3838
<body class="sidebar-active">
39+
<button type="button" class="mobile-menu-toggle" id="mobileMenuToggle" aria-label="Toggle sidebar"
40+
aria-expanded="true">
41+
<i class="fas fa-bars"></i>
42+
</button>
3943
<button aria-label="Switch theme" class="theme-toggle fixed-theme-toggle" id="fixed-theme-toggle" type="button">
4044
<i class="fas fa-moon" aria-hidden="true"></i>
4145
</button>
@@ -67,10 +71,6 @@
6771
<i class="fas fa-search"></i>
6872
<input aria-label="Search projects" id="navSearchInput" placeholder="Search projects or games..." type="text" />
6973
</div>
70-
<button type="button" class="mobile-menu-toggle" id="mobileMenuToggle" aria-label="Toggle sidebar"
71-
aria-expanded="true">
72-
<i class="fas fa-bars"></i>
73-
</button>
7474
<div class="nav-controls" id="navControls">
7575
<button aria-label="Mute sounds" class="sound-toggle" type="button">
7676
<i class="fas fa-volume-up"></i>

web-app/js/main.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -453,14 +453,6 @@ document.addEventListener("DOMContentLoaded", function () {
453453
});
454454
}
455455

456-
/* ── Mobile Sidebar Toggle ────────────────────────────────── */
457-
if (mobileMenuToggle) {
458-
mobileMenuToggle.addEventListener("click", function (e) {
459-
e.stopPropagation();
460-
document.body.classList.toggle("sidebar-active");
461-
});
462-
}
463-
464456
document.addEventListener("click", function (e) {
465457
if (window.innerWidth < 1100) {
466458
var isClickInsideSidebar = mainSidebar && mainSidebar.contains(e.target);

0 commit comments

Comments
 (0)