-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
836 lines (815 loc) · 50.7 KB
/
Copy pathindex.html
File metadata and controls
836 lines (815 loc) · 50.7 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
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DSMNRU PYQ Archive - Previous Year Question Papers</title>
<meta name="description" content="Download DSMNRU PYQ and previous year question papers for multiple courses. Free academic resources for DSMNRU students.">
<meta name="keywords" content="DSMNRU, PYQ, previous year question papers, exam papers, study materials">
<meta name="robots" content="index, follow">
<meta name="author" content="DSMNRU Academic Archive">
<meta name="language" content="English">
<meta name="revisit-after" content="7 days">
<meta name="distribution" content="global">
<meta name="rating" content="general">
<link rel="icon" href="img/Logo.png" type="image/png">
<link rel="shortcut icon" href="img/Logo.png" type="image/png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="styles.css">
<link rel="canonical" href="https://dsmnru-pyq.netlify.app/">
<link rel="alternate" href="https://dsmnru-pyq.netlify.app/" hreflang="en">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#0f172a">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="DSMNRU Archive">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap">
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="https://www.gstatic.com/firebasejs/9.22.1/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.22.1/firebase-firestore-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.22.1/firebase-auth-compat.js"></script>
<meta property="og:title" content="DSMNRU PYQ Archive - Previous Year Question Papers">
<meta property="og:description" content="Browse and download DSMNRU previous year question papers for B.Tech, B.Sc, B.A., B.Com, and more. Free academic resources for DSMNRU students.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://dsmnru-pyq.netlify.app/">
<meta property="og:image" content="https://dsmnru-pyq.netlify.app/img/Logo.png">
<meta property="og:site_name" content="DSMNRU Academic Archive">
<meta property="og:locale" content="en_US">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="DSMNRU PYQ Archive - Academic Resources">
<meta name="twitter:description" content="Free DSMNRU PYQ downloads for students">
<meta name="twitter:image" content="https://dsmnru-pyq.netlify.app/img/Logo.png">
<meta name="twitter:site" content="@dsmnru_updates">
<meta name="twitter:creator" content="@dsmnru_updates">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "DSMNRU Academic Archive",
"url": "https://dsmnru-pyq.netlify.app/",
"logo": "https://dsmnru-pyq.netlify.app/img/Logo.png"
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "https://dsmnru-pyq.netlify.app/",
"name": "DSMNRU Academic Archive",
"description": "Browse and download DSMNRU previous year question papers and course syllabus.",
"publisher": {"@type":"Organization","name":"DSMNRU Academic Archive"}
}
</script>
</head>
<body>
<!-- Header Section -->
<header class="header-container">
<div class="container">
<div class="header-content">
<div class="header-top">
<h1><i class="fas fa-graduation-cap"></i> DSMNRU Archive</h1>
<div class="user-profile-section">
<button id="profileBtn" class="btn-user-profile" onclick="toggleProfileDropdown()">
<i class="fas fa-user-circle"></i>
<span id="userDisplayName">Login</span>
<i class="fas fa-chevron-down"></i>
</button>
<div id="profileDropdown" class="profile-dropdown" style="display: none;">
<div id="userLoggedOutMenu" style="display: none;">
<button class="dropdown-item" onclick="openLoginModal()">
<i class="fas fa-sign-in-alt"></i> Login
</button>
<button class="dropdown-item" onclick="openSignupModal()">
<i class="fas fa-user-plus"></i> Sign Up
</button>
</div>
<div id="userLoggedInMenu" style="display: none;">
<div class="dropdown-header">
<div class="user-profile-info">
<div class="user-avatar"><i class="fas fa-user-circle"></i></div>
<div class="user-info">
<div id="userNameDisplay"></div>
<small id="userEmailDisplay"></small>
</div>
</div>
</div>
<hr class="dropdown-divider">
<button class="dropdown-item" onclick="openProfileModal()">
<i class="fas fa-user"></i> My Profile
</button>
<button class="dropdown-item" onclick="openSettingsModal()">
<i class="fas fa-cog"></i> Settings
</button>
<hr class="dropdown-divider">
<button class="dropdown-item text-danger" onclick="logout()">
<i class="fas fa-sign-out-alt"></i> Logout
</button>
</div>
</div>
</div>
</div>
<p class="subtitle">Your Gateway to Academic Excellence — DSMNRU PYQs only</p>
<div class="page-nav" aria-label="Site sections">
<a class="page-nav-link" href="contributors.html"><i class="fas fa-users"></i> Contributors</a>
<a class="page-nav-link" href="tools.html"><i class="fas fa-tools"></i> Tools</a>
<a class="page-nav-link" href="links.html"><i class="fas fa-link"></i> Links</a>
</div>
<div class="homepage-search-panel">
<!-- Search Box -->
<div class="search-box">
<input type="text" id="searchInput" placeholder="Search by subject, course, session (e.g. B.Tech 3rd 2023)..." aria-label="Search">
<button type="button" onclick="performSearch()" aria-label="Search">
<i class="fas fa-search"></i>
</button>
</div>
<div id="pyqFilterPanel" class="mt-3">
<div class="card border-0 shadow-sm">
<div class="card-body p-3 p-md-4">
<div class="d-flex justify-content-between align-items-start flex-wrap gap-2 mb-3">
<div>
<h6 class="mb-1"><i class="fas fa-sliders-h me-1"></i> Filter PYQs</h6>
<small id="filterHint" class="text-muted"><span id="pyqCountBadge">0 papers</span> • Search and filters are free for everyone</small>
</div>
<button type="button" class="btn btn-sm btn-outline-secondary" onclick="clearPyqFilters()">
<i class="fas fa-undo me-1"></i> Clear
</button>
</div>
<div class="row g-3">
<div class="col-md-3 col-6">
<label for="filterCourse" class="form-label">Course</label>
<select id="filterCourse" class="form-select">
</select>
</div>
<div class="col-md-3 col-6">
<label for="filterYear" class="form-label">Semester</label>
<select id="filterYear" class="form-select">
<option value="">All Semesters</option>
<option value="1st">1st Semester</option>
<option value="2nd">2nd Semester</option>
<option value="3rd">3rd Semester</option>
<option value="4th">4th Semester</option>
<option value="5th">5th Semester</option>
<option value="6th">6th Semester</option>
<option value="7th">7th Semester</option>
<option value="8th">8th Semester</option>
</select>
</div>
<div class="col-md-3 col-6">
<label for="filterSession" class="form-label">Session</label>
<select id="filterSession" class="form-select">
<option value="">All Sessions</option>
<option value="2026-27">2026-27</option>
<option value="2025-26">2025-26</option>
<option value="2024-25">2024-25</option>
<option value="2023-24">2023-24</option>
<option value="2022-23">2022-23</option>
<option value="2021-22">2021-22</option>
<option value="2020-21">2020-21</option>
<option value="2019-20">2019-20</option>
</select>
</div>
<div class="col-md-3 col-6">
<label for="sortBy" class="form-label">Sort by</label>
<select id="sortBy" class="form-select">
<option value="newest" selected>Newest first</option>
<option value="popular">Most viewed</option>
<option value="az">A → Z</option>
<option value="za">Z → A</option>
<option value="oldest">Oldest first</option>
</select>
</div>
</div>
<!-- Active filters + results bar -->
<div id="pyqResultsBar" class="pyq-results-bar mt-3" style="display:none;">
<div class="d-flex flex-wrap align-items-center gap-2">
<span class="results-count"><i class="fas fa-file-alt me-1"></i> <span id="pyqResultsCount">0</span> papers found</span>
<div id="activeFilterChips" class="d-flex flex-wrap gap-2"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<!-- Realtime Chat Button -->
<div id="chatWidget" class="chat-widget" aria-hidden="true">
<button id="chatToggleBtn" class="chat-toggle" aria-pressed="false" aria-label="Open chat" onclick="toggleChatWidget()">
<i class="fas fa-comments"></i>
</button>
</div>
<!-- Main Content -->
<main class="container mt-4">
<section class="content-section" id="pyqs-section">
<div class="section-header">
<h2><i class="fas fa-file-alt"></i> Previous Year Question Papers</h2>
<p class="section-description">DSMNRU PYQs only — preview, download, and request missing papers.</p>
</div>
<div class="pyq-container">
<ul class="pyq-list" id="pyqList">
<!-- PYQ items will be loaded here -->
</ul>
<div class="text-center mt-3 d-flex flex-column align-items-center gap-2">
<button id="loadMoreBtn" class="btn btn-primary" style="display:none;"><i class="fas fa-chevron-down me-2"></i>Load More</button>
<small class="text-muted" style="opacity:0.7;">Tip: Press <kbd>Ctrl</kbd> + <kbd>K</kbd> to focus search</small>
</div>
</div>
</section>
</main>
<!-- Request / Help bar -->
<section class="py-4">
<div class="container">
<div class="card border-0" style="background: linear-gradient(135deg, rgba(50,184,198,0.12), rgba(15,23,42,0.6)); border: 1px solid rgba(50,184,198,0.2); border-radius: 18px;">
<div class="card-body d-flex flex-wrap align-items-center justify-content-between gap-3 p-4">
<div>
<h6 class="mb-1"><i class="fas fa-hand-paper me-2" style="color: var(--color-teal-300);"></i>Missing a PYQ?</h6>
<p class="mb-0 text-muted small">Request a paper or report a broken link — we fix it fast.</p>
</div>
<div class="d-flex gap-2 flex-wrap">
<button class="btn btn-primary btn-sm" onclick="openRequestPyqModal()"><i class="fas fa-plus me-1"></i> Request PYQ</button>
<button class="btn btn-outline-light btn-sm" onclick="openReportBrokenLinkModal()"><i class="fas fa-unlink me-1"></i> Report broken link</button>
</div>
</div>
</div>
</div>
</section>
<!-- Upload Section -->
<section class="upload-section py-5" id="upload-section">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header bg-primary text-white">
<h5 class="mb-0"><i class="fas fa-cloud-upload-alt"></i> Help us grow the collection</h5>
</div>
<div class="card-body">
<p class="text-muted mb-4">Share your question papers to help fellow DSMNRU students</p>
<div class="upload-form-shell">
<form id="userUploadForm">
<div class="mb-3">
<label for="uploadTitle" class="form-label">Title <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="uploadTitle" placeholder="e.g., Indian Constitution - B.A. 1st Sem 2023" required>
</div>
<div class="mb-3">
<label for="uploadName" class="form-label">Your Name <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="uploadName" placeholder="Enter your name" required>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="uploadCourse" class="form-label">Course (optional)</label>
<input type="text" class="form-control" id="uploadCourse" placeholder="e.g., B.A.">
</div>
<div class="col-md-6 mb-3">
<label for="uploadSemester" class="form-label">Semester (optional)</label>
<input type="text" class="form-control" id="uploadSemester" placeholder="e.g., 1st">
</div>
</div>
<div class="mb-3">
<label for="uploadFile" class="form-label">PDF or Images <span class="text-danger">*</span></label>
<input type="file" class="form-control" id="uploadFile" accept=".pdf,image/*" multiple required>
<small class="form-text text-muted d-block mt-2">One PDF or multiple images (auto-merged to 1 PDF). Final PDF must be ≤10 MB.</small>
<div id="uploadFilePreview" class="upload-file-preview" style="display: none;" aria-live="polite">
<div class="upload-file-preview-head">
<span id="uploadFilePreviewSummary">No files selected</span>
<span id="uploadFilePreviewPages">Estimated pages: 0</span>
</div>
<ul id="uploadFilePreviewList" class="upload-file-preview-list"></ul>
</div>
</div>
<button type="submit" class="btn btn-primary w-100">
<i class="fas fa-upload"></i> Upload File
</button>
</form>
<div id="uploadFormLockOverlay" class="upload-form-lock-overlay" aria-hidden="true">
<div class="upload-form-lock-card">
<div class="upload-form-lock-icon">
<i class="fas fa-cloud-upload-alt"></i>
</div>
<h6 class="mb-2">Public upload form</h6>
<p class="mb-0">No signup required. Add your name and share a PDF to contribute to the archive.</p>
</div>
</div>
</div>
<div id="uploadStatus" class="mt-3" style="display: none;">
<div class="alert alert-info" role="alert">
<div id="uploadStatusMessage"></div>
<div id="uploadProgress" class="progress mt-2" style="display: none;">
<div id="uploadProgressBar" class="progress-bar" role="progressbar" style="width: 0%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="footer-content">
<p>© 2025 DSMNRU Academic Archive. Made with <i class="fas fa-heart" style="color: #e74c3c;"></i> for DSMNRU students.</p>
<p class="small text-muted mt-2" style="opacity:0.7; max-width:600px; margin:0 auto;">DSMNRU PYQs only • Not affiliated with DSMNRU University • Papers are contributed by students for educational use.</p>
<div class="social-links">
<a href="https://whatsapp.com/channel/0029Vat8KYICxoAmUBFMaO0t" target="_blank" title="WhatsApp"><i class="fab fa-whatsapp"></i></a>
</div>
</div>
</footer>
<!-- Modals -->
<!-- PDF Preview Modal -->
<div class="modal fade" id="pdfModal" tabindex="-1" aria-labelledby="pdfModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="pdfModalLabel">Document Preview</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<iframe id="pdfViewer" width="100%" height="500px" frameborder="0"></iframe>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Share Modal -->
<div class="modal fade" id="shareModal" tabindex="-1" aria-labelledby="shareModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="shareModalLabel">Share Document</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="mb-3">
<input type="text" id="shareLink" class="form-control" readonly>
<button class="btn btn-outline-primary mt-2 w-100" id="copyLinkBtn">
<i class="fas fa-copy"></i> Copy Link
</button>
</div>
<div class="social-share-buttons">
<a href="#" id="whatsappShare" class="btn btn-success" target="_blank">
<i class="fab fa-whatsapp"></i> WhatsApp
</a>
<a href="#" id="telegramShare" class="btn btn-info" target="_blank">
<i class="fab fa-telegram-plane"></i> Telegram
</a>
<a href="#" id="emailShare" class="btn btn-secondary" target="_blank">
<i class="fas fa-envelope"></i> Email
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Dashboard Modal -->
<div class="modal fade" id="dashboardModal" tabindex="-1" aria-labelledby="dashboardModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="dashboardModalLabel"><i class="fas fa-cog"></i> Dashboard Settings</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="dashboard-settings">
<div class="setting-group">
<h6><i class="fas fa-palette"></i> Theme</h6>
<div class="theme-options">
<label class="theme-option">
<input type="radio" name="theme" value="auto" id="themeAuto">
<span class="theme-label">Auto (System)</span>
</label>
<label class="theme-option">
<input type="radio" name="theme" value="light" id="themeLight">
<span class="theme-label">Light</span>
</label>
<label class="theme-option">
<input type="radio" name="theme" value="dark" id="themeDark">
<span class="theme-label">Dark</span>
</label>
</div>
</div>
<div class="setting-group">
<h6><i class="fas fa-columns"></i> Layout</h6>
<div class="layout-options">
<label class="layout-option">
<input type="radio" name="layout" value="compact" id="layoutCompact">
<span class="layout-label">Compact View</span>
</label>
<label class="layout-option">
<input type="radio" name="layout" value="expanded" id="layoutExpanded">
<span class="layout-label">Expanded View</span>
</label>
</div>
</div>
<div class="setting-group">
<h6><i class="fas fa-star"></i> Quick Access</h6>
<div class="quick-access-options">
<label class="quick-option">
<input type="checkbox" id="quickPyq">
<span class="quick-label">PYQ Tab Shortcut</span>
</label>
<label class="quick-option">
<input type="checkbox" id="quickSyllabus">
<span class="quick-label">Syllabus Tab Shortcut</span>
</label>
<label class="quick-option">
<input type="checkbox" id="quickSearch">
<span class="quick-label">Search Bar Focus</span>
</label>
<label class="quick-option">
<input type="checkbox" id="quickUpload">
<span class="quick-label">Upload Section</span>
</label>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="saveDashboardSettings">Save Settings</button>
</div>
</div>
</div>
</div>
<!-- Login Modal -->
<div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="loginModalLabel"><i class="fas fa-sign-in-alt"></i> Login</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="loginForm">
<div class="mb-3">
<label for="loginEmail" class="form-label">Email Address</label>
<input type="email" class="form-control" id="loginEmail" placeholder="Enter your email" required>
</div>
<div class="mb-3">
<label for="loginPassword" class="form-label">Password</label>
<input type="password" class="form-control" id="loginPassword" placeholder="Enter your password" required>
</div>
<div id="loginError" class="alert alert-danger" style="display: none;"></div>
<button type="submit" class="btn btn-primary w-100">
<i class="fas fa-sign-in-alt"></i> Login
</button>
</form>
<div class="my-3 d-flex align-items-center gap-2">
<div class="flex-grow-1" style="height: 1px; background: rgba(255,255,255,0.15);"></div>
<small class="text-muted">or</small>
<div class="flex-grow-1" style="height: 1px; background: rgba(255,255,255,0.15);"></div>
</div>
<button type="button" class="btn btn-outline-light w-100" onclick="signInWithGoogle('login')">
<i class="fab fa-google me-2"></i> Continue with Google
</button>
<div class="mt-3 text-center">
<p>Don't have an account? <a href="#" onclick="closeLoginModal(); openSignupModal();">Sign up here</a></p>
</div>
</div>
</div>
</div>
</div>
<!-- Signup Modal -->
<div class="modal fade" id="signupModal" tabindex="-1" aria-labelledby="signupModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="signupModalLabel"><i class="fas fa-user-plus"></i> Create Account</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="signupForm">
<div class="mb-3">
<label for="signupEmail" class="form-label">Email Address</label>
<input type="email" class="form-control" id="signupEmail" placeholder="Enter your email" required>
</div>
<div class="mb-3">
<label for="signupPassword" class="form-label">Password</label>
<input type="password" class="form-control" id="signupPassword" placeholder="Enter a password (min 6 characters)" required minlength="6">
</div>
<div class="mb-3">
<label for="signupConfirmPassword" class="form-label">Confirm Password</label>
<input type="password" class="form-control" id="signupConfirmPassword" placeholder="Confirm your password" required>
</div>
<div id="signupError" class="alert alert-danger" style="display: none;"></div>
<button type="submit" class="btn btn-primary w-100">
<i class="fas fa-user-plus"></i> Create Account
</button>
</form>
<div class="my-3 d-flex align-items-center gap-2">
<div class="flex-grow-1" style="height: 1px; background: rgba(255,255,255,0.15);"></div>
<small class="text-muted">or</small>
<div class="flex-grow-1" style="height: 1px; background: rgba(255,255,255,0.15);"></div>
</div>
<button type="button" class="btn btn-outline-light w-100" onclick="signInWithGoogle('signup')">
<i class="fab fa-google me-2"></i> Sign up with Google
</button>
<div class="mt-3 text-center">
<p>Already have an account? <a href="#" onclick="closeSignupModal(); openLoginModal();">Login here</a></p>
</div>
</div>
</div>
</div>
</div>
<!-- User Profile Modal -->
<div class="modal fade" id="profileModal" tabindex="-1" aria-labelledby="profileModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="profileModalLabel"><i class="fas fa-user"></i> My Profile</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="profileForm">
<div class="mb-3">
<label for="profileName" class="form-label">Full Name</label>
<input type="text" class="form-control" id="profileName" required>
</div>
<div class="mb-3">
<label for="profileEmail" class="form-label">Email Address</label>
<input type="email" class="form-control" id="profileEmail" readonly>
</div>
<div class="mb-3">
<label for="profileCourse" class="form-label">Course</label>
<input type="text" class="form-control" id="profileCourse" required>
</div>
<div class="mb-3">
<label for="profilePhone" class="form-label">Phone Number</label>
<input type="tel" class="form-control" id="profilePhone" placeholder="Enter your phone number" required>
</div>
<div class="mb-3">
<label class="form-label">Account Created</label>
<p id="profileCreatedDate" class="form-control-plaintext"></p>
</div>
<div id="profileError" class="alert alert-danger" style="display: none;"></div>
<div id="profileSuccess" class="alert alert-success" style="display: none;"></div>
<button type="submit" class="btn btn-primary w-100">
<i class="fas fa-save"></i> Save Changes
</button>
</form>
</div>
</div>
</div>
</div>
<!-- Login Gate Modal (used for search/filters/preview gating) -->
<div class="modal fade" id="searchGateModal" tabindex="-1" aria-labelledby="searchGateModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content search-gate-modal">
<div class="modal-body text-center p-4 p-md-5">
<div class="search-gate-icon mx-auto mb-3">
<i class="fas fa-user-lock"></i>
</div>
<h5 class="modal-title mb-2" id="searchGateModalLabel">Login required</h5>
<p class="search-gate-text mb-4">
Create a free account to search, preview and download papers across devices.
</p>
<div class="search-gate-actions d-grid gap-2 d-sm-flex justify-content-sm-center">
<button type="button" class="btn btn-primary btn-lg" onclick="closeSearchGateModal(); openSignupModal();">
<i class="fas fa-user-plus"></i> Sign Up Now
</button>
<button type="button" class="btn btn-outline-light btn-lg" onclick="closeSearchGateModal();">
Continue browsing
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Settings Modal -->
<div class="modal fade" id="settingsModal" tabindex="-1" aria-labelledby="settingsModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="settingsModalLabel"><i class="fas fa-cog"></i> Settings</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="settings-section">
<h6 class="mb-3"><i class="fas fa-lock"></i> Security</h6>
<button type="button" class="btn btn-outline-warning w-100 mb-3" onclick="openChangePasswordModal()">
<i class="fas fa-key"></i> Change Password
</button>
</div>
<div class="settings-section">
<h6 class="mb-3"><i class="fas fa-bell"></i> Notifications</h6>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="emailNotifications" checked>
<label class="form-check-label" for="emailNotifications">
Email Notifications for new PYQs
</label>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Change Password Modal -->
<div class="modal fade" id="changePasswordModal" tabindex="-1" aria-labelledby="changePasswordModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="changePasswordModalLabel"><i class="fas fa-key"></i> Change Password</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="changePasswordForm">
<div class="mb-3">
<label for="currentPassword" class="form-label">Current Password</label>
<input type="password" class="form-control" id="currentPassword" required>
</div>
<div class="mb-3">
<label for="newPassword" class="form-label">New Password</label>
<input type="password" class="form-control" id="newPassword" required minlength="6">
</div>
<div class="mb-3">
<label for="confirmNewPassword" class="form-label">Confirm New Password</label>
<input type="password" class="form-control" id="confirmNewPassword" required minlength="6">
</div>
<div id="passwordError" class="alert alert-danger" style="display: none;"></div>
<div id="passwordSuccess" class="alert alert-success" style="display: none;"></div>
<button type="submit" class="btn btn-primary w-100">
<i class="fas fa-save"></i> Update Password
</button>
</form>
</div>
</div>
</div>
</div>
<!-- Email Verification Modal -->
<div class="modal fade" id="emailVerificationModal" tabindex="-1" aria-labelledby="emailVerificationModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header bg-warning">
<h5 class="modal-title" id="emailVerificationModalLabel">
<i class="fas fa-envelope"></i> Verify Your Email
</h5>
</div>
<div class="modal-body">
<div class="text-center mb-4">
<div style="font-size: 3rem; color: #ffc107; margin-bottom: 1rem;">
<i class="fas fa-exclamation-circle"></i>
</div>
<h6 class="mb-2">Email Verification Required</h6>
<p class="text-muted mb-3">
We've sent a verification email to <strong id="verificationEmail"></strong>
</p>
</div>
<div class="alert alert-info">
<p class="mb-0">
<i class="fas fa-info-circle"></i>
<strong>Next Steps:</strong>
</p>
<ol class="mb-0 mt-2" style="padding-left: 1.5rem;">
<li>Check your email inbox (and spam folder)</li>
<li>Click the verification link in the email</li>
<li>Return here and click "Verified"</li>
</ol>
</div>
</div>
<div class="modal-footer gap-2">
<button type="button" class="btn btn-outline-danger btn-sm" onclick="logoutAndChangeEmail()">
<i class="fas fa-sign-out-alt"></i> Use Different Email
</button>
<button type="button" class="btn btn-outline-secondary" id="resendVerificationBtn" onclick="resendVerificationEmail()">
<i class="fas fa-redo"></i> Resend
</button>
<button type="button" class="btn btn-primary" onclick="checkEmailVerification()">
<i class="fas fa-check-circle"></i> Verified
</button>
</div>
</div>
</div>
</div>
<!-- Profile Completion Reminder Modal -->
<div class="modal fade" id="profileCompletionModal" tabindex="-1" aria-labelledby="profileCompletionModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header bg-info">
<h5 class="modal-title" id="profileCompletionModalLabel">
<i class="fas fa-user-check"></i> Complete Your Profile
</h5>
</div>
<div class="modal-body">
<div class="text-center mb-4">
<div style="font-size: 3rem; color: #0dcaf0; margin-bottom: 1rem;">
<i class="fas fa-clipboard-list"></i>
</div>
<h6 class="mb-2">Your profile is incomplete</h6>
<p class="text-muted mb-3">
Complete your profile to unlock all features and get a better experience on our platform.
</p>
</div>
<div class="alert alert-info">
<p class="mb-0">
<i class="fas fa-info-circle"></i>
<strong>Benefits of completing your profile:</strong>
</p>
<ul class="mb-0 mt-2" style="padding-left: 1.5rem;">
<li>Upload and share documents</li>
<li>Better personalized experience</li>
<li>Become a top contributor</li>
</ul>
</div>
</div>
<div class="modal-footer gap-2">
<button type="button" class="btn btn-outline-secondary" onclick="dismissProfileCompletionReminder()">
<i class="fas fa-clock"></i> Remind Later
</button>
<button type="button" class="btn btn-primary" onclick="openProfileModalFromReminder()">
<i class="fas fa-user-edit"></i> Complete Now
</button>
</div>
</div>
</div>
</div>
<!-- Report Broken Link Modal -->
<div class="modal fade" id="reportBrokenLinkModal" tabindex="-1" aria-labelledby="reportBrokenLinkModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="reportBrokenLinkModalLabel"><i class="fas fa-unlink me-2"></i> Report Broken Link</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p class="small text-muted">Help us fix it quickly. Tell us which paper link is broken.</p>
<form id="reportBrokenLinkForm">
<div class="mb-3">
<label for="reportTitle" class="form-label">Paper Title <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="reportTitle" placeholder="e.g. B.Tech 3rd Sem DBMS 2023" required>
</div>
<div class="mb-3">
<label for="reportCourse" class="form-label">Course <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="reportCourse" placeholder="e.g. B.Tech / B.A." required>
</div>
<div class="mb-3">
<label for="reportDetails" class="form-label">What is broken? <span class="text-danger">*</span></label>
<textarea class="form-control" id="reportDetails" rows="3" placeholder="Link doesn't open / Wrong paper / PDF not loading" required></textarea>
</div>
<div class="mb-3">
<label for="reportEmail" class="form-label">Your Email (optional)</label>
<input type="email" class="form-control" id="reportEmail" placeholder="For follow-up">
</div>
<div id="reportBrokenLinkError" class="alert alert-danger" style="display:none;"></div>
<div id="reportBrokenLinkSuccess" class="alert alert-success" style="display:none;"></div>
<button type="submit" class="btn btn-primary w-100"><i class="fas fa-paper-plane me-2"></i> Submit Report</button>
</form>
</div>
</div>
</div>
</div>
<!-- Request PYQ Modal -->
<div class="modal fade" id="requestPyqModal" tabindex="-1" aria-labelledby="requestPyqModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="requestPyqModalLabel"><i class="fas fa-plus-circle me-2"></i> Request a PYQ</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p class="small text-muted">Missing a paper? Request it — contributors will try to upload it.</p>
<form id="requestPyqForm">
<div class="mb-3">
<label for="requestCourseField" class="form-label">Course <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="requestCourseField" placeholder="e.g. B.Tech" required>
</div>
<div class="mb-3">
<label for="requestSubject" class="form-label">Subject <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="requestSubject" placeholder="e.g. Data Structures" required>
</div>
<div class="row g-3">
<div class="col-6">
<label for="requestSemester" class="form-label">Semester <span class="text-danger">*</span></label>
<select class="form-select" id="requestSemester" required>
<option value="">Select</option>
<option>1st</option><option>2nd</option><option>3rd</option><option>4th</option>
<option>5th</option><option>6th</option><option>7th</option><option>8th</option>
</select>
</div>
<div class="col-6">
<label for="requestSession" class="form-label">Session</label>
<input type="text" class="form-control" id="requestSession" placeholder="e.g. 2023-24">
</div>
</div>
<div class="mb-3 mt-3">
<label for="requestEmail2" class="form-label">Your Email (optional, for notification)</label>
<input type="email" class="form-control" id="requestEmail2" placeholder="you@example.com">
</div>
<div id="requestPyqError" class="alert alert-danger" style="display:none;"></div>
<div id="requestPyqSuccess" class="alert alert-success" style="display:none;"></div>
<button type="submit" class="btn btn-primary w-100"><i class="fas fa-bell me-2"></i> Request PYQ</button>
</form>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
window.DSMNRU_API_URL = "https://dsmnru-pyq-api.kush210431-cloudflare.workers.dev";
</script>
<script src="script.js"></script>
</body>
</html>