Repository navigation
Expand file tree
/
Copy pathadd-listing.html
More file actions
661 lines (573 loc) · 34.4 KB
/
Copy pathadd-listing.html
File metadata and controls
661 lines (573 loc) · 34.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta property="og:type" content="website">
<meta property="og:description" content="Add your student-friendly property or service to StudentHubHelp.">
<meta property="og:title" content="Add Listing | StudentHubHelp">
<meta name="twitter:card" content="summary_large_image">
<meta property="og:image:alt" content="StudentHubHelp logo and student services">
<meta property="og:image:secure_url" content="https://studenthubhelp.in/logo.png?v=logo-hd-20261029">
<meta name="twitter:image" content="https://studenthubhelp.in/logo.png?v=logo-hd-20261029">
<meta property="og:image" content="https://studenthubhelp.in/logo.png?v=logo-hd-20261029">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Add Listing | StudentHubHelp</title>
<meta name="description" content="Add your student-friendly property or service to StudentHubHelp.">
<meta name="robots" content="noindex,nofollow,noarchive">
<link rel="icon" href="logo.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<style>
:root{--navy:#0b1f3a;--rose:#b52f56;--gold:#b78613;--text:#10233f;--muted:#64748b;--line:#e6eaf0;--soft:#f7f9fc;--success:#16834b;--danger:#c53b4b}
*{box-sizing:border-box}body{margin:0;background:#fff;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{text-decoration:none;color:inherit}
.site-nav{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.97);border-bottom:1px solid #e8edf3;box-shadow:0 4px 18px rgba(15,35,64,.04)}
.nav-inner{max-width:1460px;margin:auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:13px}.brand img{width:54px;height:54px;border-radius:15px;object-fit:cover;border:1px solid #f2cbd6}.brand-title{font-size:24px;font-weight:900;letter-spacing:-.6px;color:#0b1f3a}.brand-sub{font-size:11px;font-weight:900;color:var(--rose);letter-spacing:.7px;text-transform:uppercase}.nav-links{display:flex;align-items:center;gap:4px}.nav-links a{color:#45556d;font-weight:750;padding:11px 13px;border-radius:12px}.nav-links a:hover{background:#f5f7fa;color:#0b1f3a}.nav-links a.active{background:#0b1f3a;color:#fff;padding:12px 18px}
.page{max-width:1180px;margin:auto;padding:42px 22px 64px}.hero{position:relative;overflow:hidden;border:1px solid #e8e4df;border-radius:28px;padding:38px 40px;background:linear-gradient(120deg,#fff 0%,#fff 72%,#fff8f0 100%);box-shadow:0 18px 50px rgba(15,35,64,.08)}.hero:after{content:"";position:absolute;width:230px;height:230px;border-radius:50%;right:-75px;top:-105px;border:1px solid #f1d8b2}.eyebrow{display:inline-flex;align-items:center;gap:8px;color:#9a6b00;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:1.4px}.hero h1{position:relative;z-index:1;margin:10px 0 9px;font-size:clamp(34px,4.5vw,52px);line-height:1.05;letter-spacing:-1.7px;font-weight:950;color:#0b1f3a;max-width:780px}.hero p{position:relative;z-index:1;max-width:760px;color:#607087;font-size:15px;line-height:1.7;margin:0}.journey{position:relative;z-index:1;display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:25px;max-width:850px}.journey-step{padding:12px;border-radius:13px;background:#f8fafc;border:1px solid #e5eaf0;font-size:11px;font-weight:850;color:#42536a;display:flex;align-items:center;gap:8px}.journey-step i{width:24px;height:24px;border-radius:8px;display:grid;place-items:center;background:#fff4d8;color:#a06e00;font-size:10px}.trust-row{display:flex;flex-wrap:wrap;gap:16px;margin-top:17px}.trust{display:flex;align-items:center;gap:7px;color:#68788d;font-size:11px;font-weight:800}.trust i{color:#b78613}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 315px;gap:22px;margin-top:22px}.panel{background:#fff;border:1px solid #e5eaf0;border-radius:24px;box-shadow:0 14px 40px rgba(15,35,64,.07)}.form-panel{padding:28px}.side-panel{padding:22px;height:max-content;position:sticky;top:102px}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:20px}.section-head h2{margin:0;font-size:22px;font-weight:950;color:#10233f}.section-head p{margin:5px 0 0;color:#718096;font-size:12px;line-height:1.6}.step{padding:8px 11px;border-radius:999px;background:#fff7e5;color:#9a6b00;font-size:10px;font-weight:950;border:1px solid #f1dfb7;text-transform:uppercase;letter-spacing:.6px;white-space:nowrap}
.field{margin-bottom:17px}.field label{display:flex;align-items:center;gap:7px;color:#263a55;font-size:12px;font-weight:900;margin-bottom:7px}.required{color:#b52f56}.input,.select,.textarea{width:100%;border:1px solid #dbe2ea;outline:none;background:#fff;color:#10233f;border-radius:13px;padding:13px 14px;font-size:14px;transition:.2s}.textarea{resize:vertical;min-height:108px;line-height:1.55}.input:focus,.select:focus,.textarea:focus{border-color:#c5972b;box-shadow:0 0 0 4px rgba(197,151,43,.10)}.input::placeholder,.textarea::placeholder{color:#9aa7b7}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.hint{font-size:11px;color:#8492a5;margin-top:6px;line-height:1.5}
.category-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin-bottom:23px}.category-card{cursor:pointer;border:1px solid #e0e6ed;background:#fafbfd;border-radius:14px;padding:14px 8px;text-align:center;transition:.2s}.category-card:hover{transform:translateY(-1px);border-color:#d7bd78}.category-card i{display:block;font-size:18px;color:#73849a;margin-bottom:7px}.category-card span{font-size:11px;font-weight:900;color:#53657c}.category-card.selected{border-color:#d5ad48;background:#fff8e8;box-shadow:0 8px 20px rgba(183,134,19,.08)}.category-card.selected i,.category-card.selected span{color:#8e6500}
.notice{padding:14px;border-radius:14px;border:1px solid #eadfbf;background:#fffbf1;color:#59697d;font-size:12px;line-height:1.6}.notice i{color:#a97800;margin-right:7px}.actions{display:flex;gap:11px;margin-top:24px}.btn{min-height:48px;border:0;border-radius:13px;padding:0 18px;font-weight:900;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:9px}.btn-primary{flex:1;background:#0b1f3a;color:#fff;box-shadow:0 10px 24px rgba(11,31,58,.14)}.btn-primary:hover{background:#102b4f}.btn-primary:disabled{opacity:.6}.btn-secondary{background:#f5f7fa;color:#42536a;border:1px solid #dfe5ec}
.status{margin-top:16px;padding:13px 14px;border-radius:13px;font-size:12px;line-height:1.55;display:none}.status.show{display:block}.status.success{color:#176b45;background:#effaf5;border:1px solid #bfe7d3}.status.error{color:#a53543;background:#fff3f4;border:1px solid #f0c8ce}.status.info{color:#53657b;background:#f6f8fb;border:1px solid #e0e6ed}.auth-state{margin-top:18px}
.side-kicker{font-size:10px;color:#a27300;text-transform:uppercase;letter-spacing:1.2px;font-weight:950;margin-bottom:5px}.side-title{font-weight:950;font-size:18px;margin-bottom:6px;color:#10233f}.side-copy{color:#7a899c;font-size:11px;line-height:1.55;margin-bottom:15px}.side-list{display:grid;gap:10px}.side-item{display:flex;gap:11px;padding:12px;border-radius:14px;background:#fafbfd;border:1px solid #e8ecf1}.side-item i{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#fff4d8;color:#9a6b00}.side-item b{display:block;font-size:12px;color:#263a55}.side-item span{display:block;color:#8190a3;font-size:11px;margin-top:3px;line-height:1.45}.verification-note{margin-top:14px;padding:13px;border-radius:14px;background:#f2fbf6;border:1px solid #d2eddd;font-size:11px;color:#63758a;line-height:1.55}.verification-note b{display:block;color:#245b42;margin-bottom:4px}.verification-note i{color:#16834b;margin-right:6px}.account-box{margin-top:14px;padding:14px;border-radius:14px;background:#f7f9fc;border:1px solid #e4e9ef}.account-box .label{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#8795a7;font-weight:900}.account-box .value{margin-top:5px;font-size:13px;font-weight:850;word-break:break-word}.image-preview{display:none;margin-top:12px;border-radius:15px;overflow:hidden;border:1px solid #e0e6ed;background:#f7f9fc;height:180px}.image-preview.show{display:block}.image-preview img{width:100%;height:100%;object-fit:cover;display:block}
.site-footer{border-top:1px solid #e6eaf0;background:#f8fafc}.footer-inner{max-width:1180px;margin:auto;padding:24px 22px;display:flex;align-items:center;justify-content:space-between;gap:20px;color:#65758a;font-size:12px}.footer-brandline{font-weight:900;color:#263a55}.footer-links{display:flex;gap:18px;flex-wrap:wrap}.footer-links a:hover{color:#b52f56}
@media(max-width:900px){.layout{grid-template-columns:1fr}.side-panel{position:static}.category-grid{grid-template-columns:repeat(3,1fr)}.journey{grid-template-columns:1fr 1fr}.nav-links{display:flex;overflow-x:auto;max-width:100%;scrollbar-width:none}.nav-links::-webkit-scrollbar{display:none}}
@media(max-width:600px){.nav-inner{padding:10px 14px}.brand img{width:48px;height:48px}.brand-title{font-size:18px}.brand-sub{font-size:9px}.page{padding:24px 13px 44px}.hero{padding:25px 20px;border-radius:22px}.hero h1{font-size:34px}.journey{grid-template-columns:1fr;gap:7px}.form-panel,.side-panel{padding:19px;border-radius:20px}.grid2{grid-template-columns:1fr;gap:0}.category-grid{grid-template-columns:repeat(2,1fr)}.section-head{align-items:center}.actions{flex-direction:column-reverse}.btn{width:100%}.footer-inner{flex-direction:column;align-items:flex-start}.footer-links{gap:12px}}
</style>
<script src="performance.js" defer></script>
<link rel="preconnect" href="https://idurlccrarznnnqixxsd.supabase.co" crossorigin>
<link rel="stylesheet" href="mobile.css">
<!-- StudentHubHelp homepage-matched background palette (page-specific override) -->
<style id="shh-homepage-navbar-consistency">
/* Page-scoped shared navbar styling based on index.html; page content is untouched. */
body > header.top, body > header.topbar, body > header.nav,
body > header:has(> .nav), body > nav.navbar, body > nav.site-nav {
position: sticky !important; top: 0 !important; z-index: 1000 !important;
width: 100% !important; background: rgba(255,255,255,.96) !important;
color: #172033 !important; border-bottom: 1px solid rgba(185,135,165,.28) !important;
box-shadow: 0 8px 24px rgba(15,23,42,.07) !important;
backdrop-filter: blur(14px);
}
body > header.top .nav, body > header.topbar .nav, body > header.nav .navin,
body > header:has(> .nav) .nav, body > nav.navbar .nav-container,
body > nav.site-nav .nav-inner {
width: min(1240px, calc(100% - 40px)) !important; max-width: 1240px !important;
min-height: 82px !important; margin: 0 auto !important; padding: 12px 0 !important;
display: flex !important; align-items: center !important; justify-content: space-between !important;
gap: 24px !important; box-sizing: border-box !important;
}
body > header.top .brand, body > header.topbar .brand, body > header.nav .brand,
body > header:has(> .nav) .brand, body > nav.navbar .brand, body > nav.site-nav .brand {
display: flex !important; align-items: center !important; gap: 12px !important;
color: #0b1f3a !important; text-decoration: none !important; flex-shrink: 0 !important;
}
body > header.top .brand img, body > header.topbar .brand img, body > header.nav .brand img,
body > header:has(> .nav) .brand img, body > nav.navbar .brand img, body > nav.site-nav .brand img {
width: 48px !important; height: 48px !important; object-fit: contain !important;
border-radius: 12px !important; flex-shrink: 0 !important;
}
body > header.top .brand strong, body > header.topbar .brand strong,
body > header.nav .brand, body > header:has(> .nav) .brand,
body > nav.navbar .brand-title, body > nav.site-nav .brand-title {
font-size: 20px !important; font-weight: 800 !important; letter-spacing: -.35px !important;
color: #0b1f3a !important;
}
body > header.top .brand small, body > header.topbar .brand small,
body > header.nav .brand small, body > header:has(> .nav) .brand small,
body > nav.navbar .brand-subtitle, body > nav.site-nav .brand-sub {
display: block !important; margin-top: 3px !important; font-size: 12px !important;
color: #718096 !important; letter-spacing: .15px !important;
}
body > header.top nav, body > header.topbar nav, body > header.nav nav,
body > header:has(> .nav) nav, body > nav.navbar .nav-links, body > nav.site-nav .nav-links {
display: flex !important; align-items: center !important; justify-content: flex-end !important;
flex-wrap: wrap !important; gap: 6px !important; background: transparent !important;
}
body > header.top nav a, body > header.topbar nav a, body > header.nav nav a,
body > header:has(> .nav) nav a, body > nav.navbar .nav-links a, body > nav.site-nav .nav-links a {
display: inline-flex !important; align-items: center !important; justify-content: center !important;
min-height: 40px !important; padding: 9px 12px !important; border-radius: 10px !important;
color: #40516b !important; background: transparent !important; text-decoration: none !important;
font-size: 14px !important; font-weight: 650 !important; line-height: 1.25 !important;
transition: background .18s ease, color .18s ease, transform .18s ease !important;
}
body > header.top nav a:hover, body > header.topbar nav a:hover, body > header.nav nav a:hover,
body > header:has(> .nav) nav a:hover, body > nav.navbar .nav-links a:hover, body > nav.site-nav .nav-links a:hover,
body > header nav a.active, body > nav .nav-links a.active {
color: #0b1f3a !important; background: #f7eaf1 !important;
}
.shh-navbar-toggle {
display: none; align-items: center; justify-content: center; width: 44px; height: 44px;
border: 1px solid rgba(185,135,165,.45); border-radius: 12px; background: #fff;
color: #0b1f3a; font-size: 23px; cursor: pointer; flex-shrink: 0;
}
@media (max-width: 900px) {
body > header.top .nav, body > header.topbar .nav, body > header.nav .navin,
body > header:has(> .nav) .nav, body > nav.navbar .nav-container,
body > nav.site-nav .nav-inner {
width: calc(100% - 28px) !important; min-height: 72px !important; gap: 10px !important;
flex-wrap: wrap !important; padding: 10px 0 !important;
}
.shh-navbar-toggle { display: inline-flex !important; margin-left: auto !important; }
body > header.top nav, body > header.topbar nav, body > header.nav nav,
body > header:has(> .nav) nav, body > nav.navbar .nav-links, body > nav.site-nav .nav-links {
display: none !important; order: 5 !important; width: 100% !important; flex-direction: column !important;
align-items: stretch !important; gap: 4px !important; padding: 10px !important;
border: 1px solid rgba(185,135,165,.28) !important; border-radius: 16px !important;
background: #fff !important; box-shadow: 0 16px 32px rgba(15,23,42,.12) !important;
}
body > header.top nav.open, body > header.topbar nav.open, body > header.nav nav.open,
body > header:has(> .nav) nav.open, body > nav.navbar .nav-links.open, body > nav.site-nav .nav-links.open {
display: flex !important;
}
body > header.top nav a, body > header.topbar nav a, body > header.nav nav a,
body > header:has(> .nav) nav a, body > nav.navbar .nav-links a, body > nav.site-nav .nav-links a {
width: 100% !important; justify-content: flex-start !important; box-sizing: border-box !important;
}
}
</style>
</head>
<body>
<nav class="site-nav">
<div class="nav-inner">
<a class="brand" href="index.html" aria-label="StudentHubHelp Home">
<img src="logo.png" alt="StudentHubHelp Logo">
<div>
<div class="brand-title">StudentHubHelp</div>
<div class="brand-sub">HOSTEL · TIFFIN · LIBRARY · CAFE · BOOKSTORE</div>
</div>
</a>
<div class="nav-links">
<a href="index.html">Home</a>
<a href="pg-finder.html">Hostel / PG</a>
<a href="tiffin-finder.html">Tiffin / Mess</a>
<a href="library-finder.html">Library</a>
<a href="cafe-finder.html">Cafe</a>
<a href="bookstore-finder.html">Book Store</a>
<a href="user-dashboard.html" class="active">Dashboard</a>
</div>
</div>
</nav>
<main class="page">
<section class="hero">
<div class="eyebrow"><i class="fa-solid fa-building-circle-plus"></i> Owner Listing Center</div>
<h1>List Your Property or Student Service</h1>
<p>
Submit your Hostel / PG, Tiffin / Mess, Library, Cafe or Book Store to StudentHubHelp.
Add accurate details below and send your listing for review before it becomes available to students.
</p>
<div class="journey" aria-label="Listing submission process">
<div class="journey-step"><i class="fa-solid fa-1"></i> Choose Category</div>
<div class="journey-step"><i class="fa-solid fa-2"></i> Add Details</div>
<div class="journey-step"><i class="fa-solid fa-3"></i> Submit for Review</div>
<div class="journey-step"><i class="fa-solid fa-4"></i> Approval & Publish</div>
</div>
</section>
<div id="authState" class="status info auth-state show">
<i class="fa-solid fa-spinner fa-spin"></i> Checking your owner account…
</div>
<section class="layout" id="contentLayout" style="display:none">
<div class="panel form-panel">
<div class="section-head">
<div>
<h2>Listing Information</h2>
<p>Choose the right category and provide accurate information students can rely on.</p>
</div>
<div class="step">Owner submission</div>
</div>
<div class="category-grid" id="categoryGrid">
<button type="button" class="category-card selected" data-value="hostel">
<i class="fa-solid fa-house"></i><span>Hostel / PG</span>
</button>
<button type="button" class="category-card" data-value="tiffin">
<i class="fa-solid fa-bowl-food"></i><span>Tiffin / Mess</span>
</button>
<button type="button" class="category-card" data-value="library">
<i class="fa-solid fa-book-open"></i><span>Library</span>
</button>
<button type="button" class="category-card" data-value="cafe">
<i class="fa-solid fa-mug-hot"></i><span>Cafe</span>
</button>
<button type="button" class="category-card" data-value="bookstore">
<i class="fa-solid fa-book"></i><span>Book Store</span>
</button>
</div>
<form id="listingForm" novalidate>
<input type="hidden" id="fCategory" value="hostel">
<div class="grid2">
<div class="field">
<label for="fName">Business / Property Name <span class="required">*</span></label>
<input id="fName" class="input" required maxlength="120" placeholder="e.g. Sharma Boys Hostel">
</div>
<div class="field">
<label for="fArea">Area / District / State <span class="required">*</span></label>
<input id="fArea" class="input" required maxlength="150" placeholder="e.g. Sector 15, Hisar">
</div>
<div class="field">
<label for="fCity">City <span class="required">*</span></label>
<input id="fCity" class="input" required maxlength="100" autocomplete="address-level2" placeholder="Enter actual city, e.g. Hisar">
</div>
</div>
<div class="field">
<label for="fAddress">Full Address <span class="required">*</span></label>
<textarea id="fAddress" class="textarea" required maxlength="500" placeholder="Enter the complete address, landmark, road, area, city and state."></textarea>
</div>
<div class="grid2">
<div class="field">
<label for="fPhone">Business Phone <span class="required">*</span></label>
<input id="fPhone" class="input" required maxlength="20" inputmode="tel" placeholder="10 digit mobile number">
<div class="hint">Use the phone number that students can contact for this listing.</div>
</div>
<div class="field">
<label for="fTiming">Opening / Service Timing</label>
<input id="fTiming" class="input" maxlength="120" placeholder="e.g. 7:00 AM – 10:00 PM">
</div>
</div>
<div class="field">
<label for="fFacilities">Facilities / Details</label>
<textarea id="fFacilities" class="textarea" maxlength="1000" placeholder="Examples: Wi-Fi, AC, meals, study room, parking, AC rooms, home delivery, charging points..."></textarea>
</div>
<div class="field" id="imageField" style="display:none">
<label for="fImage"><i class="fa-regular fa-image"></i> Cafe Image URL</label>
<input id="fImage" class="input" type="url" maxlength="500" placeholder="https://...">
<div class="hint">For Cafe listings, you can provide an image URL. If left empty, your Cafe Finder can use its default cafe banner.</div>
<div class="image-preview" id="imagePreview">
<img id="previewImg" src="cafe-banner.png" alt="Cafe preview" loading="lazy" decoding="async">
</div>
</div>
<div class="notice">
<i class="fa-solid fa-circle-info"></i>
<strong>Before you submit:</strong> Enter accurate listing and contact information. Ratings are not entered by owners; student ratings and reviews remain student-generated.
</div>
<div class="actions">
<a href="user-dashboard.html" class="btn btn-secondary">
<i class="fa-solid fa-arrow-left"></i> Cancel
</a>
<button type="submit" class="btn btn-primary" id="saveBtn">
<i class="fa-solid fa-paper-plane"></i> Submit Listing for Review
</button>
</div>
<div id="msg" class="status"></div>
</form>
</div>
<aside class="panel side-panel">
<div class="side-kicker">Owner onboarding</div>
<div class="side-title">Before you submit</div>
<div class="side-copy">A clear, accurate listing helps StudentHubHelp review your request and helps students understand your service.</div>
<div class="side-list">
<div class="side-item">
<i class="fa-solid fa-1"></i>
<div><b>Choose category</b><span>Select the correct listing type for your business.</span></div>
</div>
<div class="side-item">
<i class="fa-solid fa-2"></i>
<div><b>Add accurate details</b><span>Name, location, address, phone and useful facilities.</span></div>
</div>
<div class="side-item">
<i class="fa-solid fa-3"></i>
<div><b>Submit for review</b><span>Your authenticated owner account is used to create the listing request.</span></div>
</div>
<div class="side-item">
<i class="fa-solid fa-4"></i>
<div><b>Track & manage</b><span>Use your User Dashboard to follow and manage your listings.</span></div>
</div>
</div>
<div class="verification-note">
<b><i class="fa-solid fa-shield-check"></i> Verification stays separate</b>
Approval or Active status does not automatically mean Verified. StudentHubHelp verification is a separate review status.
</div>
<div class="account-box">
<div class="label">Signed in owner</div>
<div class="value" id="ownerName">Loading…</div>
<div class="hint" id="ownerEmail"></div>
</div>
</aside>
</section>
</main>
<footer class="site-footer">
<div class="footer-inner">
<div><span class="footer-brandline">StudentHubHelp</span> · Owner Listing Center</div>
<div class="footer-links">
<a href="privacy-policy.html">Privacy</a>
<a href="terms-and-conditions.html">Terms</a>
<a href="contact-us.html">Support</a>
</div>
<div>© 2026 StudentHubHelp</div>
</div>
</footer>
<script>
const SUPABASE_URL = "https://idurlccrarznnnqixxsd.supabase.co";
const SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImlkdXJsY2NyYXJ6bm5ucWl4eHNkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODc5ODY3NTgsImV4cCI6MjEwMzU2Mjc1OH0.pq_rza98twL-SETqm_6TGNzsPCkVxJwjocFUeLB1yMA";
const db = supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
const $ = (id) => document.getElementById(id);
let user = null;
let profile = null;
const categoryMap = {
hostel: "hostels",
tiffin: "tiffins",
library: "libraries",
cafe: "cafes",
bookstore: "bookstores"
};
const categoryLabels = {
hostel: "Hostel / PG",
tiffin: "Tiffin / Mess",
library: "Library",
cafe: "Cafe",
bookstore: "Book Store"
};
function clean(value) {
return String(value ?? "").trim().replace(/\s+/g, " ");
}
function escapeHTML(value) {
return String(value ?? "")
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'");
}
function setStatus(type, message) {
const el = $("msg");
el.className = "status show " + type;
el.innerHTML = message;
}
function setAuthState(type, message) {
const el = $("authState");
el.className = "status show " + type + " auth-state";
el.innerHTML = message;
}
function normalizePhone(value) {
return clean(value).replace(/[^\d+]/g, "");
}
function validPhone(value) {
const digits = clean(value).replace(/\D/g, "");
return digits.length >= 10 && digits.length <= 15;
}
function updateCategoryUI(category) {
$("fCategory").value = category;
document.querySelectorAll(".category-card").forEach(card => {
card.classList.toggle("selected", card.dataset.value === category);
});
const imageField = $("imageField");
if (category === "cafe") {
imageField.style.display = "block";
} else {
imageField.style.display = "none";
$("fImage").value = "";
$("imagePreview").classList.remove("show");
}
}
document.querySelectorAll(".category-card").forEach(card => {
card.addEventListener("click", () => {
updateCategoryUI(card.dataset.value);
setStatus("info", "Category selected: <strong>" + escapeHTML(categoryLabels[card.dataset.value]) + "</strong>.");
});
});
$("fImage").addEventListener("input", () => {
const url = clean($("fImage").value);
if (!url) {
$("imagePreview").classList.remove("show");
return;
}
$("previewImg").src = url;
$("imagePreview").classList.add("show");
});
$("previewImg").addEventListener("error", () => {
$("previewImg").src = "cafe-banner.png";
});
async function init() {
try {
const { data, error } = await db.auth.getSession();
if (error) {
throw error;
}
user = data?.session?.user || null;
if (!user) {
setAuthState("error",
'<i class="fa-solid fa-lock"></i> Please sign in first. <a href="auth.html" style="color:#ffd970;font-weight:900">Open Login</a>'
);
return;
}
const { data: p, error: profileError } = await db
.from("profiles")
.select("id, full_name, phone, role, email, address, status")
.eq("id", user.id)
.maybeSingle();
if (profileError) {
throw profileError;
}
profile = p;
if (!profile) {
setAuthState("error", '<i class="fa-solid fa-user-xmark"></i> Your profile could not be loaded.');
return;
}
const role = String(profile.role || "").toLowerCase();
const email = String(user.email || "").toLowerCase();
if (email === "studenthubhelpp@gmail.com" || role === "admin") {
window.location.href = "admin-dashboard.html";
return;
}
if (role !== "owner") {
setAuthState("error",
'<i class="fa-solid fa-user-shield"></i> Only owner accounts can add listings.'
);
return;
}
$("fPhone").value = profile.phone || "";
$("fAddress").value = profile.address || "";
$("ownerName").textContent = profile.full_name || "Owner";
$("ownerEmail").textContent = user.email || "";
setAuthState("success",
'<i class="fa-solid fa-circle-check"></i> Signed in as owner: <strong>' +
escapeHTML(profile.full_name || user.email || "Owner") +
"</strong>"
);
$("contentLayout").style.display = "grid";
} catch (error) {
console.error(error);
setAuthState("error",
'<i class="fa-solid fa-triangle-exclamation"></i> Unable to verify your account. Please refresh and try again.'
);
}
}
$("listingForm").addEventListener("submit", async (event) => {
event.preventDefault();
if (!user || !profile) {
setStatus("error", '<i class="fa-solid fa-lock"></i> Please sign in as an owner first.');
return;
}
const name = clean($("fName").value);
const category = $("fCategory").value;
const area = clean($("fArea").value);
const address = clean($("fAddress").value);
const city = clean($("fCity").value);
const phone = normalizePhone($("fPhone").value);
const timing = clean($("fTiming").value);
const facilities = clean($("fFacilities").value);
if (!name || !area || !city || !address || !phone) {
setStatus("error", '<i class="fa-solid fa-circle-exclamation"></i> Please complete all required fields.');
return;
}
if (!validPhone(phone)) {
setStatus("error", '<i class="fa-solid fa-phone-slash"></i> Please enter a valid phone number.');
return;
}
const table = categoryMap[category];
if (!table) {
setStatus("error", '<i class="fa-solid fa-triangle-exclamation"></i> Invalid listing category.');
return;
}
const payload = {
name,
category: categoryLabels[category],
area,
city: city || null,
address,
phone,
timing: timing || null,
facilities: facilities || null,
rating: null
};
// The current Cafe table has an image column. Keep image handling
// limited to Cafe so other existing tables are not forced to have it.
if (category === "cafe") {
payload.image = clean($("fImage").value) || null;
}
const saveBtn = $("saveBtn");
saveBtn.disabled = true;
saveBtn.innerHTML = '<i class="fa-solid fa-spinner fa-spin"></i> Submitting…';
setStatus("info",
'<i class="fa-solid fa-cloud-arrow-up"></i> Sending your ' +
escapeHTML(categoryLabels[category]) +
" listing request for review…"
);
try {
const { error } = await db
.from(table)
.insert(payload);
if (error) {
console.error(error);
throw error;
}
setStatus("success",
'<i class="fa-solid fa-circle-check"></i> <strong>Listing request submitted successfully.</strong><br>' +
"Your " + escapeHTML(categoryLabels[category]) +
" listing has been sent for review. You can track it from your dashboard."
);
const keepPhone = profile.phone || "";
const keepAddress = profile.address || "";
$("listingForm").reset();
$("fCategory").value = category;
updateCategoryUI(category);
$("fPhone").value = keepPhone;
$("fAddress").value = keepAddress;
$("imagePreview").classList.remove("show");
} catch (error) {
setStatus("error",
'<i class="fa-solid fa-triangle-exclamation"></i> <strong>Listing could not be submitted.</strong><br>' +
escapeHTML(error.message || "Unknown Supabase error.")
);
} finally {
saveBtn.disabled = false;
saveBtn.innerHTML = '<i class="fa-solid fa-paper-plane"></i> Submit Listing for Review';
}
});
init();
</script>
<!-- StudentHubHelp AI Chatbot -->
<script src="/ai-chatbot/public/widget.js" defer></script>
<style id="studenthubhelp-homepage-background">
/* Match index.html central homepage palette exactly. */
:root {
--shh-homepage-bg: #B987A5;
--homepage-bg: #B987A5;
--homepage-section-bg: #B987A5;
--homepage-section-soft-bg: #B987A5;
--homepage-section-cream-bg: #B987A5;
--shh-homepage-card: #FFFFFF;
--shh-homepage-text: #334155;
}
html, body { background: #B987A5 !important; background-color: #B987A5 !important; }
body main, body main > section, body main > .section,
body .main, body .page, body .page-content, body .content,
body .wrap, body .container, body .container-main, body .content-wrap,
body .page-wrap, body .section, body .section-inner, body .hero,
body .hero-section, body .page-hero, body .policy-page, body .terms-page,
body .contact-page, body .about-page, body .partner-page {
background-color: #B987A5 !important;
}
/* Keep readable content panels/cards white, as on the homepage. */
body .card, body .panel, body .content-card, body .info-card,
body .faq-card, body .faq-item, body .form-card, body .form-panel,
body .policy-card, body .partner-card, body .contact-card,
body .contact-form, body .search-panel, body .result-card,
body .step-card, body .feature-card {
background-color: #FFFFFF !important;
}
body footer, body .footer { background-color: #0B1F3A !important; color: #FFFFFF !important; }
body footer a, body .footer a, body footer p, body .footer p { color: #FFFFFF; }
</style>
<script id="shh-homepage-navbar-consistency-js">
(function(){
var headers=document.querySelectorAll('body > header.top, body > header.topbar, body > header.nav, body > header:has(> .nav), body > nav.navbar, body > nav.site-nav');
headers.forEach(function(header){
var nav=header.querySelector('nav, .nav-links, .navlinks');
var row=header.querySelector('.nav, .navin, .nav-container, .nav-inner');
if(!nav || !row || header.querySelector('.shh-navbar-toggle')) return;
var button=document.createElement('button');
button.type='button'; button.className='shh-navbar-toggle'; button.setAttribute('aria-label','Open navigation menu');
button.setAttribute('aria-expanded','false'); button.setAttribute('aria-controls',nav.id || 'shh-page-navigation'); button.textContent='☰';
if(!nav.id) nav.id='shh-page-navigation';
row.insertBefore(button,nav);
button.addEventListener('click',function(){
var open=!nav.classList.contains('open'); nav.classList.toggle('open',open);
button.setAttribute('aria-expanded',String(open)); button.setAttribute('aria-label',open?'Close navigation menu':'Open navigation menu');
button.textContent=open?'×':'☰';
});
nav.addEventListener('click',function(e){if(e.target.closest('a')){nav.classList.remove('open');button.setAttribute('aria-expanded','false');button.setAttribute('aria-label','Open navigation menu');button.textContent='☰';}});
document.addEventListener('click',function(e){if(!header.contains(e.target)){nav.classList.remove('open');button.setAttribute('aria-expanded','false');button.textContent='☰';}});
});
})();
</script>
</body>
</html>