-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgemini.html
More file actions
364 lines (328 loc) · 13.4 KB
/
Copy pathgemini.html
File metadata and controls
364 lines (328 loc) · 13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!-- generate_pdf.html -->
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="apple-touch-icon" sizes="76x76" href="{% static 'assets/img/apple-touch-icon.png' %}">
<link rel="icon" type="image/png" href="{% static 'assets/img/apple-touch-icon.png' %}">
<title>
Talk To Code
</title>
<!-- Fonts and icons -->
<link href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,600,700,800" rel="stylesheet" />
<link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
<!-- Nucleo Icons -->
<link href="{% static '/assets/css/nucleo-icons.css' %}" rel="stylesheet" />
<!-- CSS Files -->
<link href="{% static 'assets/css/blk-design-system.css' %}?v=1.0.0" rel="stylesheet" />
<!-- CSS Just for demo purpose, don't include it in your project -->
<link href="{% static '/assets/demo/demo.css' %}" rel="stylesheet" />
<style>
#codeContainer pre {
white-space: pre-wrap;
word-wrap: break-word;
}
.python-code {
color: #61dafb;
font-family: 'Courier New', monospace; /* Optional: Set a monospaced font for better code display */
white-space: pre-wrap; /* Preserve white spaces and allow text to wrap */
padding: 10px;
border: 1px solid #ccc;
background-color: #282c34; /* Optional: Set a background color for better visibility */
}
</style>
</head>
<body class="profile-page">
<nav class="navbar navbar-expand-lg fixed-top navbar-transparent " color-on-scroll="100">
<div class="container">
<div class="navbar-translate">
<a class="navbar-brand" href="" rel="tooltip" title="Designed and Coded by Aryan&Axvin" data-placement="bottom" target="_blank">
Talk To <span>Code</span>
</a>
<button class="navbar-toggler navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-bar bar1"></span>
<span class="navbar-toggler-bar bar2"></span>
<span class="navbar-toggler-bar bar3"></span>
</button>
</div>
<div class="collapse navbar-collapse justify-content-end" id="navigation">
<div class="navbar-collapse-header">
<div class="row">
<div class="col-6 collapse-brand">
<a>
Talk To Code
</a>
</div>
<div class="col-6 collapse-close text-right">
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navigation" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
<i class="tim-icons icon-simple-remove"></i>
</button>
</div>
</div>
</div>
<ul class="navbar-nav">
<li class="nav-item p-0">
<a class="nav-link" rel="tooltip" title="Follow Aryan on Linkedin" data-placement="bottom" href="https://www.linkedin.com/in/aryankyatham/" target="_blank">
<i class="fab fa-linkedin"></i>
<p class="d-lg-none d-xl-none">Linked In</p>
</a>
</li>
<li class="nav-item p-0">
<a class="nav-link" rel="tooltip" title="Follow Sharvin on Linkedin" data-placement="bottom" href="https://www.linkedin.com/in/sharvin-gavad/" target="_blank">
<i class="fab fa-linkedin"></i>
<p class="d-lg-none d-xl-none">Linked In</p>
</a>
</li>
<!-- <li class="nav-item p-0">
<a class="nav-link" rel="tooltip" title="Follow us on Instagram" data-placement="bottom" href="https://www.instagram.com/CreativeTimOfficial" target="_blank">
<i class="fab fa-instagram"></i>
<p class="d-lg-none d-xl-none">Instagram</p>
</a>
</li> -->
<!-- <li class="dropdown nav-item">
<a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
<i class="fa fa-cogs d-lg-none d-xl-none"></i> Getting started
</a>
<div class="dropdown-menu dropdown-with-icons">
<a href="" class="dropdown-item">
<i class="tim-icons icon-bullet-list-67"></i> Email Us
</a>
<a href="" class="dropdown-item">
<i class="tim-icons icon-bullet-list-67"></i>Know More
</a> -->
<!-- <a href="" class="dropdown-item">
<i class="tim-icons icon-image-02"></i>Landing Page
</a>
<a href="" class="dropdown-item">
<i class="tim-icons icon-single-02"></i>Profile Page
</a> -->
<li class="nav-item">
<a class="nav-link btn btn-default d-none d-lg-block" href="/substack">
<i class="tim-icons icon-cloud-download-93"></i> Sign Up
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- End Navbar -->
<br>
<br><br>
<br>
<br>
<br>
<br><br>
<br>
<center>
<style>
body {
font-family: Arial, sans-serif;
}
.code-snippet {
background-color: #000;
color: #fff;
padding: 10px;
margin-bottom: 20px;
}
pre {
color: #fff;
margin: 0;
}
.form-container {
max-width: 500px;
margin: 0 auto;
}
.container{
max-width: 1000px;
margin: 0 auto;
}
</style>
</head>
<br>
<br>
<br>
<br>
<div class="form-container">
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
<button class="btn btn-primary btn-round">
<input type="file" name="pdf_files" multiple required>
<i class="tim-icons icon-gift-2"></i> With Icon
</button>
<textarea class="form-control" name="user_question" rows="100" cols="100" style="width: 100%;" placeholder="Ask a question"></textarea>
<button id="submitBtn" class="btn btn-primary" type="submit">Submit</button>
</form>
</head>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<img src="https://c.tenor.com/FawYo00tBekAAAAC/tenor.gif" alt="Loading GIF">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<!-- jQuery and Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script>
$(document).ready(function() {
// When the submit button is clicked
$('#submitBtn').click(function() {
// Show the modal
$('#exampleModal').modal('show');
});
});
</script>
</div>
</div>
<div class="container-fluid" id="codeContainer">
<div class="row justify-content-center">
<div class="col-lg-8">
<div class="card mt-4">
<div class="card-body">
<blockquote class="blockquote">
{% if response_text %}
<div class="response-container text-left"> <!-- Added text-left class here -->
<h5 class="response-title">Response:</h5>
<pre id='resp' class="response-code pl-3">
{{ response_text | safe }}
</pre>
</div>
{% endif %}
{% if related_content %}
<h2 class="related-content-title">Related Content:</h2>
<ul class="related-content-list">
{% for content in related_content %}
<li>{{ content }}</li>
{% endfor %}
</ul>
{% endif %}
</blockquote>
</div>
</div>
</div>
</div>
</div>
<script>
function formatText() {
const codeContainer = document.getElementById('resp');
const textContent = codeContainer.innerHTML;
// Use regular expression to find lines starting with ```python and ending with ```
const regex = /```python([\s\S]*?)```/g;
const formattedText = textContent.replace(regex, (match) => {
const pythonCode = match.substring(11, match.length - 3).trim(); // Extract Python code between triple backticks
return `<div class="python-code">${pythonCode}</div>`;
});
// Apply the formatted text back to the container
codeContainer.innerHTML = `<div class="code-container">${formattedText}</div>`;
}
// Call formatText function when the page loads:
window.onload = formatText;
</script>
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-3">
<h1 class="title">Talk To Code</h1>
</div>
<!-- <div class="col-md-3">
<ul class="nav">
<li class="nav-item">
<a href="./index.html" class="nav-link">
Home
</a>
</li>
<li class="nav-item">
<a href="./examples/landing-page.html" class="nav-link">
Landing
</a>
</li>
<li class="nav-item">
<a href="./examples/register-page.html" class="nav-link">
Register
</a>
</li>
<li class="nav-item">
<a href="./examples/profile-page.html" class="nav-link">
Profile
</a>
</li>
</ul>
</div> -->
<div class="col-md-3">
<ul class="nav">
<li class="nav-item">
<a href="" class="nav-link">
Contact Us - 8657689680
<br>8169294402
</a>
</li>
<li class="nav-item">
<a href="https://www.linkedin.com/feed/update/urn:li:activity:7167872040169861120/" class="nav-link">
About Us
</a>
</li>
<li class="nav-item">
<a href="https://www.linkedin.com/pulse/deploying-django-aws-elastic-beanstalk-aryan-kyatham-ridcf/" class="nav-link">
Blog
</a>
</li>
<li class="nav-item">
<a href="" class="nav-link">
Made by Nice Vibers
</a>
</li>
</ul>
</div>
<div class="col-md-3">
<h3 class="title">Follow us:</h3>
<div class="btn-wrapper profile">
<a target="_blank" href="https://github.com/Sharvin27" class="btn btn-icon btn-neutral btn-round btn-simple" data-toggle="tooltip" data-original-title="dev2 github">
<i class="fab fa-github"></i>
</a>
<a target="_blank" href="https://github.com/ARYANK-08" class="btn btn-icon btn-neutral btn-round btn-simple" data-toggle="tooltip" data-original-title="dev1 github">
<i class="fab fa-github"></i>
</a>
<a target="_blank" href="https://www.linkedin.com/in/aryankyatham/" class="btn btn-icon btn-neutral btn-round btn-simple" data-toggle="tooltip" data-original-title="Follow us">
<i class="fab fa-linkedin"></i>
</a>
</div>
</div>
</div>
</div>
</footer>
</div>
<script src="{% static '/assets/js/core/jquery.min.js' %}" type="text/javascript"></script>
<script src="{% static '/assets/js/core/popper.min.js' %}" type="text/javascript"></script>
<script src="{% static '/assets/js/core/bootstrap.min.js' %}" type="text/javascript"></script>
<script src="{% static '/assets/js/plugins/perfect-scrollbar.jquery.min.js' %}"></script>
<!-- Plugin for Switches, full documentation here: http://www.jque.re/plugins/version3/bootstrap.switch/ -->
<script src="{% static '/assets/js/plugins/bootstrap-switch.js' %}"></script>
<!-- Plugin for the Sliders, full documentation here: http://refreshless.com/nouislider/ -->
<script src="{% static '/assets/js/plugins/nouislider.min.js' %}" type="text/javascript"></script>
<!-- Chart JS -->
<script src="{% static '/assets/js/plugins/chartjs.min.js' %}"></script>
<!-- Plugin for the DatePicker, full documentation here: https://github.com/uxsolutions/bootstrap-datepicker -->
<script src="{% static '/assets/js/plugins/moment.min.js' %}"></script>
<script src="{% static '/assets/js/plugins/bootstrap-datetimepicker.js'%}" type="text/javascript"></script>
<!-- Black Dashboard DEMO methods, don't include it in your project! -->
<script src="{% static '/assets/demo/demo.js'%}"></script>
<!-- Control Center for Black UI Kit: parallax effects, scripts for the example pages etc -->
<script src="{% static '/assets/js/blk-design-system.min.js' %}?v=1.0.0" type="text/javascript"></script>
</body>
</html>