missravneetkaur commited on
Commit
0f998e1
·
verified ·
1 Parent(s): 00d5e5e

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +66 -250
templates/index.html CHANGED
@@ -3,281 +3,97 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>ATS Resume Scanner Pro</title>
 
7
  <script src="https://cdn.tailwindcss.com"></script>
8
- <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
9
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
10
  <style>
11
  body { font-family: 'Inter', sans-serif; }
12
-
13
- /* Animations */
14
- .animate-slide-up { animation: slideUp 0.4s ease-out forwards; }
15
- .animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }
16
-
17
- @keyframes slideUp {
18
- from { opacity: 0; transform: translateY(20px); }
19
- to { opacity: 1; transform: translateY(0); }
20
- }
21
- @keyframes fadeIn {
22
- from { opacity: 0; }
23
- to { opacity: 1; }
24
- }
25
-
26
- /* Custom Scrollbar */
27
- textarea::-webkit-scrollbar { width: 8px; }
28
- textarea::-webkit-scrollbar-track { background: #f8fafc; border-radius: 4px; }
29
- textarea::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; border: 2px solid #f8fafc; }
30
- textarea::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
31
-
32
- /* File Upload Zone */
33
- .drop-zone {
34
- background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='12' ry='12' stroke='%23CBD5E1FF' stroke-width='2' stroke-dasharray='8%2c8' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
35
- transition: all 0.2s ease;
36
- }
37
- .drop-zone:hover, .drop-zone.drag-active {
38
- background-color: #f8fafc;
39
- background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='12' ry='12' stroke='%234F46E5FF' stroke-width='2' stroke-dasharray='8%2c8' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
40
- }
41
  </style>
42
  </head>
43
- <body class="bg-slate-50 min-h-screen flex flex-col text-slate-800">
44
 
45
- <!-- Navbar -->
46
- <nav class="bg-white/80 backdrop-blur-md border-b border-slate-200 sticky top-0 z-40">
47
- <div class="max-w-5xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between">
48
- <div class="flex items-center gap-3">
49
- <div class="bg-gradient-to-tr from-indigo-600 to-violet-600 text-white p-2.5 rounded-xl shadow-lg shadow-indigo-200">
50
- <i class="fa-solid fa-layer-group"></i>
51
- </div>
52
- <div>
53
- <h1 class="text-xl font-bold text-slate-900 tracking-tight leading-none">ATS Scanner<span class="text-indigo-600">Pro</span></h1>
54
- <span class="text-xs text-slate-500 font-medium">Enterprise Edition</span>
55
- </div>
56
- </div>
57
- <div class="flex items-center gap-4">
58
- <a href="#" class="text-sm font-medium text-slate-600 hover:text-indigo-600 transition-colors hidden sm:block">Documentation</a>
59
- </div>
60
- </div>
61
- </nav>
62
-
63
- <!-- Main Content -->
64
- <main class="flex-grow flex flex-col items-center justify-start pt-8 pb-12 px-4 sm:px-6">
65
- <div class="w-full max-w-3xl animate-slide-up">
66
 
67
- <!-- Hero Text -->
68
- <div class="text-center mb-8">
69
- <h2 class="text-3xl sm:text-4xl font-bold text-slate-900 mb-3">Optimize Your Hiring Pipeline</h2>
70
- <p class="text-slate-500 text-lg max-w-xl mx-auto">Instant AI-powered resume screening to categorize candidates.</p>
71
- </div>
72
-
73
- <div class="bg-white rounded-2xl shadow-xl shadow-slate-200/50 overflow-hidden border border-slate-200/60">
74
 
75
- <!-- Toolbar -->
76
- <div class="bg-slate-50/50 px-6 py-3 border-b border-slate-200 flex items-center justify-between">
77
- <div class="flex items-center gap-2">
78
- <span class="flex h-3 w-3 relative">
79
- <span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
80
- <span class="relative inline-flex rounded-full h-3 w-3 bg-emerald-500"></span>
81
- </span>
82
- <span class="text-xs font-semibold text-slate-500 uppercase tracking-wide">System Ready</span>
83
- </div>
84
- <button type="button" onclick="clearForm()" class="text-xs font-medium text-slate-500 hover:text-red-500 transition-colors flex items-center gap-1">
85
- <i class="fa-solid fa-trash-can"></i> Clear
86
- </button>
87
- </div>
88
-
89
- <div class="p-6 sm:p-8 space-y-6">
90
- <!-- File Upload Area (Client-side helper only) -->
91
- <div
92
- class="drop-zone rounded-xl p-8 text-center cursor-pointer relative group"
93
- id="dropZone"
94
- onclick="document.getElementById('fileInput').click()"
95
- ondragover="handleDragOver(event)"
96
- ondragleave="handleDragLeave(event)"
97
- ondrop="handleDrop(event)"
98
- >
99
- <input type="file" id="fileInput" class="hidden" accept=".txt" onchange="handleFileSelect(event)">
100
- <div class="transition-transform duration-200 group-hover:-translate-y-1">
101
- <div class="w-12 h-12 bg-indigo-50 text-indigo-600 rounded-full flex items-center justify-center mx-auto mb-3 text-xl">
102
- <i class="fa-solid fa-cloud-arrow-up"></i>
103
- </div>
104
- <h3 class="text-slate-900 font-medium">Click to upload text file</h3>
105
- <p class="text-slate-400 text-xs mt-1">.TXT files supported</p>
106
- </div>
107
- </div>
108
 
109
- <!-- Text Area Form -->
110
- <form method="POST" action="/" onsubmit="showLoading()">
111
- <div class="relative group">
 
 
 
 
 
112
  <textarea
113
  id="resume"
114
  name="resume"
115
- rows="10"
116
- class="w-full px-4 py-3 rounded-xl bg-slate-50 border border-slate-200 focus:bg-white focus:border-indigo-500 focus:ring-4 focus:ring-indigo-500/10 transition-all duration-200 resize-y text-slate-600 placeholder-slate-400 text-sm leading-relaxed font-mono"
117
- placeholder="Paste resume content here..."
118
- oninput="updateCharCount()"
119
  required
120
- >{% if request.form.resume %}{{ request.form.resume }}{% endif %}</textarea>
121
- <div class="absolute bottom-2 right-2 text-[10px] text-slate-400 bg-white/80 px-2 py-1 rounded border border-slate-100 backdrop-blur-sm">
122
- <span id="charCount">0</span> chars
 
 
123
  </div>
124
  </div>
125
-
126
- <div class="flex flex-col sm:flex-row items-center justify-between gap-4 mt-6">
127
- <button
128
- type="button"
129
- onclick="fillSample()"
130
- class="text-sm text-slate-500 hover:text-indigo-600 transition-colors font-medium flex items-center gap-2 px-2 py-1 rounded-md hover:bg-indigo-50"
131
- >
132
- <i class="fa-solid fa-wand-magic-sparkles"></i>
133
- Load Sample Data
134
- </button>
135
-
136
- <button
137
- type="submit"
138
- id="submitBtn"
139
- class="w-full sm:w-auto bg-indigo-600 hover:bg-indigo-700 text-white px-8 py-3 rounded-xl font-semibold shadow-lg shadow-indigo-200 transform active:scale-[0.98] transition-all duration-200 flex items-center justify-center gap-2"
140
- >
141
- <span>Analyze Resume</span>
142
- <i class="fa-solid fa-arrow-right"></i>
143
- </button>
144
- </div>
145
- </form>
146
- </div>
147
- </div>
148
-
149
- <!-- Loading State -->
150
- <div id="loadingState" class="hidden mt-8">
151
- <div class="flex flex-col items-center justify-center p-8 bg-white rounded-xl border border-slate-100 shadow-sm animate-fade-in">
152
- <div class="relative w-16 h-16 mb-4">
153
- <div class="absolute inset-0 border-4 border-slate-100 rounded-full"></div>
154
- <div class="absolute inset-0 border-4 border-indigo-600 rounded-full border-t-transparent animate-spin"></div>
155
  </div>
156
- <h3 class="text-slate-800 font-medium">Processing...</h3>
157
- </div>
158
- </div>
159
 
160
- <!-- Analysis Result (Jinja2) -->
161
- {% if prediction %}
162
- <div id="resultContainer" class="mt-8 animate-slide-up">
163
- <div class="bg-white rounded-xl shadow-xl shadow-slate-200/50 border border-slate-200 overflow-hidden">
164
-
165
- <!-- Result Header -->
166
- <div class="bg-slate-900 text-white p-6 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
167
- <div>
168
- <div class="text-indigo-300 text-xs font-bold uppercase tracking-wider mb-1">Prediction Result</div>
169
- <h2 class="text-2xl font-bold flex items-center gap-3">
170
- <span>{{ prediction }}</span>
171
- <i class="fa-solid fa-circle-check text-emerald-400 text-lg"></i>
172
- </h2>
 
 
 
 
 
 
 
 
 
 
 
173
  </div>
174
  </div>
175
-
176
- <!-- Result Details -->
177
- <div class="p-6 bg-slate-50 border-t border-slate-100">
178
- <p class="text-slate-600 text-sm">
179
- <i class="fa-solid fa-info-circle text-indigo-500 mr-2"></i>
180
- The resume has been categorized based on the content provided.
181
- </p>
182
- </div>
183
  </div>
 
184
  </div>
185
- {% endif %}
186
-
187
  </div>
188
  </main>
189
-
190
- <footer class="bg-white border-t border-slate-200 mt-auto">
191
- <div class="max-w-5xl mx-auto px-6 py-8 flex flex-col md:flex-row justify-between items-center gap-4">
192
- <div class="text-slate-400 text-sm">
193
- &copy; 2024 ATS Scanner Pro.
194
- </div>
 
195
  </div>
196
  </footer>
197
 
198
- <script>
199
- // --- Core UI Logic ---
200
- function updateCharCount() {
201
- const val = document.getElementById('resume').value;
202
- document.getElementById('charCount').textContent = val ? val.length.toLocaleString() : '0';
203
- }
204
-
205
- // Initialize char count if backend returned data
206
- updateCharCount();
207
-
208
- function clearForm() {
209
- document.getElementById('resume').value = '';
210
- document.getElementById('fileInput').value = '';
211
- // Hide result if it exists from previous post
212
- const result = document.getElementById('resultContainer');
213
- if(result) result.style.display = 'none';
214
- updateCharCount();
215
- }
216
-
217
- function showLoading() {
218
- const text = document.getElementById('resume').value;
219
- if(text.trim().length === 0) return; // Let HTML required handle it
220
-
221
- document.getElementById('loadingState').classList.remove('hidden');
222
- document.getElementById('submitBtn').disabled = true;
223
- document.getElementById('submitBtn').classList.add('opacity-75', 'cursor-not-allowed');
224
-
225
- // Hide previous results if visible
226
- const result = document.getElementById('resultContainer');
227
- if(result) result.classList.add('hidden');
228
- }
229
-
230
- function fillSample() {
231
- const sampleText = `PROFESSIONAL SUMMARY
232
- Senior Data Scientist with 5 years of experience in machine learning and statistical modeling.
233
-
234
- TECHNICAL SKILLS
235
- - Languages: Python, SQL, R
236
- - Libraries: Pandas, NumPy, Scikit-learn, TensorFlow
237
-
238
- EXPERIENCE
239
- Lead Data Analyst | Acme Corp
240
- - Developed predictive models improving sales forecasting by 20%.`;
241
-
242
- document.getElementById('resume').value = sampleText;
243
- updateCharCount();
244
- }
245
-
246
- // --- File Handling (Client Side Convenience) ---
247
- function handleDragOver(e) {
248
- e.preventDefault();
249
- e.currentTarget.classList.add('drag-active');
250
- }
251
-
252
- function handleDragLeave(e) {
253
- e.preventDefault();
254
- e.currentTarget.classList.remove('drag-active');
255
- }
256
-
257
- function handleDrop(e) {
258
- e.preventDefault();
259
- e.currentTarget.classList.remove('drag-active');
260
- const files = e.dataTransfer.files;
261
- if (files.length > 0) processFile(files[0]);
262
- }
263
-
264
- function handleFileSelect(e) {
265
- if (e.target.files.length > 0) processFile(e.target.files[0]);
266
- }
267
-
268
- function processFile(file) {
269
- const textarea = document.getElementById('resume');
270
- if (file.type === 'text/plain') {
271
- const reader = new FileReader();
272
- reader.onload = (e) => {
273
- textarea.value = e.target.result;
274
- updateCharCount();
275
- };
276
- reader.readAsText(file);
277
- } else {
278
- alert("For this demo, please upload .txt files or paste text directly.");
279
- }
280
- }
281
- </script>
282
  </body>
283
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>ATS Resume Screening AI</title>
7
+ <!-- Tailwind CSS for rapid styling -->
8
  <script src="https://cdn.tailwindcss.com"></script>
9
+ <!-- Google Fonts: Inter -->
10
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
11
  <style>
12
  body { font-family: 'Inter', sans-serif; }
13
+ /* Smooth fade in animation */
14
+ .fade-in { animation: fadeIn 0.5s ease-in; }
15
+ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  </style>
17
  </head>
18
+ <body class="bg-gradient-to-br from-indigo-50 via-blue-50 to-cyan-50 min-h-screen flex flex-col justify-between text-slate-800">
19
 
20
+ <!-- Main Content Wrapper -->
21
+ <main class="flex-grow flex items-center justify-center p-4 sm:p-6">
22
+ <div class="w-full max-w-2xl bg-white rounded-3xl shadow-2xl overflow-hidden border border-slate-100 transform transition-all">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ <!-- Header Section -->
25
+ <div class="bg-indigo-600 p-8 text-center relative overflow-hidden">
26
+ <!-- Decorative background circle -->
27
+ <div class="absolute top-0 right-0 -mr-8 -mt-8 w-32 h-32 rounded-full bg-white opacity-10"></div>
 
 
 
28
 
29
+ <h2 class="text-3xl font-bold text-white tracking-tight relative z-10">ATS Resume Screening</h2>
30
+ <p class="text-indigo-100 mt-2 text-sm font-medium relative z-10 opacity-90">Powered by India AI Technology</p>
31
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
+ <!-- Form Section -->
34
+ <div class="p-6 sm:p-10 space-y-8">
35
+ <form method="post" class="space-y-6">
36
+ <div>
37
+ <label for="resume" class="block text-sm font-bold text-slate-700 mb-3 uppercase tracking-wider">
38
+ Resume Details
39
+ </label>
40
+ <div class="relative">
41
  <textarea
42
  id="resume"
43
  name="resume"
44
+ rows="8"
45
+ class="w-full p-4 rounded-xl border border-slate-300 bg-slate-50 focus:bg-white focus:ring-4 focus:ring-indigo-500/20 focus:border-indigo-500 transition-all duration-300 outline-none resize-y text-slate-700 placeholder-slate-400 leading-relaxed shadow-sm"
46
+ placeholder="Paste the candidate's resume text here to analyze..."
 
47
  required
48
+ ></textarea>
49
+ <div class="absolute bottom-3 right-3 text-slate-400 pointer-events-none">
50
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
51
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />
52
+ </svg>
53
  </div>
54
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  </div>
 
 
 
56
 
57
+ <button
58
+ type="submit"
59
+ class="w-full py-4 px-6 bg-gradient-to-r from-indigo-600 to-blue-600 hover:from-indigo-700 hover:to-blue-700 text-white font-bold rounded-xl shadow-lg hover:shadow-xl transform transition-all duration-200 hover:-translate-y-1 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
60
+ >
61
+ Predict Job Category
62
+ </button>
63
+ </form>
64
+
65
+ <!-- Result Display -->
66
+ {% if prediction %}
67
+ <div class="mt-8 fade-in">
68
+ <div class="p-1 bg-gradient-to-r from-green-400 to-emerald-500 rounded-2xl shadow-md">
69
+ <div class="bg-white p-6 rounded-xl flex items-center justify-between">
70
+ <div>
71
+ <h3 class="text-xs font-bold text-slate-500 uppercase tracking-widest mb-1">Predicted Category</h3>
72
+ <p class="text-2xl sm:text-3xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-green-600 to-emerald-700">
73
+ {{ prediction }}
74
+ </p>
75
+ </div>
76
+ <div class="h-12 w-12 bg-green-100 rounded-full flex items-center justify-center text-green-600">
77
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
78
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
79
+ </svg>
80
+ </div>
81
  </div>
82
  </div>
 
 
 
 
 
 
 
 
83
  </div>
84
+ {% endif %}
85
  </div>
 
 
86
  </div>
87
  </main>
88
+
89
+ <!-- Footer -->
90
+ <footer class="py-6 text-center">
91
+ <div class="inline-flex items-center justify-center px-4 py-1 rounded-full bg-white/50 backdrop-blur-sm border border-white/60 shadow-sm mb-4">
92
+ <span class="text-[10px] sm:text-xs font-bold text-slate-500 tracking-widest uppercase">
93
+ India AI 2026 Copyright
94
+ </span>
95
  </div>
96
  </footer>
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  </body>
99
  </html>