garikikumar commited on
Commit
60d1adc
·
verified ·
1 Parent(s): 6a139f6

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +258 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Service App
3
- emoji: 🐠
4
- colorFrom: indigo
5
  colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: service-app
3
+ emoji: 🐳
4
+ colorFrom: red
5
  colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,258 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Local Services Hub</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .service-card:hover {
11
+ transform: translateY(-5px);
12
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
13
+ }
14
+ .service-card {
15
+ transition: all 0.3s ease;
16
+ }
17
+ .category-chip {
18
+ transition: all 0.2s ease;
19
+ }
20
+ .category-chip:hover {
21
+ transform: scale(1.05);
22
+ }
23
+ .search-bar:focus {
24
+ outline: none;
25
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
26
+ }
27
+ </style>
28
+ </head>
29
+ <body class="bg-gray-50 min-h-screen">
30
+ <!-- Header with gradient background -->
31
+ <header class="bg-gradient-to-r from-blue-600 to-blue-800 text-white py-8 px-4 shadow-lg">
32
+ <div class="container mx-auto text-center">
33
+ <h1 class="text-3xl md:text-4xl font-bold mb-2">Local Services Hub</h1>
34
+ <p class="text-lg md:text-xl opacity-90">Find trusted professionals in your area</p>
35
+ <div class="mt-6 flex justify-center space-x-4">
36
+ <span class="bg-blue-500 bg-opacity-30 px-3 py-1 rounded-full text-sm flex items-center">
37
+ <i class="fas fa-bolt mr-1"></i> Electricians
38
+ </span>
39
+ <span class="bg-blue-500 bg-opacity-30 px-3 py-1 rounded-full text-sm flex items-center">
40
+ <i class="fas fa-tools mr-1"></i> Plumbers
41
+ </span>
42
+ <span class="bg-blue-500 bg-opacity-30 px-3 py-1 rounded-full text-sm flex items-center">
43
+ <i class="fas fa-car mr-1"></i> Mechanics
44
+ </span>
45
+ </div>
46
+ </div>
47
+ </header>
48
+
49
+ <!-- Main Content -->
50
+ <main class="container mx-auto px-4 py-8">
51
+ <!-- Search Section -->
52
+ <div class="max-w-2xl mx-auto mb-10">
53
+ <div class="relative">
54
+ <input
55
+ type="text"
56
+ id="search"
57
+ placeholder="Search for services (electrician, plumber, Electricians, etc.)"
58
+ class="w-full px-5 py-4 rounded-full border border-gray-300 focus:border-blue-500 shadow-sm text-gray-700 placeholder-gray-400 search-bar"
59
+ >
60
+ <button class="absolute right-3 top-1/2 transform -translate-y-1/2 bg-blue-600 text-white p-2 rounded-full hover:bg-blue-700 transition">
61
+ <i class="fas fa-search"></i>
62
+ </button>
63
+ </div>
64
+ </div>
65
+
66
+ <!-- Categories Quick Filter -->
67
+ <div class="mb-10">
68
+ <h2 class="text-xl font-semibold mb-4 text-gray-700">Popular Categories</h2>
69
+ <div class="flex flex-wrap gap-3">
70
+ <button class="category-chip bg-white px-4 py-2 rounded-full shadow-sm border border-gray-200 hover:bg-blue-50 hover:border-blue-200 flex items-center">
71
+ <i class="fas fa-bolt text-yellow-500 mr-2"></i> Electrician
72
+ </button>
73
+ <button class="category-chip bg-white px-4 py-2 rounded-full shadow-sm border border-gray-200 hover:bg-blue-50 hover:border-blue-200 flex items-center">
74
+ <i class="fas fa-tools text-blue-500 mr-2"></i> Plumber
75
+ </button>
76
+ <button class="category-chip bg-white px-4 py-2 rounded-full shadow-sm border border-gray-200 hover:bg-blue-50 hover:border-blue-200 flex items-center">
77
+ <i class="fas fa-car text-gray-600 mr-2"></i> Mechanic
78
+ </button>
79
+ <button class="category-chip bg-white px-4 py-2 rounded-full shadow-sm border border-gray-200 hover:bg-blue-50 hover:border-blue-200 flex items-center">
80
+ <i class="fas fa-paint-roller text-green-500 mr-2"></i> Painter
81
+ </button>
82
+ <button class="category-chip bg-white px-4 py-2 rounded-full shadow-sm border border-gray-200 hover:bg-blue-50 hover:border-blue-200 flex items-center">
83
+ <i class="fas fa-tree text-green-600 mr-2"></i> Gardener
84
+ </button>
85
+ </div>
86
+ </div>
87
+
88
+ <!-- Services List -->
89
+ <div>
90
+ <div class="flex justify-between items-center mb-4">
91
+ <h2 class="text-xl font-semibold text-gray-700">Available Services</h2>
92
+ <div class="flex items-center text-sm text-gray-500">
93
+ <span class="mr-2">Sort by:</span>
94
+ <select class="bg-white border border-gray-300 rounded px-3 py-1 focus:outline-none focus:ring-1 focus:ring-blue-500">
95
+ <option>Distance</option>
96
+ <option>Rating</option>
97
+ <option>Price</option>
98
+ </select>
99
+ </div>
100
+ </div>
101
+
102
+ <div id="service-list" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
103
+ <!-- Service cards will be dynamically inserted here -->
104
+
105
+ <!-- Sample Service Card (will be replaced by dynamic content) -->
106
+ <div class="service-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-100">
107
+ <div class="p-6">
108
+ <div class="flex justify-between items-start">
109
+ <div>
110
+ <span class="inline-block px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-xs font-semibold mb-2">Electrician</span>
111
+ <h3 class="text-xl font-bold text-gray-800 mb-1">Sri Anjaneya Welding Workes</h3>
112
+ </div>
113
+ <div class="flex items-center text-yellow-400">
114
+ <i class="fas fa-star"></i>
115
+ <span class="ml-1 text-gray-600">4.8</span>
116
+ </div>
117
+ </div>
118
+ <div class="flex items-center text-gray-600 mb-3">
119
+ <i class="fas fa-map-marker-alt mr-2 text-blue-500"></i>
120
+ <span>2.5 miles away</span>
121
+ </div>
122
+ <p class="text-gray-600 mb-4">24/7 emergency electrical services with 10 years of experience.</p>
123
+ <div class="flex justify-between items-center">
124
+ <div class="flex items-center">
125
+ <i class="fas fa-phone-alt text-blue-500 mr-2"></i>
126
+ <span class="font-medium">9666009409</span>
127
+ </div>
128
+ <a href="tel:5551234567" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition flex items-center">
129
+ <i class="fas fa-phone mr-2"></i> Call Now
130
+ </a>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </main>
137
+
138
+ <!-- Footer -->
139
+ <footer class="bg-gray-800 text-white py-8 mt-12">
140
+ <div class="container mx-auto px-4">
141
+ <div class="flex flex-col md:flex-row justify-between">
142
+ <div class="mb-6 md:mb-0">
143
+ <h3 class="text-xl font-bold mb-4">Local Services Hub</h3>
144
+ <p class="text-gray-400 max-w-md">Connecting you with trusted local professionals for all your home service needs.</p>
145
+ </div>
146
+ <div class="grid grid-cols-2 gap-8">
147
+ <div>
148
+ <h4 class="font-semibold mb-3">Quick Links</h4>
149
+ <ul class="space-y-2 text-gray-400">
150
+ <li><a href="#" class="hover:text-white transition">Home</a></li>
151
+ <li><a href="#" class="hover:text-white transition">Services</a></li>
152
+ <li><a href="#" class="hover:text-white transition">About Us</a></li>
153
+ <li><a href="#" class="hover:text-white transition">Contact</a></li>
154
+ </ul>
155
+ </div>
156
+ <div>
157
+ <h4 class="font-semibold mb-3">Contact</h4>
158
+ <ul class="space-y-2 text-gray-400">
159
+ <li class="flex items-center"><i class="fas fa-envelope mr-2"></i> contact@localservices.com</li>
160
+ <li class="flex items-center"><i class="fas fa-phone-alt mr-2"></i> 7780175400</li>
161
+ <li class="flex items-center"><i class="fas fa-map-marker-alt mr-2"></i>Tadepalliguedem</li>
162
+ </ul>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ <div class="border-t border-gray-700 mt-8 pt-6 text-center text-gray-400">
167
+ <p>&copy; 2023 Local Services Hub. All rights reserved.</p>
168
+ </div>
169
+ </div>
170
+ </footer>
171
+
172
+ <!-- Firebase SDKs -->
173
+ <script src="https://www.gstatic.com/firebasejs/9.6.1/firebase-app.js"></script>
174
+ <script src="https://www.gstatic.com/firebasejs/9.6.1/firebase-firestore.js"></script>
175
+
176
+ <script>
177
+ // Firebase configuration
178
+ const firebaseConfig = {
179
+ apiKey: "YOUR_API_KEY",
180
+ authDomain: "yourapp.firebaseapp.com",
181
+ projectId: "yourapp",
182
+ storageBucket: "yourapp.appspot.com",
183
+ messagingSenderId: "xxxxxx",
184
+ appId: "xxxxxx"
185
+ };
186
+
187
+ // Initialize Firebase
188
+ const app = firebase.initializeApp(firebaseConfig);
189
+ const db = firebase.firestore();
190
+
191
+ const serviceList = document.getElementById("service-list");
192
+ const searchInput = document.getElementById("search");
193
+ const categoryChips = document.querySelectorAll('.category-chip');
194
+
195
+ // Load and display services from Firestore
196
+ async function loadServices(filter = "") {
197
+ serviceList.innerHTML = '<div class="col-span-full flex justify-center py-12"><div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500"></div></div>';
198
+
199
+ try {
200
+ const snapshot = await db.collection("providers").get();
201
+ serviceList.innerHTML = '';
202
+
203
+ if (snapshot.empty) {
204
+ serviceList.innerHTML = '<div class="col-span-full text-center py-12 text-gray-500">No services found. Try a different search.</div>';
205
+ return;
206
+ }
207
+
208
+ snapshot.forEach(doc => {
209
+ const service = doc.data();
210
+ if (service.type.toLowerCase().includes(filter.toLowerCase())) {
211
+ const card = document.createElement("div");
212
+ card.className = "service-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-100";
213
+ card.innerHTML = `
214
+ <div class="p-6">
215
+ <div class="flex justify-between items-start">
216
+ <div>
217
+ <span class="inline-block px-3 py-1 ${getCategoryColor(service.type)} rounded-full text-xs font-semibold mb-2">${service.type}</span>
218
+ <h3 class="text-xl font-bold text-gray-800 mb-1">${service.name}</h3>
219
+ </div>
220
+ <div class="flex items-center text-yellow-400">
221
+ <i class="fas fa-star"></i>
222
+ <span class="ml-1 text-gray-600">${service.rating || '4.5'}</span>
223
+ </div>
224
+ </div>
225
+ <div class="flex items-center text-gray-600 mb-3">
226
+ <i class="fas fa-map-marker-alt mr-2 text-blue-500"></i>
227
+ <span>${service.distance || '5'} miles away</span>
228
+ </div>
229
+ <p class="text-gray-600 mb-4">${service.description || 'Professional service with years of experience.'}</p>
230
+ <div class="flex justify-between items-center">
231
+ <div class="flex items-center">
232
+ <i class="fas fa-phone-alt text-blue-500 mr-2"></i>
233
+ <span class="font-medium">${service.phone}</span>
234
+ </div>
235
+ <a href="tel:${service.phone}" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition flex items-center">
236
+ <i class="fas fa-phone mr-2"></i> Call Now
237
+ </a>
238
+ </div>
239
+ </div>
240
+ `;
241
+ serviceList.appendChild(card);
242
+ }
243
+ });
244
+ } catch (error) {
245
+ console.error("Error loading services: ", error);
246
+ serviceList.innerHTML = '<div class="col-span-full text-center py-12 text-red-500">Error loading services. Please try again later.</div>';
247
+ }
248
+ }
249
+
250
+ // Helper function to get category color
251
+ function getCategoryColor(category) {
252
+ const categories = {
253
+ 'Electrician': 'bg-yellow-100 text-yellow-800',
254
+ 'Plumber': 'bg-blue-100 text-blue-800',
255
+ 'Mechanic': 'bg-gray-100 text-gray-800',
256
+ 'Painter': 'bg-green-100 text-green-800',
257
+ 'Gardener': 'bg-emerald-100 text-emerald-
258
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ <!DOCTYPE html> <html// ✅ Replace this with your Firebase project config const firebaseConfig = { apiKey: "YOUR_API_KEY", authDomain: "yourapp.firebaseapp.com", projectId: "yourapp", storageBucket: "yourapp.appspot.com", messagingSenderId: "xxxxxx", appId: "xxxxxx" }; // Init Firebase const app = firebase.initializeApp(firebaseConfig); const db = firebase.firestore(); const serviceList = document.getElementById("service-list"); const searchInput = document.getElementById("search"); // Load and display services from Firestore async function loadServices(filter = "") { serviceList.innerHTML = ""; const snapshot = await db.collection("providers").get(); snapshot.forEach(doc => { const service = doc.data(); if (service.type.toLowerCase().includes(filter.toLowerCase())) { const card = document.createElement("div"); card.className = "card"; card.innerHTML = ` <h3>${service.type}</h3> <p><b>Name:</b> ${service.name}</p> <p><b>Phone:</b> ${service.phone}</p> <a class="btn" href="tel:${service.phone}">Call Now</a> `; serviceList.appendChild(card); } }); } // Search input searchInput.addEventListener("input", (e) => { loadServices(e.target.value); }); // Load all initially loadServices();body { font-family: Arial, sans-serif; background: #f4f4f9; margin: 0; padding: 0; } header { background: #007bff; color: white; text-align: center; padding: 1rem; } .container { padding: 20px; } .search-bar { width: 100%; padding: 10px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 8px; } .card { background: white; padding: 15px; margin-bottom: 15px; border-radius: 10px; box-shadow: 0px 2px 5px rgba(0,0,0,0.1); } .card h3 { margin: 0; color: #007bff; } .btn { display: inline-block; margin-top: 10px; padding: 8px 12px; background: #007bff; color: white; border-radius: 5px; text-decoration: none; } lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Local Services Hub</title> <link rel="stylesheet" href="style.css"> </head> <body> <header> <h1>Local Services Hub</h1> <p>Find Electricians, Plumbers, Mechanics near you!</p> </header> <div class="container"> <input type="text" id="search" class="search-bar" placeholder="Search for a service (e.g. Plumber)"> <div id="service-list"></div> </div> <!-- Firebase SDKs --> <script src="https://www.gstatic.com/firebasejs/9.6.1/firebase-app.js"></script> <script src="https://www.gstatic.com/firebasejs/9.6.1/firebase-firestore.js"></script> <script src="app.js"></script> </body> </html>