Omar76 commited on
Commit
6d45bfa
·
verified ·
1 Parent(s): b289ec3

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +556 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Academic Writer
3
- emoji: 😻
4
- colorFrom: pink
5
- colorTo: blue
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: academic-writer
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,556 @@
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>AcademicAI | Automated Academic Paper Writing Assistant</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <meta name="description" content="Automated academic paper writing assistant that drafts complete papers based on your research objectives and findings. Perfect for researchers and students.">
10
+ <style>
11
+ .gradient-bg {
12
+ background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
13
+ }
14
+ .sidebar {
15
+ transition: all 0.3s ease;
16
+ }
17
+ .progress-step {
18
+ position: relative;
19
+ }
20
+ .progress-step:not(:last-child):after {
21
+ content: '';
22
+ position: absolute;
23
+ top: 24px;
24
+ left: 12px;
25
+ height: 100%;
26
+ width: 2px;
27
+ background: #e5e7eb;
28
+ }
29
+ .active-step:after {
30
+ background: #3b82f6 !important;
31
+ }
32
+ .editor-toolbar {
33
+ background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
34
+ }
35
+ .citation-popup {
36
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
37
+ }
38
+ .upload-box {
39
+ border: 2px dashed #cbd5e0;
40
+ transition: all 0.2s ease;
41
+ }
42
+ .upload-box:hover {
43
+ border-color: #3b82f6;
44
+ background-color: #f8fafc;
45
+ }
46
+ .paper-section {
47
+ transition: all 0.2s ease;
48
+ }
49
+ .paper-section:hover {
50
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
51
+ }
52
+ @media (max-width: 768px) {
53
+ .sidebar {
54
+ transform: translateX(-100%);
55
+ position: fixed;
56
+ z-index: 50;
57
+ height: 100vh;
58
+ }
59
+ .sidebar-open {
60
+ transform: translateX(0);
61
+ }
62
+ }
63
+ </style>
64
+ </head>
65
+ <body class="bg-gray-50 font-sans antialiased">
66
+ <!-- Navigation -->
67
+ <nav class="bg-white shadow-sm">
68
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
69
+ <div class="flex justify-between h-16">
70
+ <div class="flex">
71
+ <div class="flex-shrink-0 flex items-center">
72
+ <i class="fas fa-robot text-blue-600 text-2xl mr-2"></i>
73
+ <span class="text-xl font-bold text-gray-900">AcademicAI</span>
74
+ </div>
75
+ <div class="hidden sm:ml-6 sm:flex sm:space-x-8">
76
+ <a href="#" class="border-blue-500 text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
77
+ Home
78
+ </a>
79
+ <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
80
+ How It Works
81
+ </a>
82
+ <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
83
+ Examples
84
+ </a>
85
+ <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
86
+ Pricing
87
+ </a>
88
+ </div>
89
+ </div>
90
+ <div class="hidden sm:ml-6 sm:flex sm:items-center">
91
+ <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium flex items-center">
92
+ <i class="fas fa-plus mr-2"></i> New Paper
93
+ </button>
94
+ <div class="ml-3 relative">
95
+ <div>
96
+ <button type="button" class="bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
97
+ <span class="sr-only">Open user menu</span>
98
+ <img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
99
+ </button>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ <div class="-mr-2 flex items-center sm:hidden">
104
+ <button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500" onclick="toggleMobileMenu()">
105
+ <span class="sr-only">Open main menu</span>
106
+ <i class="fas fa-bars"></i>
107
+ </button>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ </nav>
112
+
113
+ <!-- Mobile menu -->
114
+ <div class="hidden sm:hidden" id="mobile-menu">
115
+ <div class="pt-2 pb-3 space-y-1">
116
+ <a href="#" class="bg-blue-50 border-blue-500 text-blue-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Home</a>
117
+ <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">How It Works</a>
118
+ <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Examples</a>
119
+ <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Pricing</a>
120
+ </div>
121
+ </div>
122
+
123
+ <!-- Main Content -->
124
+ <div class="flex">
125
+ <!-- Sidebar -->
126
+ <div class="sidebar bg-white w-64 border-r border-gray-200 flex-shrink-0">
127
+ <div class="p-4">
128
+ <h2 class="text-lg font-medium text-gray-900 mb-4">Paper Creation</h2>
129
+ <div class="space-y-4">
130
+ <div class="progress-step active-step">
131
+ <div class="flex items-center">
132
+ <div class="flex-shrink-0 bg-blue-500 rounded-full h-6 w-6 flex items-center justify-center text-white text-xs font-medium">
133
+ 1
134
+ </div>
135
+ <div class="ml-3">
136
+ <p class="text-sm font-medium text-gray-900">Upload Research</p>
137
+ <p class="text-xs text-gray-500">Add your literature</p>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ <div class="progress-step">
142
+ <div class="flex items-center">
143
+ <div class="flex-shrink-0 bg-blue-500 rounded-full h-6 w-6 flex items-center justify-center text-white text-xs font-medium">
144
+ 2
145
+ </div>
146
+ <div class="ml-3">
147
+ <p class="text-sm font-medium text-gray-900">Key Information</p>
148
+ <p class="text-xs text-gray-500">Title, objectives, results</p>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ <div class="progress-step">
153
+ <div class="flex items-center">
154
+ <div class="flex-shrink-0 bg-gray-200 rounded-full h-6 w-6 flex items-center justify-center text-gray-500 text-xs font-medium">
155
+ 3
156
+ </div>
157
+ <div class="ml-3">
158
+ <p class="text-sm font-medium text-gray-500">Generate Draft</p>
159
+ <p class="text-xs text-gray-400">AI creates first draft</p>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ <div class="progress-step">
164
+ <div class="flex items-center">
165
+ <div class="flex-shrink-0 bg-gray-200 rounded-full h-6 w-6 flex items-center justify-center text-gray-500 text-xs font-medium">
166
+ 4
167
+ </div>
168
+ <div class="ml-3">
169
+ <p class="text-sm font-medium text-gray-500">Review & Edit</p>
170
+ <p class="text-xs text-gray-400">Refine your paper</p>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ <div class="progress-step">
175
+ <div class="flex items-center">
176
+ <div class="flex-shrink-0 bg-gray-200 rounded-full h-6 w-6 flex items-center justify-center text-gray-500 text-xs font-medium">
177
+ 5
178
+ </div>
179
+ <div class="ml-3">
180
+ <p class="text-sm font-medium text-gray-500">Export</p>
181
+ <p class="text-xs text-gray-400">Download final version</p>
182
+ </div>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ </div>
187
+ <div class="border-t border-gray-200 p-4">
188
+ <h2 class="text-lg font-medium text-gray-900 mb-4">Quick Actions</h2>
189
+ <div class="space-y-2">
190
+ <button class="w-full flex items-center justify-between px-4 py-2 bg-gray-50 text-gray-700 rounded-md hover:bg-gray-100">
191
+ <span>Research Library</span>
192
+ <i class="fas fa-book"></i>
193
+ </button>
194
+ <button class="w-full flex items-center justify-between px-4 py-2 bg-gray-50 text-gray-700 rounded-md hover:bg-gray-100">
195
+ <span>Paper Templates</span>
196
+ <i class="fas fa-file-alt"></i>
197
+ </button>
198
+ <button class="w-full flex items-center justify-between px-4 py-2 bg-gray-50 text-gray-700 rounded-md hover:bg-gray-100">
199
+ <span>Style Guide</span>
200
+ <i class="fas fa-pen-fancy"></i>
201
+ </button>
202
+ <button class="w-full flex items-center justify-between px-4 py-2 bg-gray-50 text-gray-700 rounded-md hover:bg-gray-100">
203
+ <span>Journal Finder</span>
204
+ <i class="fas fa-search"></i>
205
+ </button>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+ <!-- Main Content Area -->
211
+ <div class="flex-1 overflow-auto">
212
+ <!-- Toolbar -->
213
+ <div class="editor-toolbar border-b border-gray-200 p-4">
214
+ <div class="flex items-center justify-between">
215
+ <div class="flex items-center space-x-2">
216
+ <h1 class="text-xl font-semibold text-gray-800">Create New Paper</h1>
217
+ <span class="px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 rounded-full">Step 1/5</span>
218
+ </div>
219
+ <div class="flex items-center space-x-4">
220
+ <button class="flex items-center text-gray-600 hover:text-gray-900">
221
+ <i class="fas fa-question-circle mr-1"></i>
222
+ <span class="text-sm">Help</span>
223
+ </button>
224
+ <button class="flex items-center text-gray-600 hover:text-gray-900">
225
+ <i class="fas fa-video mr-1"></i>
226
+ <span class="text-sm">Tutorial</span>
227
+ </button>
228
+ <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium">
229
+ <i class="fas fa-save mr-1"></i> Save Progress
230
+ </button>
231
+ </div>
232
+ </div>
233
+ </div>
234
+
235
+ <!-- Editor Area -->
236
+ <div class="p-6 max-w-4xl mx-auto">
237
+ <div class="mb-8 text-center">
238
+ <h2 class="text-2xl font-bold text-gray-900 mb-2">Upload Your Research Materials</h2>
239
+ <p class="text-gray-600">AcademicAI will analyze your uploaded literature to draft a complete paper based on your key inputs.</p>
240
+ </div>
241
+
242
+ <!-- Upload Section -->
243
+ <div class="bg-white border border-gray-200 rounded-lg overflow-hidden mb-8">
244
+ <div class="border-b border-gray-200 bg-gray-50 px-4 py-3">
245
+ <h3 class="text-base font-medium text-gray-900">Upload Research Documents</h3>
246
+ </div>
247
+ <div class="p-6">
248
+ <div class="upload-box rounded-lg p-8 text-center cursor-pointer" onclick="document.getElementById('file-upload').click()">
249
+ <input id="file-upload" type="file" class="hidden" multiple>
250
+ <i class="fas fa-cloud-upload-alt text-4xl text-blue-500 mb-3"></i>
251
+ <h4 class="text-lg font-medium text-gray-900 mb-1">Drag & drop files here</h4>
252
+ <p class="text-sm text-gray-500 mb-4">or click to browse files</p>
253
+ <p class="text-xs text-gray-400">Supported formats: PDF, DOCX, TXT (Max 20MB each)</p>
254
+ </div>
255
+ <div class="mt-4 grid grid-cols-1 gap-4" id="uploaded-files">
256
+ <!-- Uploaded files will appear here -->
257
+ </div>
258
+ </div>
259
+ </div>
260
+
261
+ <!-- Quick Start Option -->
262
+ <div class="bg-white border border-gray-200 rounded-lg overflow-hidden mb-8">
263
+ <div class="border-b border-gray-200 bg-gray-50 px-4 py-3">
264
+ <h3 class="text-base font-medium text-gray-900">Quick Start Without Uploads</h3>
265
+ </div>
266
+ <div class="p-6">
267
+ <div class="flex items-start">
268
+ <div class="flex-shrink-0 bg-blue-100 rounded-md p-3">
269
+ <i class="fas fa-bolt text-blue-600"></i>
270
+ </div>
271
+ <div class="ml-4">
272
+ <h4 class="text-base font-medium text-gray-900 mb-2">Use our research database</h4>
273
+ <p class="text-sm text-gray-600 mb-4">If you don't have your own materials, we can use our extensive academic database to find relevant research for your topic.</p>
274
+ <div class="flex">
275
+ <input type="text" placeholder="Enter your research topic or keywords" class="flex-1 border border-gray-300 rounded-l-md px-4 py-2 focus:ring-blue-500 focus:border-blue-500">
276
+ <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-r-md text-sm font-medium">
277
+ Search <i class="fas fa-search ml-1"></i>
278
+ </button>
279
+ </div>
280
+ </div>
281
+ </div>
282
+ </div>
283
+ </div>
284
+
285
+ <!-- Next Steps -->
286
+ <div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
287
+ <div class="flex items-start">
288
+ <div class="flex-shrink-0">
289
+ <i class="fas fa-arrow-circle-right text-blue-500 text-xl"></i>
290
+ </div>
291
+ <div class="ml-3">
292
+ <h3 class="text-sm font-medium text-blue-800">Ready for the next step?</h3>
293
+ <p class="text-sm text-blue-700 mt-1">After uploading your research materials, you'll provide the key information we need to draft your paper.</p>
294
+ <button class="mt-3 bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium" onclick="nextStep()">
295
+ Continue to Key Information <i class="fas fa-arrow-right ml-1"></i>
296
+ </button>
297
+ </div>
298
+ </div>
299
+ </div>
300
+ </div>
301
+ </div>
302
+ </div>
303
+
304
+ <!-- Key Information Modal -->
305
+ <div id="key-info-modal" class="hidden fixed inset-0 overflow-y-auto z-50">
306
+ <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
307
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
308
+ <div class="absolute inset-0 bg-gray-500 opacity-75" onclick="hideKeyInfoModal()"></div>
309
+ </div>
310
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
311
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-2xl sm:w-full">
312
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
313
+ <div class="sm:flex sm:items-start">
314
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10">
315
+ <i class="fas fa-key text-blue-600"></i>
316
+ </div>
317
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
318
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
319
+ Provide Key Information
320
+ </h3>
321
+ <div class="mt-4">
322
+ <p class="text-sm text-gray-500 mb-6">Please provide the essential details about your paper. Our AI will use this information along with your uploaded research to draft a complete academic paper.</p>
323
+
324
+ <div class="mb-6">
325
+ <label for="paper-title" class="block text-sm font-medium text-gray-700">Paper Title</label>
326
+ <input type="text" id="paper-title" class="mt-1 block w-full border border-gray-300 rounded-md p-3 focus:ring-blue-500 focus:border-blue-500" placeholder="Enter your paper title...">
327
+ </div>
328
+
329
+ <div class="mb-6">
330
+ <label for="paper-objectives" class="block text-sm font-medium text-gray-700">Research Objectives</label>
331
+ <textarea id="paper-objectives" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md p-3 focus:ring-blue-500 focus:border-blue-500" placeholder="What are the main objectives of your research?"></textarea>
332
+ <p class="mt-1 text-xs text-gray-500">You can list multiple objectives as bullet points.</p>
333
+ </div>
334
+
335
+ <div class="mb-6">
336
+ <label for="paper-results" class="block text-sm font-medium text-gray-700">Key Findings/Results</label>
337
+ <textarea id="paper-results" rows="4" class="mt-1 block w-full border border-gray-300 rounded-md p-3 focus:ring-blue-500 focus:border-blue-500" placeholder="Summarize your main findings or results..."></textarea>
338
+ <p class="mt-1 text-xs text-gray-500">Include any significant data, trends, or conclusions from your research.</p>
339
+ </div>
340
+
341
+ <div class="mb-4">
342
+ <label for="paper-style" class="block text-sm font-medium text-gray-700">Preferred Citation Style</label>
343
+ <select id="paper-style" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
344
+ <option>APA 7th Edition</option>
345
+ <option>MLA 9th Edition</option>
346
+ <option>Chicago</option>
347
+ <option>Harvard</option>
348
+ <option>IEEE</option>
349
+ </select>
350
+ </div>
351
+ </div>
352
+ </div>
353
+ </div>
354
+ </div>
355
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
356
+ <button type="button" onclick="generateDraft()" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
357
+ Generate Draft
358
+ </button>
359
+ <button type="button" onclick="hideKeyInfoModal()" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
360
+ Cancel
361
+ </button>
362
+ </div>
363
+ </div>
364
+ </div>
365
+ </div>
366
+
367
+ <!-- Generated Draft Modal -->
368
+ <div id="draft-modal" class="hidden fixed inset-0 overflow-y-auto z-50">
369
+ <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
370
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
371
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
372
+ </div>
373
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
374
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-4xl sm:w-full">
375
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
376
+ <div class="sm:flex sm:items-start">
377
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-green-100 sm:mx-0 sm:h-10 sm:w-10">
378
+ <i class="fas fa-file-alt text-green-600"></i>
379
+ </div>
380
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
381
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
382
+ Your Generated Paper Draft
383
+ </h3>
384
+ <div class="mt-4">
385
+ <div class="bg-gray-50 p-4 rounded-lg mb-4">
386
+ <h4 class="font-medium text-gray-900 mb-2">Title: <span id="display-title" class="font-normal"></span></h4>
387
+ <div class="flex space-x-4">
388
+ <div class="flex-1">
389
+ <h5 class="text-sm font-medium text-gray-700">Objectives</h5>
390
+ <div id="display-objectives" class="text-sm text-gray-600 mt-1"></div>
391
+ </div>
392
+ <div class="flex-1">
393
+ <h5 class="text-sm font-medium text-gray-700">Key Findings</h5>
394
+ <div id="display-results" class="text-sm text-gray-600 mt-1"></div>
395
+ </div>
396
+ </div>
397
+ </div>
398
+
399
+ <div class="space-y-6">
400
+ <div class="paper-section bg-white border border-gray-200 rounded-lg p-4">
401
+ <h4 class="font-medium text-gray-900 mb-2">Abstract</h4>
402
+ <p class="text-gray-700 text-sm">This study examines [topic] through [methodology]. Our findings indicate [key finding 1], [key finding 2], and [key finding 3]. These results suggest [implication] and contribute to [field] by [contribution].</p>
403
+ </div>
404
+
405
+ <div class="paper-section bg-white border border-gray-200 rounded-lg p-4">
406
+ <h4 class="font-medium text-gray-900 mb-2">Introduction</h4>
407
+ <p class="text-gray-700 text-sm">[Topic] has become increasingly important in [field] due to [reason]. Previous research has shown [previous findings], but gaps remain in [specific gap]. This study addresses these gaps by [approach].</p>
408
+ </div>
409
+
410
+ <div class="paper-section bg-white border border-gray-200 rounded-lg p-4">
411
+ <h4 class="font-medium text-gray-900 mb-2">Literature Review</h4>
412
+ <p class="text-gray-700 text-sm">Theoretical frameworks for understanding [topic] include [theory 1] (Author, Year) and [theory 2] (Author, Year). Recent empirical studies have demonstrated [finding] (Author, Year), while others have shown [contrasting finding] (Author, Year).</p>
413
+ </div>
414
+
415
+ <div class="paper-section bg-white border border-gray-200 rounded-lg p-4">
416
+ <h4 class="font-medium text-gray-900 mb-2">Methodology</h4>
417
+ <p class="text-gray-700 text-sm">We employed [method] to examine [research questions]. Our sample consisted of [description] (N=XX). Data were collected using [instrument] and analyzed with [analysis technique]. Reliability was ensured through [method].</p>
418
+ </div>
419
+
420
+ <div class="paper-section bg-white border border-gray-200 rounded-lg p-4">
421
+ <h4 class="font-medium text-gray-900 mb-2">Results</h4>
422
+ <p class="text-gray-700 text-sm">Analysis revealed [key result 1] (M=XX, SD=XX), supporting [hypothesis]. Additionally, we found [key result 2], which was [significant/non-significant], p=XX. Qualitative analysis showed [theme 1] and [theme 2].</p>
423
+ </div>
424
+
425
+ <div class="paper-section bg-white border border-gray-200 rounded-lg p-4">
426
+ <h4 class="font-medium text-gray-900 mb-2">Discussion</h4>
427
+ <p class="text-gray-700 text-sm">Our findings align with [previous work] in showing [similarity]. However, the unexpected result of [finding] may suggest [interpretation]. These results have implications for [application] and suggest future research should examine [direction].</p>
428
+ </div>
429
+
430
+ <div class="paper-section bg-white border border-gray-200 rounded-lg p-4">
431
+ <h4 class="font-medium text-gray-900 mb-2">References</h4>
432
+ <p class="text-gray-700 text-sm">Author, A. (Year). Title of article. <em>Journal Name</em>, <em>Volume</em>(Issue), page-range. DOI<br>
433
+ Author, B. (Year). <em>Book title</em>. Publisher.<br>
434
+ Author, C. (Year). Title of webpage. Website Name. URL</p>
435
+ </div>
436
+ </div>
437
+ </div>
438
+ </div>
439
+ </div>
440
+ </div>
441
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
442
+ <button type="button" onclick="proceedToEditing()" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
443
+ Proceed to Editing <i class="fas fa-edit ml-1"></i>
444
+ </button>
445
+ <button type="button" onclick="regenerateDraft()" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
446
+ Regenerate Draft <i class="fas fa-sync-alt ml-1"></i>
447
+ </button>
448
+ </div>
449
+ </div>
450
+ </div>
451
+ </div>
452
+
453
+ <script>
454
+ // Toggle mobile menu
455
+ function toggleMobileMenu() {
456
+ const menu = document.getElementById('mobile-menu');
457
+ menu.classList.toggle('hidden');
458
+ }
459
+
460
+ // Toggle sidebar on mobile
461
+ function toggleSidebar() {
462
+ const sidebar = document.querySelector('.sidebar');
463
+ sidebar.classList.toggle('sidebar-open');
464
+ }
465
+
466
+ // Show key information modal
467
+ function showKeyInfoModal() {
468
+ const modal = document.getElementById('key-info-modal');
469
+ modal.classList.remove('hidden');
470
+ }
471
+
472
+ // Hide key information modal
473
+ function hideKeyInfoModal() {
474
+ const modal = document.getElementById('key-info-modal');
475
+ modal.classList.add('hidden');
476
+ }
477
+
478
+ // Show draft modal
479
+ function showDraftModal() {
480
+ const modal = document.getElementById('draft-modal');
481
+ modal.classList.remove('hidden');
482
+ }
483
+
484
+ // Next step button handler
485
+ function nextStep() {
486
+ hideKeyInfoModal();
487
+ showKeyInfoModal();
488
+ }
489
+
490
+ // Generate draft button handler
491
+ function generateDraft() {
492
+ // Get values from form
493
+ const title = document.getElementById('paper-title').value;
494
+ const objectives = document.getElementById('paper-objectives').value;
495
+ const results = document.getElementById('paper-results').value;
496
+
497
+ // Display values in draft modal
498
+ document.getElementById('display-title').textContent = title;
499
+ document.getElementById('display-objectives').textContent = objectives;
500
+ document.getElementById('display-results').textContent = results;
501
+
502
+ // Hide key info modal and show draft modal
503
+ hideKeyInfoModal();
504
+ showDraftModal();
505
+ }
506
+
507
+ // Proceed to editing
508
+ function proceedToEditing() {
509
+ alert('Redirecting to full editor interface...');
510
+ // In a real implementation, this would redirect to the editing page
511
+ }
512
+
513
+ // Regenerate draft
514
+ function regenerateDraft() {
515
+ alert('Generating a new version of your draft...');
516
+ // In a real implementation, this would call the AI again
517
+ }
518
+
519
+ // File upload handling
520
+ document.getElementById('file-upload').addEventListener('change', function(e) {
521
+ const files = e.target.files;
522
+ const uploadedFilesContainer = document.getElementById('uploaded-files');
523
+ uploadedFilesContainer.innerHTML = '';
524
+
525
+ for (let i = 0; i < files.length; i++) {
526
+ const file = files[i];
527
+ const fileElement = document.createElement('div');
528
+ fileElement.className = 'flex items-center justify-between p-3 bg-gray-50 rounded-md';
529
+ fileElement.innerHTML = `
530
+ <div class="flex items-center">
531
+ <i class="fas fa-file-pdf text-red-500 text-xl mr-3"></i>
532
+ <div>
533
+ <p class="text-sm font-medium text-gray-900">${file.name}</p>
534
+ <p class="text-xs text-gray-500">${(file.size / 1024 / 1024).toFixed(2)} MB</p>
535
+ </div>
536
+ </div>
537
+ <button class="text-red-500 hover:text-red-700" onclick="this.parentNode.remove()">
538
+ <i class="fas fa-times"></i>
539
+ </button>
540
+ `;
541
+ uploadedFilesContainer.appendChild(fileElement);
542
+ }
543
+ });
544
+
545
+ // Simulate responsive behavior
546
+ window.addEventListener('resize', function() {
547
+ if (window.innerWidth > 768) {
548
+ const sidebar = document.querySelector('.sidebar');
549
+ sidebar.classList.remove('sidebar-open');
550
+ const mobileMenu = document.getElementById('mobile-menu');
551
+ mobileMenu.classList.add('hidden');
552
+ }
553
+ });
554
+ </script>
555
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Omar76/academic-writer" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
556
+ </html>