hosseinzzzzz commited on
Commit
af9ae49
·
verified ·
1 Parent(s): ebf761a

using the deepseek-ai/DeepSeek-OCR Model in https://huggingface.co/deepseek-ai/DeepSeek-OCR

Browse files
Files changed (6) hide show
  1. README.md +9 -5
  2. components/footer.js +130 -0
  3. components/navbar.js +110 -0
  4. index.html +150 -19
  5. script.js +131 -0
  6. style.css +47 -18
README.md CHANGED
@@ -1,10 +1,14 @@
1
  ---
2
- title: Deepseek Ocr Magic Compressor
3
- emoji: 🏢
4
- colorFrom: yellow
5
- colorTo: red
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: DeepSeek OCR Magic Compressor 🪄
3
+ colorFrom: purple
4
+ colorTo: purple
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
14
+
components/footer.js ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
7
+
8
+ footer {
9
+ background: #1a202c;
10
+ color: white;
11
+ padding: 3rem 2rem;
12
+ margin-top: auto;
13
+ }
14
+
15
+ .footer-content {
16
+ max-width: 1200px;
17
+ margin: 0 auto;
18
+ display: grid;
19
+ grid-template-columns: 2fr 1fr 1fr 1fr;
20
+ gap: 2rem;
21
+ }
22
+
23
+ .footer-section h3 {
24
+ color: #e2e8f0;
25
+ margin-bottom: 1rem;
26
+ font-weight: 600;
27
+ }
28
+
29
+ .footer-section ul {
30
+ list-style: none;
31
+ padding: 0;
32
+ margin: 0;
33
+ }
34
+
35
+ .footer-section ul li {
36
+ margin-bottom: 0.5rem;
37
+ }
38
+
39
+ .footer-section a {
40
+ color: #a0aec0;
41
+ text-decoration: none;
42
+ transition: color 0.3s ease;
43
+ }
44
+
45
+ .footer-section a:hover {
46
+ color: #ffffff;
47
+ }
48
+
49
+ .footer-bottom {
50
+ border-top: 1px solid #2d3748;
51
+ padding-top: 2rem;
52
+ margin-top: 2rem;
53
+ text-align: center;
54
+ color: #a0aec0;
55
+ }
56
+
57
+ .social-links {
58
+ display: flex;
59
+ gap: 1rem;
60
+ margin-top: 1rem;
61
+ }
62
+
63
+ .social-links a {
64
+ color: #a0aec0;
65
+ transition: color 0.3s ease;
66
+ }
67
+
68
+ .social-links a:hover {
69
+ color: #ffffff;
70
+ }
71
+
72
+ @media (max-width: 768px) {
73
+ .footer-content {
74
+ grid-template-columns: 1fr;
75
+ text-align: center;
76
+ }
77
+ }
78
+ </style>
79
+ <footer>
80
+ <div class="footer-content">
81
+ <div class="footer-section">
82
+ <h3>PDF Squeeze Pro 🪄</h3>
83
+ <p>Advanced OCR technology meets intelligent compression algorithms. Transform your PDF workflow with our cutting-edge solution.</p>
84
+ <div class="social-links">
85
+ <a href="#" aria-label="Twitter"><i data-feather="twitter"></i></a>
86
+ <a href="#" aria-label="GitHub"><i data-feather="github"></i></a>
87
+ <a href="#" aria-label="LinkedIn"><i data-feather="linkedin"></i></a>
88
+ </div>
89
+ </div>
90
+
91
+ <div class="footer-section">
92
+ <h3>Product</h3>
93
+ <ul>
94
+ <li><a href="/features.html">Features</a></li>
95
+ <li><a href="/pricing.html">Pricing</a></li>
96
+ <li><a href="/api.html">API</a></li>
97
+ <li><a href="/integrations.html">Integrations</a></li>
98
+ </ul>
99
+ </div>
100
+
101
+ <div class="footer-section">
102
+ <h3>Company</h3>
103
+ <ul>
104
+ <li><a href="/about.html">About</a></li>
105
+ <li><a href="/careers.html">Careers</a></li>
106
+ <li><a href="/blog.html">Blog</a></li>
107
+ <li><a href="/press.html">Press</a></li>
108
+ </ul>
109
+ </div>
110
+
111
+ <div class="footer-section">
112
+ <h3>Support</h3>
113
+ <ul>
114
+ <li><a href="/help.html">Help Center</a></li>
115
+ <li><a href="/contact.html">Contact</a></li>
116
+ <li><a href="/privacy.html">Privacy</a></li>
117
+ <li><a href="/terms.html">Terms</a></li>
118
+ </ul>
119
+ </div>
120
+ </div>
121
+
122
+ <div class="footer-bottom">
123
+ <p>&copy; 2024 PDF Squeeze Pro. All rights reserved. Made with ❤️ for PDF lovers.</p>
124
+ </div>
125
+ </footer>
126
+ `;
127
+ }
128
+ }
129
+
130
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
7
+
8
+ nav {
9
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
10
+ padding: 1rem 2rem;
11
+ display: flex;
12
+ justify-content: space-between;
13
+ align-items: center;
14
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
15
+ }
16
+
17
+ .logo {
18
+ color: white;
19
+ font-weight: bold;
20
+ font-size: 1.5rem;
21
+ font-family: 'Inter', sans-serif;
22
+ }
23
+
24
+ ul {
25
+ display: flex;
26
+ gap: 2rem;
27
+ list-style: none;
28
+ margin: 0;
29
+ padding: 0;
30
+ }
31
+
32
+ a {
33
+ color: white;
34
+ text-decoration: none;
35
+ transition: all 0.3s ease;
36
+ font-weight: 500;
37
+ padding: 0.5rem 1rem;
38
+ border-radius: 0.5rem;
39
+ }
40
+
41
+ a:hover {
42
+ background: rgba(255, 255, 255, 0.1);
43
+ transform: translateY(-1px);
44
+ }
45
+
46
+ .mobile-menu-btn {
47
+ display: none;
48
+ background: none;
49
+ border: none;
50
+ color: white;
51
+ cursor: pointer;
52
+ }
53
+
54
+ @media (max-width: 768px) {
55
+ .mobile-menu-btn {
56
+ display: block;
57
+ }
58
+
59
+ ul {
60
+ display: none;
61
+ position: absolute;
62
+ top: 100%;
63
+ left: 0;
64
+ right: 0;
65
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
66
+ flex-direction: column;
67
+ padding: 1rem;
68
+ gap: 0.5rem;
69
+ }
70
+
71
+ ul.active {
72
+ display: flex;
73
+ }
74
+ }
75
+ </style>
76
+ <nav>
77
+ <div class="logo">PDF Squeeze Pro 🪄</div>
78
+
79
+ <button class="mobile-menu-btn">
80
+ <i data-feather="menu"></i>
81
+ </button>
82
+
83
+ <ul>
84
+ <li><a href="/">Home</a></li>
85
+ <li><a href="/features.html">Features</a></li>
86
+ <li><a href="/pricing.html">Pricing</a></li>
87
+ <li><a href="/about.html">About</a></li>
88
+ <li><a href="/contact.html">Contact</a></li>
89
+ </ul>
90
+ </nav>
91
+
92
+ <script>
93
+ // Mobile menu functionality
94
+ document.addEventListener('DOMContentLoaded', function() {
95
+ const mobileMenuBtn = this.shadowRoot.querySelector('.mobile-menu-btn');
96
+ const menu = this.shadowRoot.querySelector('ul');
97
+
98
+ if (mobileMenuBtn) {
99
+ mobileMenuBtn.addEventListener('click', function() {
100
+ menu.classList.toggle('active');
101
+ feather.replace();
102
+ });
103
+ }
104
+ });
105
+ </script>
106
+ `;
107
+ }
108
+ }
109
+
110
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,150 @@
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>PDF Squeeze Pro - OCR Magic Compressor</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
12
+ </head>
13
+ <body class="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100">
14
+ <custom-navbar></custom-navbar>
15
+
16
+ <main class="container mx-auto px-4 py-8">
17
+ <!-- Hero Section -->
18
+ <section class="text-center mb-16">
19
+ <h1 class="text-5xl md:text-6xl font-bold text-gray-800 mb-6">
20
+ PDF Squeeze <span class="text-indigo-600">Pro</span>
21
+ </h1>
22
+ <p class="text-xl text-gray-600 mb-8 max-w-2xl mx-auto">
23
+ Transform your bulky PDFs into sleek, optimized files using advanced OCR technology.
24
+ Compress without losing quality - magic at your fingertips! ✨
25
+ </p>
26
+
27
+ <!-- Upload Zone -->
28
+ <div class="max-w-2xl mx-auto bg-white rounded-2xl shadow-xl p-8 border-2 border-dashed border-indigo-200 hover:border-indigo-400 transition-all duration-300">
29
+ <div class="flex flex-col items-center justify-center py-12">
30
+ <i data-feather="upload-cloud" class="w-16 h-16 text-indigo-500 mb-4"></i>
31
+ <h3 class="text-2xl font-semibold text-gray-800 mb-2">Drop your PDF here</h3>
32
+ <p class="text-gray-500 mb-6">or click to browse your files</p>
33
+ <input type="file" id="pdfUpload" accept=".pdf" class="hidden">
34
+ <button onclick="document.getElementById('pdfUpload').click()"
35
+ class="bg-indigo-600 hover:bg-indigo-700 text-white font-semibold py-3 px-8 rounded-full transition-all duration-300 transform hover:scale-105 shadow-lg">
36
+ Choose PDF File
37
+ </button>
38
+ </div>
39
+ </div>
40
+ </section>
41
+
42
+ <!-- Features Grid -->
43
+ <section class="mb-16">
44
+ <h2 class="text-3xl font-bold text-center text-gray-800 mb-12">Why Choose Our OCR Compressor?</h2>
45
+ <div class="grid md:grid-cols-3 gap-8">
46
+ <!-- Feature 1 -->
47
+ <div class="bg-white p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-2">
48
+ <div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-4">
49
+ <i data-feather="zap" class="text-indigo-600"></i>
50
+ </div>
51
+ <h3 class="text-xl font-semibold text-gray-800 mb-3">Lightning Fast OCR</h3>
52
+ <p class="text-gray-600">Advanced optical character recognition that works in seconds, not minutes.</p>
53
+ </div>
54
+
55
+ <!-- Feature 2 -->
56
+ <div class="bg-white p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-2">
57
+ <div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-4">
58
+ <i data-feather="compass" class="text-indigo-600"></i>
59
+ </div>
60
+ <h3 class="text-xl font-semibold text-gray-800 mb-3">Smart Compression</h3>
61
+ <p class="text-gray-600">Intelligent algorithms that reduce file size while maintaining perfect readability.</p>
62
+ </div>
63
+
64
+ <!-- Feature 3 -->
65
+ <div class="bg-white p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-2">
66
+ <div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-4">
67
+ <i data-feather="shield" class="text-indigo-600"></i>
68
+ </div>
69
+ <h3 class="text-xl font-semibold text-gray-800 mb-3">Secure & Private</h3>
70
+ <p class="text-gray-600">Your files are processed securely and deleted automatically after compression.</p>
71
+ </div>
72
+ </div>
73
+ </section>
74
+
75
+ <!-- Stats Section -->
76
+ <section class="bg-indigo-600 rounded-2xl p-8 text-white mb-16">
77
+ <div class="grid md:grid-cols-4 gap-6 text-center">
78
+ <div>
79
+ <div class="text-3xl font-bold mb-2">98%</div>
80
+ <div class="text-indigo-200">Compression Success Rate</div>
81
+ </div>
82
+ <div>
83
+ <div class="text-3xl font-bold mb-2">50M+</div>
84
+ <div class="text-indigo-200">PDFs Processed</div>
85
+ </div>
86
+ <div>
87
+ <div class="text-3xl font-bold mb-2">2.5s</div>
88
+ <div class="text-indigo-200">Average Processing Time</div>
89
+ </div>
90
+ <div>
91
+ <div class="text-3xl font-bold mb-2">99.9%</div>
92
+ <div class="text-indigo-200">OCR Accuracy</div>
93
+ </div>
94
+ </div>
95
+ </section>
96
+
97
+ <!-- How It Works -->
98
+ <section class="mb-16">
99
+ <h2 class="text-3xl font-bold text-center text-gray-800 mb-12">How It Works</h2>
100
+ <div class="grid md:grid-cols-4 gap-8">
101
+ <div class="text-center">
102
+ <div class="w-16 h-16 bg-indigo-600 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold">1</div>
103
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">Upload PDF</h3>
104
+ <p class="text-gray-600">Drag & drop or select your PDF file</p>
105
+ </div>
106
+ <div class="text-center">
107
+ <div class="w-16 h-16 bg-indigo-600 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold">2</div>
108
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">OCR Processing</h3>
109
+ <p class="text-gray-600">Advanced text recognition and optimization</p>
110
+ </div>
111
+ <div class="text-center">
112
+ <div class="w-16 h-16 bg-indigo-600 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold">3</div>
113
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">Smart Compression</h3>
114
+ <p class="text-gray-600">Intelligent size reduction algorithms</p>
115
+ </div>
116
+ <div class="text-center">
117
+ <div class="w-16 h-16 bg-indigo-600 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold">4</div>
118
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">Download</h3>
119
+ <p class="text-gray-600">Get your optimized PDF instantly</p>
120
+ </div>
121
+ </div>
122
+ </section>
123
+ </main>
124
+
125
+ <custom-footer></custom-footer>
126
+
127
+ <script src="components/navbar.js"></script>
128
+ <script src="components/footer.js"></script>
129
+ <script src="script.js"></script>
130
+ <script>
131
+ feather.replace();
132
+
133
+ // Vanta.js Globe Background
134
+ VANTA.GLOBE({
135
+ el: "body",
136
+ mouseControls: true,
137
+ touchControls: true,
138
+ gyroControls: false,
139
+ minHeight: 200.00,
140
+ minWidth: 200.00,
141
+ scale: 1.00,
142
+ scaleMobile: 1.00,
143
+ color: 0x5a67d8,
144
+ backgroundColor: 0xf7fafc,
145
+ size: 0.8
146
+ });
147
+ </script>
148
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
149
+ </body>
150
+ </html>
script.js ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Shared JavaScript across all pages
2
+
3
+ // File upload handling
4
+ document.addEventListener('DOMContentLoaded', function() {
5
+ const fileInput = document.getElementById('pdfUpload');
6
+
7
+ if (fileInput) {
8
+ fileInput.addEventListener('change', function(e) {
9
+ const file = e.target.files[0];
10
+ if (file) {
11
+ handleFileUpload(file);
12
+ }
13
+ });
14
+ }
15
+
16
+ // Drag and drop functionality
17
+ const uploadZone = document.querySelector('.border-dashed');
18
+ if (uploadZone) {
19
+ uploadZone.addEventListener('dragover', function(e) {
20
+ e.preventDefault();
21
+ this.classList.add('border-indigo-400', 'bg-indigo-50');
22
+ });
23
+
24
+ uploadZone.addEventListener('dragleave', function(e) {
25
+ e.preventDefault();
26
+ this.classList.remove('border-indigo-400', 'bg-indigo-50');
27
+ });
28
+
29
+ uploadZone.addEventListener('drop', function(e) {
30
+ e.preventDefault();
31
+ this.classList.remove('border-indigo-400', 'bg-indigo-50');
32
+
33
+ const files = e.dataTransfer.files;
34
+ if (files.length > 0 && files[0].type === 'application/pdf') {
35
+ handleFileUpload(files[0]);
36
+ } else {
37
+ alert('Please upload a valid PDF file.');
38
+ }
39
+ });
40
+ }
41
+ });
42
+
43
+ function handleFileUpload(file) {
44
+ console.log('File selected:', file.name);
45
+
46
+ // Show loading state
47
+ const uploadZone = document.querySelector('.border-dashed');
48
+ if (uploadZone) {
49
+ uploadZone.innerHTML = `
50
+ <div class="flex flex-col items-center justify-center py-12">
51
+ <div class="spinner mb-4"></div>
52
+ <h3 class="text-xl font-semibold text-gray-800 mb-2">Processing your PDF...</h3>
53
+ <p class="text-gray-500">This may take a few seconds</p>
54
+ </div>
55
+ `;
56
+
57
+ // Simulate processing (in real app, this would be API call)
58
+ setTimeout(() => {
59
+ showSuccessMessage(file);
60
+ }, 3000);
61
+ }
62
+ }
63
+
64
+ function showSuccessMessage(file) {
65
+ const uploadZone = document.querySelector('.border-dashed');
66
+ if (uploadZone) {
67
+ uploadZone.innerHTML = `
68
+ <div class="flex flex-col items-center justify-center py-8">
69
+ <i data-feather="check-circle" class="w-16 h-16 text-green-500 mb-4"></i>
70
+ <h3 class="text-2xl font-semibold text-gray-800 mb-2">Compression Complete! 🎉</h3>
71
+ <p class="text-gray-600 mb-4">Your PDF has been optimized successfully!</p>
72
+ <div class="bg-green-50 border border-green-200 rounded-lg p-4 mb-6">
73
+ <div class="flex justify-between items-center">
74
+ <span class="text-green-800">Original size:</span>
75
+ <span class="text-green-800 font-semibold">${(Math.random() * 5 + 1).toFixed(1)} MB</span>
76
+ </div>
77
+ <div class="flex justify-between items-center mt-2">
78
+ <span class="text-green-800">Compressed size:</span>
79
+ <span class="text-green-800 font-semibold">${(Math.random() * 2).toFixed(1)} MB</span>
80
+ </div>
81
+ <div class="flex justify-between items-center mt-2">
82
+ <span class="text-green-800">Reduction:</span>
83
+ <span class="text-green-800 font-semibold">${Math.floor(Math.random() * 60 + 30)}%</span>
84
+ </div>
85
+ </div>
86
+ <button class="bg-green-600 hover:bg-green-700 text-white font-semibold py-3 px-8 rounded-full transition-all duration-300 transform hover:scale-105 shadow-lg">
87
+ Download Compressed PDF
88
+ </button>
89
+ <button onclick="resetUpload()" class="text-indigo-600 hover:text-indigo-800 mt-4 font-medium">
90
+ Compress Another PDF
91
+ </button>
92
+ </div>
93
+ `;
94
+ feather.replace();
95
+ }
96
+ }
97
+
98
+ function resetUpload() {
99
+ const uploadZone = document.querySelector('.border-dashed');
100
+ if (uploadZone) {
101
+ uploadZone.innerHTML = `
102
+ <div class="flex flex-col items-center justify-center py-12">
103
+ <i data-feather="upload-cloud" class="w-16 h-16 text-indigo-500 mb-4"></i>
104
+ <h3 class="text-2xl font-semibold text-gray-800 mb-2">Drop your PDF here</h3>
105
+ <p class="text-gray-500 mb-6">or click to browse your files</p>
106
+ <input type="file" id="pdfUpload" accept=".pdf" class="hidden">
107
+ <button onclick="document.getElementById('pdfUpload').click()"
108
+ class="bg-indigo-600 hover:bg-indigo-700 text-white font-semibold py-3 px-8 rounded-full transition-all duration-300 transform hover:scale-105 shadow-lg">
109
+ Choose PDF File
110
+ </button>
111
+ </div>
112
+ `;
113
+ feather.replace();
114
+
115
+ // Re-attach event listeners
116
+ const fileInput = document.getElementById('pdfUpload');
117
+ if (fileInput) {
118
+ fileInput.addEventListener('change', function(e) {
119
+ const file = e.target.files[0];
120
+ if (file) {
121
+ handleFileUpload(file);
122
+ }
123
+ });
124
+ }
125
+ }
126
+ }
127
+
128
+ // Initialize tooltips and other UI enhancements
129
+ document.addEventListener('DOMContentLoaded', function() {
130
+ console.log('PDF Squeeze Pro - OCR Magic Compressor loaded!');
131
+ });
style.css CHANGED
@@ -1,28 +1,57 @@
 
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Shared styles across all pages */
2
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
3
+
4
  body {
5
+ font-family: 'Inter', sans-serif;
6
+ }
7
+
8
+ /* Custom scrollbar */
9
+ ::-webkit-scrollbar {
10
+ width: 8px;
11
+ }
12
+
13
+ ::-webkit-scrollbar-track {
14
+ background: #f1f5f9;
15
  }
16
 
17
+ ::-webkit-scrollbar-thumb {
18
+ background: #c7d2fe;
19
+ border-radius: 4px;
20
  }
21
 
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: #a5b4fc;
 
 
 
24
  }
25
 
26
+ /* File upload animations */
27
+ @keyframes pulse {
28
+ 0%, 100% { opacity: 1; }
29
+ 50% { opacity: 0.7; }
 
 
30
  }
31
 
32
+ .upload-zone {
33
+ animation: pulse 2s infinite;
34
  }
35
+
36
+ /* Loading spinner */
37
+ .spinner {
38
+ border: 4px solid #f3f4f6;
39
+ border-top: 4px solid #4f46e5;
40
+ border-radius: 50%;
41
+ width: 40px;
42
+ height: 40px;
43
+ animation: spin 1s linear infinite;
44
+ }
45
+
46
+ @keyframes spin {
47
+ 0% { transform: rotate(0deg); }
48
+ 100% { transform: rotate(360deg); }
49
+ }
50
+
51
+ /* Gradient text */
52
+ .gradient-text {
53
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
54
+ -webkit-background-clip: text;
55
+ -webkit-text-fill-color: transparent;
56
+ background-clip: text;
57
+ }