Skip to content

Commit 7afc6f4

Browse files
committed
made the search bar fit the menu drawer style
1 parent 88e2ccc commit 7afc6f4

File tree

2 files changed

+42
-21
lines changed

2 files changed

+42
-21
lines changed

Diff for: web/optivum-better-schedule-frontend/src/components/Overlay.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</v-navigation-drawer>
3535

3636
<v-slide-x-transition appear>
37-
<v-card class="menu-card rounded-pill pa-8" elevation="8" @click="drawer = !drawer">
37+
<v-card class="menu-card rounded-pill" elevation="8" @click="drawer = !drawer">
3838
<v-btn icon="mdi-menu" :ripple="true" />
3939
</v-card>
4040
</v-slide-x-transition>

Diff for: web/optivum-better-schedule-frontend/src/components/pages/Divisions.vue

+41-20
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!-- Divisions.vue -->
22
<template>
33
<v-slide-y-transition appear>
4-
<v-card class="search-container pa-0elevation-4 rounded-b-lg">
4+
<v-card class="search-container pa-0" elevation="8" rounded="pill">
55
<v-text-field v-model="search" class="search" :label="t('search.division')" prepend-inner-icon="mdi-magnify"
6-
variant="outlined" />
6+
variant="solo" rounded="pill" hide-details="auto" />
77
</v-card>
88
</v-slide-y-transition>
99
<v-slide-y-reverse-transition appear>
@@ -66,53 +66,74 @@ const filteredItems = computed(() => {
6666
overflow: visible;
6767
}
6868

69+
:deep(.search .v-field--variant-solo) {
70+
box-shadow: none !important;
71+
border-color: transparent !important;
72+
}
73+
6974
.search-container {
7075
width: 50%;
71-
margin: auto;
76+
height: 64px;
77+
margin: 16px auto;
7278
display: flex;
7379
justify-content: center;
7480
align-items: center;
7581
z-index: 10;
76-
position: fixed;
77-
top: 0;
78-
padding: 1rem;
79-
}
80-
81-
.v-card {
82-
overflow: visible;
82+
position: sticky;
83+
top: 16px;
84+
padding: 0 1rem;
8385
}
8486

8587
.search {
8688
width: 100%;
87-
max-width: 100%;
88-
margin: 0;
89+
}
90+
91+
.v-card {
92+
overflow: visible;
8993
}
9094

9195
.scrollable-grid {
9296
overflow-y: auto;
93-
width: 100%;
94-
padding: 1rem 0;
97+
width: auto;
9598
background-color: var(--v-background-base);
99+
padding: 1rem;
96100
}
97101

98102
.divisions-grid {
99103
display: grid;
100-
grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
101-
gap: 1.5rem;
104+
grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
105+
gap: 2rem;
102106
justify-content: center;
103107
background-color: var(--v-background-base);
104108
padding: 1.5rem;
105-
margin: 0 auto;
109+
margin: 2rem 2rem 2rem;
106110
width: auto;
107-
margin: 8.5rem 1.5rem 1.5rem;
108111
}
109112

110113
.grid-item {
111-
width: 6rem;
112-
height: 6rem;
114+
width: 7rem;
115+
height: 7rem;
113116
display: flex;
114117
justify-content: center;
115118
align-items: center;
116119
aspect-ratio: 1 / 1;
117120
}
121+
122+
@media (max-width: 1280px) {
123+
.search-container {
124+
padding: 0.75rem;
125+
}
126+
127+
.divisions-grid {
128+
grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
129+
gap: 2rem;
130+
padding: 1rem;
131+
margin: 2rem 2rem 2rem;
132+
}
133+
134+
.grid-item {
135+
width: 5rem;
136+
height: 5rem;
137+
}
138+
}
118139
</style>

0 commit comments

Comments
 (0)