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

#279 feature/ManuNavigationDropdown component #528

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
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
51 changes: 51 additions & 0 deletions frontend/components/menu/MenuNavigationDropdown.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<template>
<div>
<div class="fixed top-12 bg-dark-gray

Check warning on line 3 in frontend/components/menu/MenuNavigationDropdown.vue

View workflow job for this annotation

GitHub Actions / Run PR Frontend Check

Expected a linebreak before this attribute
z-20 w-full h-10 border-b-2 md:hidden bg-light-header dark:bg-dark-header border-light-section-div dark:border-dark-section-div
">
<Listbox v-model="selectedPerson">
<ListboxButton class="flex items-center align-middle text-white

Check warning on line 7 in frontend/components/menu/MenuNavigationDropdown.vue

View workflow job for this annotation

GitHub Actions / Run PR Frontend Check

Expected a linebreak before this attribute
relative w-full py-2 pl-3 pr-10 text-left shadow-md">
<Icon name="bi:person-fill-check" class="w-5 h-5 mr-2 align-middle" aria-hidden="true" />
{{ selectedPerson.name }}
<span
class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2"
>
<Icon name="tabler:chevron-down" class="w-5 h-5 mr-2 align-middle" aria-hidden="true" />

</span>
</ListboxButton>
<ListboxOptions class="bg-dark-gray">
<ListboxOption
v-for="person in people"
:key="person.id"
:value="person"
:disabled="person.unavailable"
class="text-white"
>
{{ person.name }}
</ListboxOption>
</ListboxOptions>
</Listbox>
</div>
</div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { Listbox, ListboxButton, ListboxOptions, ListboxOption } from '@headlessui/vue'
const people = [
{ id: 1, name: 'Durward Reynolds', unavailable: false },
{ id: 2, name: 'Kenton Towne', unavailable: false },
{ id: 3, name: 'Therese Wunsch', unavailable: false },
{ id: 4, name: 'Benedict Kessler', unavailable: true },
{ id: 5, name: 'Katelyn Rohan', unavailable: false },
]
const selectedPerson = ref(people[0])
</script>

<style scoped>
.bg-dark-gray {
background-color: #333;
}
</style>
4 changes: 3 additions & 1 deletion frontend/layouts/sidebar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<HeaderMobile />
<MenuNavigationDropdown />
<SidebarLeft
@mouseover="sidebarHover = true"
@mouseleave="sidebarHover = false"
Expand Down Expand Up @@ -39,7 +40,8 @@

<script setup lang="ts">
const sidebar = useSidebar();
let sidebarHover: boolean;

let sidebarHover: boolean = false;

Check failure on line 44 in frontend/layouts/sidebar.vue

View workflow job for this annotation

GitHub Actions / Run PR Frontend Check

'sidebarHover' is never reassigned. Use 'const' instead

onMounted(() => {
window.addEventListener("resize", handleWindowSizeChange);
Expand Down
Loading