pvanand commited on
Commit
5900bd9
·
verified ·
1 Parent(s): 15b9ca1

Upload 7 files

Browse files
templates/apps-hub/article-writer.html CHANGED
@@ -1,333 +1,353 @@
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>Report Generator</title>
7
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
8
- <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
9
- <style>
10
- /* Main styles */
11
- body {
12
- margin: 0;
13
- padding: 0;
14
- text-rendering: optimizeLegibility;
15
- -webkit-font-smoothing: antialiased;
16
- color: rgba(0,0,0,0.8);
17
- position: relative;
18
- min-height: 100vh;
19
- font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
20
- font-size: 20px;
21
- line-height: 1.58;
22
- color: rgba(0, 0, 0, 0.8);
23
- background-color: #fff;
24
- margin: 0;
25
- padding: 0;
26
- }
27
- .container {
28
- max-width: 800px;
29
- margin: 0 auto;
30
- padding: 0 20px;
31
- }
32
- /* Typography */
33
- h1, h2, h3, h4, h5, h6 {
34
- font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
35
- font-weight: 700;
36
- color: rgba(0, 0, 0, 0.84);
37
- letter-spacing: -0.022em;
38
- line-height: 1.2;
39
- }
40
- h1 {
41
- font-size: 40px;
42
- margin-bottom: 0.5em;
43
- }
44
- h2 {
45
- font-size: 32px;
46
- margin-top: 1.5em;
47
- margin-bottom: 0.5em;
48
- }
49
- h3 {
50
- font-size: 26px;
51
- margin-top: 1.5em;
52
- margin-bottom: 0.5em;
53
- }
54
- p {
55
- margin-bottom: 32px;
56
- }
57
- /* Links */
58
- a {
59
- color: #1a8917;
60
- text-decoration: none;
61
- }
62
- a:hover {
63
- text-decoration: underline;
64
- }
65
- /* Input container */
66
- #input-container {
67
- margin-bottom: 40px;
68
- background-color: #f9f9f9;
69
- padding: 32px;
70
- border-radius: 5px;
71
- }
72
- textarea {
73
- width: 100%;
74
- padding: 12px;
75
- margin-bottom: 20px;
76
- border: 1px solid rgba(0, 0, 0, 0.15);
77
- border-radius: 4px;
78
- font-size: 18px;
79
- resize: vertical;
80
- box-sizing: border-box;
81
- font-family: inherit;
82
- }
83
- button {
84
- padding: 12px 24px;
85
- background-color: #1a8917;
86
- color: white;
87
- border: none;
88
- border-radius: 4px;
89
- cursor: pointer;
90
- font-size: 18px;
91
- transition: background-color 0.3s;
92
- }
93
- button:hover {
94
- background-color: #0f6b0f;
95
- }
96
- /* Output container */
97
- #output-container {
98
- display: flex;
99
- flex-direction: column;
100
- gap: 40px;
101
- }
102
- #report-container, #sources-container {
103
- background-color: #fff;
104
- padding: 32px;
105
- border-radius: 5px;
106
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
107
- overflow-wrap: break-word;
108
- word-wrap: break-word;
109
- word-break: break-word;
110
- }
111
- /* Sources */
112
- .source-item {
113
- margin-bottom: 32px;
114
- padding: 24px;
115
- background-color: #f9f9f9;
116
- border: 1px solid #e0e0e0;
117
- border-radius: 5px;
118
- position: relative;
119
- cursor: pointer;
120
- transition: box-shadow 0.3s;
121
- }
122
- .source-item:hover {
123
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
124
- }
125
- .source-url {
126
- color: #1a8917;
127
- text-decoration: none;
128
- word-break: break-all;
129
- font-weight: bold;
130
- display: block;
131
- margin-bottom: 16px;
132
- font-size: 18px;
133
- }
134
- .source-content {
135
- margin-top: 16px;
136
- position: relative;
137
- overflow: hidden;
138
- }
139
- .source-snippet {
140
- max-height: 150px;
141
- overflow: hidden;
142
- }
143
- .source-full {
144
- display: none;
145
- }
146
- .expand-indicator {
147
- position: absolute;
148
- bottom: 0;
149
- left: 0;
150
- right: 0;
151
- height: 40px;
152
- background: linear-gradient(to bottom, rgba(249,249,249,0), rgba(249,249,249,1));
153
- display: flex;
154
- align-items: center;
155
- justify-content: center;
156
- }
157
- .expand-indicator::after {
158
- content: '▼';
159
- font-size: 14px;
160
- color: #666;
161
- }
162
- .expanded .expand-indicator::after {
163
- content: '▲';
164
- }
165
- /* Responsive adjustments */
166
- @media (max-width: 768px) {
167
- .container {
168
- padding: 0 16px;
169
- }
170
- h1 {
171
- font-size: 32px;
172
- }
173
- h2 {
174
- font-size: 24px;
175
- }
176
- #input-container, #report-container, #sources-container {
177
- padding: 24px;
178
- }
179
- }
180
- </style>
181
- </head>
182
- <body>
183
- <div class="container">
184
- <div id="input-container">
185
- <h1>Blog Post Generator</h1>
186
- <textarea id="description" rows="4" placeholder="Enter description">write a medium article on nvidia stock performance</textarea>
187
- <button onclick="generateReport()">Generate Report</button>
188
- </div>
189
- <div id="output-container">
190
- <div id="report-container"></div>
191
- <div id="sources-container"></div>
192
- </div>
193
- </div>
194
- <script>
195
- async function generateReport() {
196
- const description = document.getElementById('description').value;
197
- const reportContainer = document.getElementById('report-container');
198
- const sourcesContainer = document.getElementById('sources-container');
199
- reportContainer.innerHTML = 'Generating report...';
200
- sourcesContainer.innerHTML = '';
201
- try {
202
- const response = await fetch('https://pvanand-search-generate-prod.hf.space/generate_report', {
203
- method: 'POST',
204
- headers: {
205
- 'Content-Type': 'application/json',
206
- 'Accept': 'text/plain'
207
- },
208
- body: JSON.stringify({
209
- description: description,
210
- user_id: "",
211
- user_name: "multi-agent-research",
212
- internet: true,
213
- output_format: "report_table",
214
- data_format: "Structured data",
215
- generate_charts: true,
216
- output_as_md: true
217
- })
218
- });
219
- if (!response.ok) {
220
- throw new Error(`HTTP error! status: ${response.status}`);
221
- }
222
- const reader = response.body.getReader();
223
- const decoder = new TextDecoder();
224
- let markdown = '';
225
- let metadata = '';
226
- let isReadingMetadata = false;
227
- while (true) {
228
- const { value, done } = await reader.read();
229
- if (done) break;
230
-
231
- const chunk = decoder.decode(value, { stream: true });
232
-
233
- if (chunk.includes('<report-metadata>')) {
234
- isReadingMetadata = true;
235
- metadata = '';
236
- }
237
-
238
- if (isReadingMetadata) {
239
- metadata += chunk;
240
- if (chunk.includes('</report-metadata>')) {
241
- isReadingMetadata = false;
242
- processMetadata(metadata);
243
- }
244
- } else {
245
- markdown += chunk;
246
- renderMarkdown(markdown);
247
- }
248
- }
249
- } catch (error) {
250
- reportContainer.innerHTML = `Error generating report: ${error.message}`;
251
- }
252
- }
253
- function renderMarkdown(markdown) {
254
- const reportContainer = document.getElementById('report-container');
255
- const reportContent = markdown.match(/<report>([\s\S]*)<\/report>/);
256
-
257
- if (reportContent) {
258
- reportContainer.innerHTML = marked.parse(reportContent[1]);
259
- } else {
260
- reportContainer.innerHTML = marked.parse(markdown);
261
- }
262
-
263
- const scripts = reportContainer.getElementsByTagName('script');
264
- Array.from(scripts).forEach(script => {
265
- const newScript = document.createElement('script');
266
- newScript.textContent = script.textContent;
267
- script.parentNode.replaceChild(newScript, script);
268
- });
269
- // Make Plotly charts responsive
270
- const plots = reportContainer.querySelectorAll('.js-plotly-plot');
271
- plots.forEach(plot => {
272
- Plotly.Plots.resize(plot);
273
- });
274
- }
275
- function processMetadata(metadata) {
276
- const sourcesContainer = document.getElementById('sources-container');
277
- const metadataMatch = metadata.match(/all-text-with-urls: (.+)/);
278
-
279
- if (metadataMatch) {
280
- const metadataObj = JSON.parse(metadataMatch[1]);
281
-
282
- sourcesContainer.innerHTML = '<h2>Sources</h2>';
283
- metadataObj.forEach(([content, url]) => {
284
- if (content.trim() !== "") {
285
- const sourceItem = document.createElement('div');
286
- sourceItem.className = 'source-item';
287
- const snippet = content.length > 400 ? content.substring(0, 400) + '...' : content;
288
- sourceItem.innerHTML = `
289
- <a href="${url}" target="_blank" class="source-url">${url}</a>
290
- <div class="source-content">
291
- <div class="source-snippet">${marked.parse(snippet)}</div>
292
- <div class="source-full">${marked.parse(content)}</div>
293
- <div class="expand-indicator"></div>
294
- </div>
295
- `;
296
- sourcesContainer.appendChild(sourceItem);
297
-
298
- const sourceUrl = sourceItem.querySelector('.source-url');
299
- const sourceContent = sourceItem.querySelector('.source-content');
300
- const snippetDiv = sourceItem.querySelector('.source-snippet');
301
- const fullDiv = sourceItem.querySelector('.source-full');
302
-
303
- sourceContent.addEventListener('click', function(e) {
304
- if (!sourceItem.classList.contains('expanded')) {
305
- sourceItem.classList.add('expanded');
306
- snippetDiv.style.display = 'none';
307
- fullDiv.style.display = 'block';
308
- } else if (e.clientY > sourceContent.getBoundingClientRect().bottom - 30) {
309
- sourceItem.classList.remove('expanded');
310
- snippetDiv.style.display = 'block';
311
- fullDiv.style.display = 'none';
312
- }
313
- });
314
-
315
- sourceUrl.addEventListener('click', function(e) {
316
- e.stopPropagation();
317
- });
318
- }
319
- });
320
- } else {
321
- sourcesContainer.innerHTML = '<h2>Sources</h2><p>No source information available.</p>';
322
- }
323
- }
324
- // Make Plotly charts responsive on window resize
325
- window.addEventListener('resize', function() {
326
- const plots = document.querySelectorAll('.js-plotly-plot');
327
- plots.forEach(plot => {
328
- Plotly.Plots.resize(plot);
329
- });
330
- });
331
- </script>
332
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  </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>Report Generator</title>
7
+ <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
8
+ <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
9
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
10
+ <script src="https://cdn.jsdelivr.net/npm/appwrite@15.0.0"></script>
11
+ <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
12
+ <style>
13
+ /* Main styles */
14
+ /* body {
15
+ margin: 0;
16
+ padding: 0;
17
+ text-rendering: optimizeLegibility;
18
+ -webkit-font-smoothing: antialiased;
19
+ color: rgba(0,0,0,0.8);
20
+ position: relative;
21
+ min-height: 100vh;
22
+ font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
23
+ font-size: 20px;
24
+ line-height: 1.58;
25
+ color: rgba(0, 0, 0, 0.8);
26
+ background-color: #fff;
27
+ } */
28
+ .container {
29
+ text-rendering: optimizeLegibility;
30
+ -webkit-font-smoothing: antialiased;
31
+ color: rgba(0,0,0,0.8);
32
+ position: relative;
33
+ min-height: 100vh;
34
+ font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
35
+ font-size: 20px;
36
+ line-height: 1.58;
37
+ color: rgba(0, 0, 0, 0.8);
38
+ background-color: #fff;
39
+ max-width: 800px;
40
+ margin: 0 auto;
41
+ padding: 0 20px;
42
+ }
43
+ /* Typography */
44
+ h1, h2, h3, h4, h5, h6 {
45
+ font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
46
+ font-weight: 700;
47
+ color: rgba(0, 0, 0, 0.84);
48
+ letter-spacing: -0.022em;
49
+ line-height: 1.2;
50
+ }
51
+ h1 {
52
+ font-size: 40px;
53
+ margin-bottom: 0.5em;
54
+ }
55
+ h2 {
56
+ font-size: 32px;
57
+ margin-top: 1.5em;
58
+ margin-bottom: 0.5em;
59
+ }
60
+ h3 {
61
+ font-size: 26px;
62
+ margin-top: 1.5em;
63
+ margin-bottom: 0.5em;
64
+ }
65
+ p {
66
+ margin-bottom: 32px;
67
+ }
68
+ /* Links */
69
+ a {
70
+ color: #1a8917;
71
+ text-decoration: none;
72
+ }
73
+ a:hover {
74
+ text-decoration: underline;
75
+ }
76
+ /* Input container */
77
+ #input-container {
78
+ margin-bottom: 40px;
79
+ background-color: #f9f9f9;
80
+ padding: 32px;
81
+ border-radius: 5px;
82
+ }
83
+ textarea {
84
+ width: 100%;
85
+ padding: 12px;
86
+ margin-bottom: 20px;
87
+ border: 1px solid rgba(0, 0, 0, 0.15);
88
+ border-radius: 4px;
89
+ font-size: 18px;
90
+ resize: vertical;
91
+ box-sizing: border-box;
92
+ font-family: inherit;
93
+ }
94
+ button {
95
+ padding: 12px 24px;
96
+ background-color: #1a8917;
97
+ color: white;
98
+ border: none;
99
+ border-radius: 4px;
100
+ cursor: pointer;
101
+ font-size: 18px;
102
+ transition: background-color 0.3s;
103
+ }
104
+ button:hover {
105
+ background-color: #0f6b0f;
106
+ }
107
+ /* Output container */
108
+ #output-container {
109
+ display: flex;
110
+ flex-direction: column;
111
+ gap: 40px;
112
+ }
113
+ #report-container, #sources-container {
114
+ background-color: #fff;
115
+ padding: 32px;
116
+ border-radius: 5px;
117
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
118
+ overflow-wrap: break-word;
119
+ word-wrap: break-word;
120
+ word-break: break-word;
121
+ }
122
+ /* Sources */
123
+ .source-item {
124
+ margin-bottom: 32px;
125
+ padding: 24px;
126
+ background-color: #f9f9f9;
127
+ border: 1px solid #e0e0e0;
128
+ border-radius: 5px;
129
+ position: relative;
130
+ cursor: pointer;
131
+ transition: box-shadow 0.3s;
132
+ }
133
+ .source-item:hover {
134
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
135
+ }
136
+ .source-url {
137
+ color: #1a8917;
138
+ text-decoration: none;
139
+ word-break: break-all;
140
+ font-weight: bold;
141
+ display: block;
142
+ margin-bottom: 16px;
143
+ font-size: 18px;
144
+ }
145
+ .source-content {
146
+ margin-top: 16px;
147
+ position: relative;
148
+ overflow: hidden;
149
+ }
150
+ .source-snippet {
151
+ max-height: 150px;
152
+ overflow: hidden;
153
+ }
154
+ .source-full {
155
+ display: none;
156
+ }
157
+ .expand-indicator {
158
+ position: absolute;
159
+ bottom: 0;
160
+ left: 0;
161
+ right: 0;
162
+ height: 40px;
163
+ background: linear-gradient(to bottom, rgba(249,249,249,0), rgba(249,249,249,1));
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: center;
167
+ }
168
+ .expand-indicator::after {
169
+ content: '▼';
170
+ font-size: 14px;
171
+ color: #666;
172
+ }
173
+ .expanded .expand-indicator::after {
174
+ content: '▲';
175
+ }
176
+ /* Responsive adjustments */
177
+ @media (max-width: 768px) {
178
+ .container {
179
+ padding: 0 16px;
180
+ }
181
+ h1 {
182
+ font-size: 32px;
183
+ }
184
+ h2 {
185
+ font-size: 24px;
186
+ }
187
+ #input-container, #report-container, #sources-container {
188
+ padding: 24px;
189
+ }
190
+ }
191
+ </style>
192
+ <link rel="stylesheet" href="/css/ai-sidebar.css">
193
+ </head>
194
+ <body>
195
+ <div id="app" class="ai-sidebar__container">
196
+ <sidebar-component></sidebar-component>
197
+ <main class="ai-sidebar__content">
198
+ <div class="container">
199
+ <div id="input-container">
200
+ <h1>Blog Post Generator</h1>
201
+ <textarea id="description" rows="4" placeholder="Enter description">write a medium article on nvidia stock performance</textarea>
202
+ <button onclick="generateReport()">Generate Report</button>
203
+ </div>
204
+ <div id="output-container">
205
+ <div id="report-container"></div>
206
+ <div id="sources-container"></div>
207
+ </div>
208
+ </div>
209
+ </main>
210
+ </div>
211
+ <script src="/js/auth.js"></script>
212
+ <script src="/js/sidebar-component.js"></script>
213
+ <script src="/js/main-app.js"></script>
214
+ <script>
215
+ async function generateReport() {
216
+ const description = document.getElementById('description').value;
217
+ const reportContainer = document.getElementById('report-container');
218
+ const sourcesContainer = document.getElementById('sources-container');
219
+ reportContainer.innerHTML = 'Generating report...';
220
+ sourcesContainer.innerHTML = '';
221
+ try {
222
+ const response = await fetch('https://pvanand-search-generate-prod.hf.space/generate_report', {
223
+ method: 'POST',
224
+ headers: {
225
+ 'Content-Type': 'application/json',
226
+ 'Accept': 'text/plain'
227
+ },
228
+ body: JSON.stringify({
229
+ description: description,
230
+ user_id: "",
231
+ user_name: "multi-agent-research",
232
+ internet: true,
233
+ output_format: "report_table",
234
+ data_format: "Structured data",
235
+ generate_charts: true,
236
+ output_as_md: true
237
+ })
238
+ });
239
+ if (!response.ok) {
240
+ throw new Error(`HTTP error! status: ${response.status}`);
241
+ }
242
+ const reader = response.body.getReader();
243
+ const decoder = new TextDecoder();
244
+ let markdown = '';
245
+ let metadata = '';
246
+ let isReadingMetadata = false;
247
+ while (true) {
248
+ const { value, done } = await reader.read();
249
+ if (done) break;
250
+
251
+ const chunk = decoder.decode(value, { stream: true });
252
+
253
+ if (chunk.includes('<report-metadata>')) {
254
+ isReadingMetadata = true;
255
+ metadata = '';
256
+ }
257
+
258
+ if (isReadingMetadata) {
259
+ metadata += chunk;
260
+ if (chunk.includes('</report-metadata>')) {
261
+ isReadingMetadata = false;
262
+ processMetadata(metadata);
263
+ }
264
+ } else {
265
+ markdown += chunk;
266
+ renderMarkdown(markdown);
267
+ }
268
+ }
269
+ } catch (error) {
270
+ reportContainer.innerHTML = `Error generating report: ${error.message}`;
271
+ }
272
+ }
273
+ function renderMarkdown(markdown) {
274
+ const reportContainer = document.getElementById('report-container');
275
+ const reportContent = markdown.match(/<report>([\s\S]*)<\/report>/);
276
+
277
+ if (reportContent) {
278
+ reportContainer.innerHTML = marked.parse(reportContent[1]);
279
+ } else {
280
+ reportContainer.innerHTML = marked.parse(markdown);
281
+ }
282
+
283
+ const scripts = reportContainer.getElementsByTagName('script');
284
+ Array.from(scripts).forEach(script => {
285
+ const newScript = document.createElement('script');
286
+ newScript.textContent = script.textContent;
287
+ script.parentNode.replaceChild(newScript, script);
288
+ });
289
+ // Make Plotly charts responsive
290
+ const plots = reportContainer.querySelectorAll('.js-plotly-plot');
291
+ plots.forEach(plot => {
292
+ Plotly.Plots.resize(plot);
293
+ });
294
+ }
295
+ function processMetadata(metadata) {
296
+ const sourcesContainer = document.getElementById('sources-container');
297
+ const metadataMatch = metadata.match(/all-text-with-urls: (.+)/);
298
+
299
+ if (metadataMatch) {
300
+ const metadataObj = JSON.parse(metadataMatch[1]);
301
+
302
+ sourcesContainer.innerHTML = '<h2>Sources</h2>';
303
+ metadataObj.forEach(([content, url]) => {
304
+ if (content.trim() !== "") {
305
+ const sourceItem = document.createElement('div');
306
+ sourceItem.className = 'source-item';
307
+ const snippet = content.length > 400 ? content.substring(0, 400) + '...' : content;
308
+ sourceItem.innerHTML = `
309
+ <a href="${url}" target="_blank" class="source-url">${url}</a>
310
+ <div class="source-content">
311
+ <div class="source-snippet">${marked.parse(snippet)}</div>
312
+ <div class="source-full">${marked.parse(content)}</div>
313
+ <div class="expand-indicator"></div>
314
+ </div>
315
+ `;
316
+ sourcesContainer.appendChild(sourceItem);
317
+
318
+ const sourceUrl = sourceItem.querySelector('.source-url');
319
+ const sourceContent = sourceItem.querySelector('.source-content');
320
+ const snippetDiv = sourceItem.querySelector('.source-snippet');
321
+ const fullDiv = sourceItem.querySelector('.source-full');
322
+
323
+ sourceContent.addEventListener('click', function(e) {
324
+ if (!sourceItem.classList.contains('expanded')) {
325
+ sourceItem.classList.add('expanded');
326
+ snippetDiv.style.display = 'none';
327
+ fullDiv.style.display = 'block';
328
+ } else if (e.clientY > sourceContent.getBoundingClientRect().bottom - 30) {
329
+ sourceItem.classList.remove('expanded');
330
+ snippetDiv.style.display = 'block';
331
+ fullDiv.style.display = 'none';
332
+ }
333
+ });
334
+
335
+ sourceUrl.addEventListener('click', function(e) {
336
+ e.stopPropagation();
337
+ });
338
+ }
339
+ });
340
+ } else {
341
+ sourcesContainer.innerHTML = '<h2>Sources</h2><p>No source information available.</p>';
342
+ }
343
+ }
344
+ // Make Plotly charts responsive on window resize
345
+ window.addEventListener('resize', function() {
346
+ const plots = document.querySelectorAll('.js-plotly-plot');
347
+ plots.forEach(plot => {
348
+ Plotly.Plots.resize(plot);
349
+ });
350
+ });
351
+ </script>
352
+ </body>
353
  </html>
templates/apps-hub/landing-page.html ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Elevatics Dashboard</title>
7
+ <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
8
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
9
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css">
10
+ <style>
11
+ /* Reset and base styles */
12
+ * {
13
+ box-sizing: border-box;
14
+ margin: 0;
15
+ padding: 0;
16
+ }
17
+
18
+ body, html {
19
+ font-family: Arial, sans-serif;
20
+ height: 100%;
21
+ }
22
+
23
+ #app {
24
+ display: flex;
25
+ flex-direction: column;
26
+ min-height: 100vh;
27
+ }
28
+
29
+ /* Header styles */
30
+ .header {
31
+ background-color: #0c2d4d;
32
+ color: white;
33
+ display: flex;
34
+ justify-content: space-between;
35
+ align-items: center;
36
+ padding: 20px;
37
+ }
38
+
39
+ .logo {
40
+ font-size: 24px;
41
+ font-weight: bold;
42
+ }
43
+ .elevatics-icon {
44
+ height: 5rem; /* Match the font size */
45
+ width: auto; /* Maintain aspect ratio */
46
+ margin-right: 10px;
47
+ }
48
+
49
+ .login-button {
50
+ background: none;
51
+ border: none;
52
+ color: white;
53
+ display: flex;
54
+ align-items: center;
55
+ cursor: pointer;
56
+ font-size: 16px;
57
+ }
58
+
59
+ .login-button i {
60
+ margin-right: 5px;
61
+ font-size: 30px;
62
+ color: #ffffff;
63
+ }
64
+
65
+ /* Main content styles */
66
+ .main-content {
67
+ background-color: #0c2d4d;
68
+ color: white;
69
+ flex: 1;
70
+ display: flex;
71
+ flex-direction: column;
72
+ justify-content: center;
73
+ align-items: center;
74
+ text-align: center;
75
+ padding: 20px;
76
+ min-height: 100vh;
77
+ }
78
+
79
+ .main-content .inner-container {
80
+ display: flex;
81
+ flex-direction: column;
82
+ align-items: center;
83
+ justify-content: center;
84
+ height: 80%;
85
+ padding: 20px;
86
+ }
87
+
88
+ .main-title {
89
+ font-size: 7rem;
90
+ margin-bottom: 30px;
91
+ }
92
+
93
+ .blue { color: #3498db; }
94
+ .white { color: white; }
95
+
96
+ .try-now-button {
97
+ background-color: transparent;
98
+ color: white;
99
+ border: 2px solid white;
100
+ padding: 10px 20px;
101
+ font-size: 2rem;
102
+ cursor: pointer;
103
+ transition: all 0.3s ease;
104
+ }
105
+
106
+ .try-now-button:hover {
107
+ background-color: white;
108
+ color: #0c2d4d;
109
+ }
110
+
111
+ /* Dashboard styles */
112
+ .dashboard {
113
+ background-color: #c5d6e8;
114
+ padding: 20px;
115
+ display: flex;
116
+ justify-content: center;
117
+ align-items: center;
118
+ min-height: 100vh;
119
+ }
120
+
121
+ .tiles-container {
122
+ display: flex;
123
+
124
+ gap: 20px;
125
+ max-width: 1100px;
126
+ width: 80%;
127
+ }
128
+
129
+ .iresearcher-container {
130
+ width: 30%;
131
+ display: flex;
132
+ max-height: 540px;
133
+ }
134
+
135
+ .other-tiles-container {
136
+ width: 70%;
137
+ display: flex;
138
+ flex-wrap: wrap;
139
+ gap: 20px;
140
+ }
141
+
142
+ .tile {
143
+ background-color: #0d2b45;
144
+ border-radius: 15px;
145
+ color: white;
146
+ display: flex;
147
+ flex-direction: column;
148
+ align-items: center;
149
+ justify-content: center;
150
+ text-align: center;
151
+ padding: 20px;
152
+ }
153
+
154
+ .iResearcher {
155
+ height: 100%;
156
+ width: 100%;
157
+ position: relative;
158
+ }
159
+
160
+ .other-tiles-container .tile {
161
+ width: calc(33.33% - 14px);
162
+ height: 260px;
163
+ }
164
+
165
+ .tile-icon {
166
+ width: 70px;
167
+ height: 70px;
168
+ margin-bottom: 30px;
169
+ fill: white;
170
+ }
171
+
172
+ .tile-name {
173
+ margin: 0;
174
+ font-size: 22px;
175
+ }
176
+
177
+ .arrow-icon {
178
+ position: absolute;
179
+ bottom: 20px;
180
+ right: 20px;
181
+ width: 30px;
182
+ height: 30px;
183
+ }
184
+
185
+ @media (max-width: 900px) {
186
+ .iresearcher-container,
187
+ .other-tiles-container {
188
+ width: 100%;
189
+ }
190
+ .other-tiles-container .tile {
191
+ width: calc(50% - 10px);
192
+ }
193
+ }
194
+
195
+ @media (max-width: 600px) {
196
+ .other-tiles-container .tile {
197
+ width: 100%;
198
+ }
199
+ .main-title {
200
+ font-size: 2.5rem;
201
+ }
202
+ }
203
+ </style>
204
+ </head>
205
+ <body>
206
+
207
+ <div id="app">
208
+ {% raw %}
209
+
210
+ <header class="header">
211
+ <div class="logo">
212
+ <img src="/png/elevatics.png" alt="Elevatics Logo" class="elevatics-icon">
213
+ </div>
214
+ <button class="login-button" onclick="window.location.href = '/login'">
215
+ <i class="bi bi-person-circle"></i>
216
+ Login
217
+ </button>
218
+ </header>
219
+
220
+ <main class="main-content">
221
+ <div class="inner-container">
222
+ <h1 class="main-title">
223
+ <span class="blue">Single </span>
224
+ <span class="white">AI </span>
225
+ <span class="blue">Platform</span><br>
226
+ <span class="blue">Endless </span>
227
+ <span class="white">Possibilities</span>
228
+ </h1>
229
+ </div>
230
+ <button class="try-now-button" @click="tryNow">Try Now</button>
231
+ </main>
232
+
233
+ <section class="dashboard">
234
+ <div class="tiles-container">
235
+ <div class="iresearcher-container">
236
+ <div class="tile iResearcher">
237
+ <div class="tile-icon" v-html="tiles[0].icon"></div>
238
+ <p class="tile-name">{{ tiles[0].name }}</p>
239
+ </div>
240
+ </div>
241
+ <div class="other-tiles-container">
242
+ <div class="tile" v-for="tile in tiles.slice(1)" :key="tile.name">
243
+ <div class="tile-icon" v-html="tile.icon"></div>
244
+ <p class="tile-name">{{ tile.name }}</p>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ </section>
249
+ {% endraw %}
250
+ </div>
251
+
252
+ <script>
253
+ const { createApp } = Vue;
254
+
255
+ createApp({
256
+ data() {
257
+ return {
258
+ tiles: [
259
+ { name: 'iResearcher', icon: '', file: 'iresearcher.svg' },
260
+ { name: 'News', icon: '', file: 'news.svg' },
261
+ { name: 'Investment', icon: '', file: 'investment.svg' },
262
+ { name: 'Career', icon: '', file: 'career.svg' },
263
+ { name: 'Code', icon: '', file: 'code.svg' },
264
+ { name: 'Analytics', icon: '', file: 'analytics.svg' },
265
+ { name: 'Speech', icon: '', file: 'speech.svg' }
266
+ ]
267
+ }
268
+ },
269
+ mounted() {
270
+ this.loadSVGs();
271
+ },
272
+ methods: {
273
+ tryNow() {
274
+ window.location.href = '/login';
275
+ },
276
+ loadSVGs() {
277
+ this.tiles.forEach(tile => {
278
+ fetch(`/svg/${tile.file}`)
279
+ .then(response => response.text())
280
+ .then(svgContent => {
281
+ tile.icon = svgContent;
282
+ })
283
+ .catch(error => console.error('Error loading SVG:', error));
284
+ });
285
+ }
286
+ }
287
+ }).mount('#app');
288
+ </script>
289
+ </body>
290
+ </html>
templates/apps-hub/research-pro.html CHANGED
@@ -6,7 +6,7 @@
6
  <title>Research Pro</title>
7
  <script src="https://cdn.jsdelivr.net/npm/appwrite@15.0.0"></script>
8
  <script src="/js/auth.js"></script>
9
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
10
  <link rel="stylesheet" href="/css/ai-sidebar.css">
11
  <link rel="stylesheet" href="/css/research-pro-style.css">
12
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
@@ -14,10 +14,6 @@
14
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
15
  <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
16
  <style>
17
- #main-container {
18
- position: relative;
19
- min-height: 100vh;
20
- }
21
  .button-container {
22
  position: fixed;
23
  bottom: 20px;
 
6
  <title>Research Pro</title>
7
  <script src="https://cdn.jsdelivr.net/npm/appwrite@15.0.0"></script>
8
  <script src="/js/auth.js"></script>
9
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
10
  <link rel="stylesheet" href="/css/ai-sidebar.css">
11
  <link rel="stylesheet" href="/css/research-pro-style.css">
12
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
 
14
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
15
  <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
16
  <style>
 
 
 
 
17
  .button-container {
18
  position: fixed;
19
  bottom: 20px;