Skip to content

Commit 731086a

Browse files
Merge branch 'main' into tailwind-cli
2 parents a4b9828 + b779957 commit 731086a

8 files changed

Lines changed: 846 additions & 45 deletions

File tree

‎package-lock.json‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"@tailwindcss/postcss7-compat": "^2.2.17",
1313
"axios": "^1.6.2",
1414
"core-js": "^3.8.3",
15+
"marked": "^14.1.2",
16+
"postcss": "^8.4.32",
17+
"tailwindcss": "^3.3.6",
1518
"vue": "^3.2.13",
1619
"vue-analytics": "^5.22.1",
1720
"vue-cli": "^2.9.6",

‎src/components/CouncilPage.vue‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<body class="dark:bg-black">
55
<!-- Section: Design Block -->
6-
<section class="mb-40">
6+
<section class="mb-20">
77
<!-- Jumbotron -->
88
<div
99
class="relative overflow-hidden bg-cover bg-no-repeat"
@@ -19,7 +19,7 @@
1919
<div class="flex h-full items-center justify-center">
2020
<div class="px-6 text-center text-white md:px-12">
2121
<h1
22-
class="mt-2 mb-16 text-5xl font-bold tracking-tight md:text-6xl xl:text-7xl"
22+
class="mt-8 mb-5 text-5xl font-bold tracking-tight md:text-6xl xl:text-7xl"
2323
>
2424
Sundarbans House Council
2525
<br><span class="text-[#eab308]">2023-24</span>
@@ -34,7 +34,7 @@
3434

3535
<!-- upper house council -->
3636
<section class="text-gray-400 py-10 dark:bg-black body-font">
37-
<div class="text-center">
37+
<div class="text-center mt-1 mb-6">
3838
<h1
3939
class="text-2xl font-semibold text-gray-800 capitalize lg:text-3xl dark:text-white"
4040
>
@@ -106,7 +106,7 @@
106106
</section>
107107

108108
<!-- active house council -->
109-
<section class="bg-white dark:bg-black">
109+
<section class=" mt-20 mb-5 bg-white dark:bg-black">
110110
<div class="container px-6 py-10 mx-auto">
111111
<h1
112112
class="text-2xl font-semibold text-center text-gray-800 capitalize lg:text-3xl dark:text-white"
@@ -148,7 +148,7 @@
148148
</section>
149149

150150
<!-- webops team -->
151-
<section class="bg-white dark:bg-black">
151+
<section class=" mt-10 mb-20 bg-white dark:bg-black">
152152
<div class="container px-6 py-10 mx-auto">
153153
<h1
154154
class="text-2xl font-semibold text-center text-gray-800 capitalize lg:text-3xl dark:text-white"
@@ -188,9 +188,10 @@
188188

189189
<section
190190
v-if="graphics"
191-
class="bg-white dark:bg-black"
191+
class="bg-white dark:bg-black mt-10 mb-20 pt-20 pb-20"
192+
192193
>
193-
<div class="container px-6 py-10 mx-auto">
194+
<div class="container px-6 py-10 mx-auto ">
194195
<h1
195196
class="text-2xl font-semibold text-center text-gray-800 capitalize lg:text-3xl dark:text-white"
196197
>
@@ -228,7 +229,7 @@
228229
</section>
229230
<section
230231
v-if="prteam"
231-
class="bg-white dark:bg-black"
232+
class="bg-white dark:bg-black mb-20"
232233
>
233234
<div class="container px-6 py-10 mx-auto">
234235
<h1

‎src/components/GLDashboard.vue‎

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
<template>
2+
<div>
3+
<!-- Dropdown to select search type (Name or Email) -->
4+
<select v-model="searchType">
5+
<option value="name">Name</option>
6+
<option value="email">Email</option>
7+
</select>
8+
9+
<!-- Search bar to filter table -->
10+
<input
11+
type="text"
12+
v-model="searchQuery"
13+
placeholder="Search by selected option"
14+
@input="debouncedSearch"
15+
/>
16+
17+
<!-- Container to make the table vertically scrollable -->
18+
<div class="table-container">
19+
<table>
20+
<thead>
21+
<tr>
22+
<th>Name</th>
23+
<th>Email</th>
24+
<th>Mobile Number</th>
25+
<th>Photo</th>
26+
</tr>
27+
</thead>
28+
<tbody>
29+
<tr v-for="user in filteredUsers" :key="user.email">
30+
<td>{{ user.name }}</td>
31+
<td>{{ user.email }}</td>
32+
<td>{{ user.mobile }}</td>
33+
<td><img :src="user.photo" alt="User Photo" width="50" /></td>
34+
</tr>
35+
</tbody>
36+
</table>
37+
</div>
38+
</div>
39+
</template>
40+
41+
<script>
42+
import _ from 'lodash'; // for debounce
43+
44+
export default {
45+
data() {
46+
return {
47+
searchQuery: "", // The search input from the user
48+
searchType: "name", // Default search type is by name
49+
users: [
50+
{
51+
"name": "Bob Johnson",
52+
"email": "bob@example.com",
53+
"mobile": "456-789-1234",
54+
"photo": "https://via.placeholder.com/50"
55+
},
56+
{
57+
"name": "Alice Smith",
58+
"email": "alice@example.com",
59+
"mobile": "123-456-7890",
60+
"photo": "https://via.placeholder.com/50"
61+
},
62+
{
63+
"name": "Charlie Brown",
64+
"email": "charlie@example.com",
65+
"mobile": "234-567-8901",
66+
"photo": "https://via.placeholder.com/50"
67+
},
68+
{
69+
"name": "David White",
70+
"email": "david@example.com",
71+
"mobile": "345-678-9012",
72+
"photo": "https://via.placeholder.com/50"
73+
},
74+
{
75+
"name": "Emily Davis",
76+
"email": "emily@example.com",
77+
"mobile": "456-789-0123",
78+
"photo": "https://via.placeholder.com/50"
79+
},
80+
{
81+
"name": "Frank Miller",
82+
"email": "frank@example.com",
83+
"mobile": "567-890-1234",
84+
"photo": "https://via.placeholder.com/50"
85+
},
86+
{
87+
"name": "Grace Lee",
88+
"email": "grace@example.com",
89+
"mobile": "678-901-2345",
90+
"photo": "https://via.placeholder.com/50"
91+
},
92+
{
93+
"name": "Henry Wilson",
94+
"email": "henry@example.com",
95+
"mobile": "789-012-3456",
96+
"photo": "https://via.placeholder.com/50"
97+
},
98+
{
99+
"name": "Ivy Moore",
100+
"email": "ivy@example.com",
101+
"mobile": "890-123-4567",
102+
"photo": "https://via.placeholder.com/50"
103+
},
104+
{
105+
"name": "Jack Taylor",
106+
"email": "jack@example.com",
107+
"mobile": "901-234-5678",
108+
"photo": "https://via.placeholder.com/50"
109+
},
110+
{
111+
"name": "Karen Clark",
112+
"email": "karen@example.com",
113+
"mobile": "123-567-8901",
114+
"photo": "https://via.placeholder.com/50"
115+
},
116+
{
117+
"name": "Larry Lewis",
118+
"email": "larry@example.com",
119+
"mobile": "234-678-9012",
120+
"photo": "https://via.placeholder.com/50"
121+
},
122+
{
123+
"name": "Megan Walker",
124+
"email": "megan@example.com",
125+
"mobile": "345-789-0123",
126+
"photo": "https://via.placeholder.com/50"
127+
},
128+
{
129+
"name": "Nathan Harris",
130+
"email": "nathan@example.com",
131+
"mobile": "456-890-1234",
132+
"photo": "https://via.placeholder.com/50"
133+
},
134+
{
135+
"name": "Olivia Martin",
136+
"email": "olivia@example.com",
137+
"mobile": "567-901-2345",
138+
"photo": "https://via.placeholder.com/50"
139+
},
140+
{
141+
"name": "Paul Robinson",
142+
"email": "paul@example.com",
143+
"mobile": "678-012-3456",
144+
"photo": "https://via.placeholder.com/50"
145+
},
146+
{
147+
"name": "Quincy Adams",
148+
"email": "quincy@example.com",
149+
"mobile": "789-123-4567",
150+
"photo": "https://via.placeholder.com/50"
151+
},
152+
{
153+
"name": "Rachel King",
154+
"email": "rachel@example.com",
155+
"mobile": "890-234-5678",
156+
"photo": "https://via.placeholder.com/50"
157+
},
158+
{
159+
"name": "Steve Cooper",
160+
"email": "steve@example.com",
161+
"mobile": "901-345-6789",
162+
"photo": "https://via.placeholder.com/50"
163+
},
164+
{
165+
"name": "Tina Campbell",
166+
"email": "tina@example.com",
167+
"mobile": "123-678-9012",
168+
"photo": "https://via.placeholder.com/50"
169+
}
170+
]
171+
172+
};
173+
},
174+
computed: {
175+
filteredUsers() {
176+
const query = this.searchQuery.toLowerCase();
177+
178+
// Filter based on search type (Name or Email)
179+
return this.users.filter(user => {
180+
if (this.searchType === "name") {
181+
return user.name.toLowerCase().includes(query);
182+
} else if (this.searchType === "email") {
183+
return user.email.toLowerCase().includes(query);
184+
}
185+
});
186+
}
187+
},
188+
methods: {
189+
handleSearch() {
190+
// For now, it searches on the frontend.
191+
// Later, replace this part with an API call to the backend.
192+
},
193+
debouncedSearch: _.debounce(function () {
194+
this.handleSearch();
195+
}, 300) // debounce with a delay of 300ms
196+
}
197+
};
198+
</script>
199+
200+
<style>
201+
/* Container for making the table vertically scrollable */
202+
.table-container {
203+
max-height: 300px; /* Set the height as needed */
204+
overflow-y: auto; /* Enable vertical scrolling */
205+
border: 1px solid #ddd; /* Optional: for better visibility */
206+
position: relative;
207+
}
208+
209+
/* Styling for the table */
210+
table {
211+
width: 100%;
212+
border-collapse: collapse;
213+
}
214+
th, td {
215+
border: 1px solid #ddd;
216+
padding: 8px;
217+
}
218+
219+
/* Fix the table header */
220+
thead th {
221+
position: sticky;
222+
top: 0;
223+
background-color: #f2f2f2;
224+
z-index: 1;
225+
}
226+
227+
/* Optional: Make the header more visible when scrolling */
228+
thead {
229+
background-color: #f8f9fa; /* Slightly different color for visibility */
230+
}
231+
232+
/* Basic table and image styling */
233+
img {
234+
border-radius: 50%;
235+
}
236+
</style>
237+

0 commit comments

Comments
 (0)