Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Navbar Redirect Issues & Missing Icon in Mobile Mode #42

Merged
merged 1 commit into from
Jan 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions kitahack-frontend/src/app/layouts/navbar/navbar.component.html
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
<button (click)="toggleEventNavbar()" type="button"
class="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700">
<span class="sr-only">Open event menu</span>
<svg class="w-6 h-6" fill="none" st1roke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"
<svg class="w-6 h-6" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round"
d="M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 010 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 010-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375z">
@@ -33,8 +33,7 @@

<div class="relative">
<button (click)="toggleEventButton()" type="button"
class="flex items-center text-sm font-semibold leading-6 text-gray-700 gap-x-1 z-index" aria-expanded="false"
[class.focused]="eventButtonOpen" (blur)="eventButtonOpen = false">
class="flex items-center text-sm font-semibold leading-6 text-gray-700 gap-x-1 z-index" aria-expanded="false">
Events
<svg class="flex-none w-5 h-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd"
@@ -47,8 +46,7 @@


<div [ngClass]="eventButtonOpen ? 'absolute' : 'hidden'"
class="z-50 w-screen max-w-md mt-3 overflow-y-scroll bg-white shadow-lg top-full rounded-3xl ring-1 ring-gray-900/5 h-[70vh] right-0"
(focusin)="eventButtonOpen = true" (focusout)="eventButtonOpen = false">
class="z-50 w-screen max-w-md mt-3 overflow-y-scroll bg-white shadow-lg top-full rounded-3xl ring-1 ring-gray-900/5 h-[70vh] right-0">
<div class="p-4">
<div *ngFor="let clientPage of clientPages"
class="relative flex p-4 text-sm leading-6 rounded-lg group gap-x-6 hover:bg-gray-50">
@@ -82,7 +80,7 @@
<div class="relative">
<button (click)="toggleMoreButton()" type="button"
class="flex items-center text-sm font-semibold leading-6 text-gray-700 gap-x-1 z-index" aria-expanded="false"
[class.focused]="moreButtonOpen" (blur)="moreButtonOpen = false">
[class.focused]="moreButtonOpen" (blur)="toggleEventNavbarDelay()">
More
<svg class="flex-none w-5 h-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd"
6 changes: 6 additions & 0 deletions kitahack-frontend/src/app/layouts/navbar/navbar.component.ts
Original file line number Diff line number Diff line change
@@ -30,4 +30,10 @@ export class NavbarComponent {
toggleEventNavbar() {
this.eventNavbarOpen = !this.eventNavbarOpen;
}

toggleEventNavbarDelay() {
setTimeout(() => {
this.eventButtonOpen = false
}, 100);
}
}