File size: 3,542 Bytes
8f52c02
 
 
 
 
 
 
 
 
 
 
 
d5e6d72
 
 
 
 
8f52c02
 
 
 
 
 
 
 
 
 
 
 
 
 
131a9d1
 
8f52c02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PDF Nugget Miner | Extract Key Points</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.12.313/pdf.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
    <script>
        // Make jsPDF available globally
        window.jspdf = window.jspdf || {};
    </script>
<script src="components/navbar.js"></script>
    <script src="components/footer.js"></script>
</head>
<body class="bg-gray-50 min-h-screen flex flex-col">
    <custom-navbar></custom-navbar>

    <main class="flex-grow container mx-auto px-4 py-8">
        <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-md overflow-hidden p-6">
            <h1 class="text-3xl font-bold text-gray-800 mb-6">Exam Cheat Sheet Generator</h1>
            <p class="text-gray-600 mb-8">Upload your PDF and we'll create a compact, exam-friendly cheat sheet with key formulas and concepts.</p>
<div class="space-y-6">
                <div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center">
                    <i data-feather="upload" class="w-12 h-12 mx-auto text-gray-400 mb-4"></i>
                    <h3 class="text-lg font-medium text-gray-700">Upload PDF</h3>
                    <p class="text-gray-500 mb-4">Drag & drop your PDF file here, or click to browse</p>
                    <input type="file" id="pdf-upload" accept="application/pdf" class="hidden">
<button id="upload-btn" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors">
                        Select PDF
                    </button>
                </div>

                <div id="processing-section" class="hidden">
                    <div class="flex items-center space-x-4">
                        <div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"></div>
                        <p class="text-gray-700">Processing your PDF...</p>
                    </div>
                </div>

                <div id="results-section" class="hidden">
                    <div class="flex justify-between items-center mb-4">
                        <h2 class="text-xl font-semibold text-gray-800">Extracted Key Points</h2>
                        <button id="export-pdf" class="flex items-center space-x-2 px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors">
                            <i data-feather="download"></i>
                            <span>Export as PDF</span>
                        </button>
                    </div>
                    <div id="key-points-container" class="grid grid-cols-2 gap-4">
                        <!-- Cheat sheet content will be inserted here -->
                    </div>
</div>
            </div>
        </div>
    </main>

    <custom-footer></custom-footer>

    <script src="script.js"></script>
    <script>
        feather.replace();
        pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.12.313/pdf.worker.min.js';
    </script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>