Skip to content

Commit

Permalink
Merge pull request #1364 from second1996/front-ui
Browse files Browse the repository at this point in the history
fix: Top bar menu
  • Loading branch information
lee-to authored Dec 11, 2024
2 parents 48db4aa + d35f4dc commit ca82821
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/Laravel/src/Layouts/BaseLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ protected function getTopBarComponent(): Topbar
Burger::make(),
])->class('menu-burger'),
])->class('menu-actions'),
])->customAttributes([
':class' => "asideMenuOpen && '_is-opened'",
]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/UI/dist/assets/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/UI/dist/assets/minimalistic.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/UI/resources/css/base/layout.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Theme layout */
.layout {
&-wrapper {
@apply relative flex min-h-screen flex-col gap-y-5 p-3 transition-all md:p-5 lg:flex-row lg:p-6;
@apply relative flex min-h-screen flex-col gap-y-5 py-3 transition-all md:p-5 lg:flex-row lg:p-6;

/* MOBILEBAR */
/* selector :has not supported */
Expand Down
17 changes: 12 additions & 5 deletions src/UI/resources/css/components/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@

/* Aside horizontal navigation */
.layout-menu-horizontal {
@apply sticky inset-x-0 top-0 z-[100] flex h-[4.5rem] items-center gap-x-5 overflow-x-auto bg-body/80 px-6 transition-colors md:px-10 lg:h-24;
@apply sticky inset-x-0 top-0 z-[100] flex h-[4.5rem] items-center gap-x-5 overflow-x-auto overflow-y-hidden bg-body/80 px-6 transition-colors md:px-10 lg:h-24 lg:overflow-y-auto;

.menu-inner-item-char {
@apply hidden;
Expand All @@ -242,8 +242,10 @@
&._is-opened {
@apply bg-body;

.menu-navigation {
@apply pointer-events-auto visible translate-y-0 opacity-100;
@media (max-width: 1023px) {
.menu-navigation {
@apply pointer-events-auto visible fixed translate-y-0 opacity-100;
}
}
}

Expand Down Expand Up @@ -371,6 +373,10 @@
.menu-inner-divider {
@apply mx-1;
}

.profile-info {
@apply hidden sm:block;
}
}

/* Settings button */
Expand All @@ -387,8 +393,9 @@
@media (max-width: 1023.98px) {
.menu {
&-navigation {
@apply pointer-events-none invisible absolute inset-x-0 top-[4.5rem] -translate-y-2 overflow-x-auto bg-body px-3 pb-8 opacity-0 transition-all md:px-7;
height: calc(100vh - 4.5rem);
--top-space: 4.5rem;
@apply pointer-events-none invisible absolute inset-x-0 top-[--top-space] -translate-y-2 overflow-x-auto bg-body px-3 pb-8 opacity-0 transition-all md:px-7;
height: calc(100vh - var(--top-space));
}

&-inner {
Expand Down
9 changes: 9 additions & 0 deletions src/UI/resources/css/minimalistic.css
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,15 @@ body.theme-minimalistic {
}
}
}

@media (max-width: 1023.98px) {
.menu {
&-navigation {
--top-space: 4rem;
@apply pt-4;
}
}
}
}

/* Mobile menu */
Expand Down

0 comments on commit ca82821

Please sign in to comment.