Spaces:
Running
Running
Update html_template.html
Browse files- html_template.html +60 -23
html_template.html
CHANGED
@@ -12,55 +12,61 @@
|
|
12 |
}
|
13 |
/* Dark Mode (Default) */
|
14 |
body.dark-mode {
|
15 |
-
background: linear-gradient(to bottom right, #
|
16 |
-
color: #
|
17 |
}
|
18 |
body.dark-mode .input-section,
|
19 |
body.dark-mode .markdown-section,
|
20 |
body.dark-mode .preview-section {
|
21 |
-
background: #
|
22 |
-
box-shadow: 0
|
23 |
}
|
24 |
body.dark-mode input[type="text"],
|
25 |
body.dark-mode input[type="file"] {
|
26 |
-
background: #
|
27 |
-
color: #
|
28 |
border: 1px solid #4A6FA5;
|
29 |
}
|
30 |
body.dark-mode input[type="text"]:focus,
|
31 |
body.dark-mode input[type="file"]:focus {
|
32 |
-
border-color: #
|
33 |
}
|
34 |
body.dark-mode button {
|
35 |
-
background: linear-gradient(to right, #
|
|
|
36 |
}
|
37 |
body.dark-mode button:hover {
|
38 |
-
background: linear-gradient(to right, #
|
|
|
39 |
}
|
40 |
body.dark-mode #downloadBtn {
|
41 |
-
background: linear-gradient(to right, #
|
|
|
42 |
}
|
43 |
body.dark-mode #downloadBtn:hover {
|
44 |
-
background: linear-gradient(to right, #
|
|
|
45 |
}
|
46 |
body.dark-mode textarea {
|
47 |
-
background: #
|
48 |
-
color: #
|
49 |
border: 1px solid #4A6FA5;
|
50 |
}
|
51 |
body.dark-mode #output {
|
52 |
-
background: #
|
53 |
}
|
54 |
body.dark-mode #output h1, body.dark-mode #output h2, body.dark-mode #output h3 {
|
55 |
color: #FFFFFF;
|
|
|
|
|
56 |
}
|
57 |
body.dark-mode #output code,
|
58 |
body.dark-mode #output pre {
|
59 |
background: #2C3E50;
|
60 |
}
|
61 |
body.dark-mode .spinner {
|
62 |
-
border: 4px solid #
|
63 |
-
border-top: 4px solid #
|
64 |
}
|
65 |
|
66 |
/* Light Mode */
|
@@ -144,10 +150,11 @@
|
|
144 |
border-radius: 5px;
|
145 |
cursor: pointer;
|
146 |
margin: 5px;
|
147 |
-
transition: background 0.3s, transform 0.1s;
|
148 |
}
|
149 |
button:active {
|
150 |
-
transform: scale(0.
|
|
|
151 |
}
|
152 |
.spinner {
|
153 |
display: none;
|
@@ -172,7 +179,7 @@
|
|
172 |
}
|
173 |
textarea {
|
174 |
width: 100%;
|
175 |
-
height:
|
176 |
margin-top: 10px;
|
177 |
padding: 10px;
|
178 |
border-radius: 5px;
|
@@ -187,7 +194,8 @@
|
|
187 |
max-height: 600px;
|
188 |
overflow-y: auto;
|
189 |
border-radius: 5px;
|
190 |
-
|
|
|
191 |
}
|
192 |
#output code {
|
193 |
padding: 2px 4px;
|
@@ -202,8 +210,8 @@
|
|
202 |
animation: fadeIn 0.5s ease-in;
|
203 |
}
|
204 |
@keyframes fadeIn {
|
205 |
-
from { opacity: 0; }
|
206 |
-
to { opacity: 1; }
|
207 |
}
|
208 |
|
209 |
/* Toggle Switch */
|
@@ -217,6 +225,7 @@
|
|
217 |
.mode-toggle label {
|
218 |
margin-left: 10px;
|
219 |
font-size: 14px;
|
|
|
220 |
}
|
221 |
.switch {
|
222 |
position: relative;
|
@@ -257,6 +266,24 @@
|
|
257 |
input:checked + .slider:before {
|
258 |
transform: translateX(26px);
|
259 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
</style>
|
261 |
</head>
|
262 |
<body class="dark-mode">
|
@@ -282,7 +309,7 @@
|
|
282 |
</div>
|
283 |
<div class="output-container">
|
284 |
<div class="markdown-section">
|
285 |
-
<h2>Markdown Output
|
286 |
<textarea id="markdownOutput" readonly></textarea>
|
287 |
</div>
|
288 |
<div class="preview-section">
|
@@ -390,6 +417,16 @@
|
|
390 |
alert('Error downloading file: ' + error.message);
|
391 |
}
|
392 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
</script>
|
394 |
</body>
|
395 |
</html>
|
|
|
12 |
}
|
13 |
/* Dark Mode (Default) */
|
14 |
body.dark-mode {
|
15 |
+
background: linear-gradient(to bottom right, #1A252F, #2C3E50);
|
16 |
+
color: #E0E6ED;
|
17 |
}
|
18 |
body.dark-mode .input-section,
|
19 |
body.dark-mode .markdown-section,
|
20 |
body.dark-mode .preview-section {
|
21 |
+
background: #2F4054;
|
22 |
+
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
|
23 |
}
|
24 |
body.dark-mode input[type="text"],
|
25 |
body.dark-mode input[type="file"] {
|
26 |
+
background: #3A5063;
|
27 |
+
color: #FFFFFF;
|
28 |
border: 1px solid #4A6FA5;
|
29 |
}
|
30 |
body.dark-mode input[type="text"]:focus,
|
31 |
body.dark-mode input[type="file"]:focus {
|
32 |
+
border-color: #A66F3A;
|
33 |
}
|
34 |
body.dark-mode button {
|
35 |
+
background: linear-gradient(to right, #3498DB, #2C7DB2);
|
36 |
+
box-shadow: inset 0 0 5px rgba(52, 152, 219, 0.3);
|
37 |
}
|
38 |
body.dark-mode button:hover {
|
39 |
+
background: linear-gradient(to right, #2C7DB2, #3498DB);
|
40 |
+
box-shadow: inset 0 0 8px rgba(52, 152, 219, 0.5);
|
41 |
}
|
42 |
body.dark-mode #downloadBtn {
|
43 |
+
background: linear-gradient(to right, #8B5A2B, #7F4D1A);
|
44 |
+
box-shadow: inset 0 0 5px rgba(139, 90, 43, 0.3);
|
45 |
}
|
46 |
body.dark-mode #downloadBtn:hover {
|
47 |
+
background: linear-gradient(to right, #7F4D1A, #8B5A2B);
|
48 |
+
box-shadow: inset 0 0 8px rgba(139, 90, 43, 0.5);
|
49 |
}
|
50 |
body.dark-mode textarea {
|
51 |
+
background: #3A5063;
|
52 |
+
color: #FFFFFF;
|
53 |
border: 1px solid #4A6FA5;
|
54 |
}
|
55 |
body.dark-mode #output {
|
56 |
+
background: #3A5063;
|
57 |
}
|
58 |
body.dark-mode #output h1, body.dark-mode #output h2, body.dark-mode #output h3 {
|
59 |
color: #FFFFFF;
|
60 |
+
font-weight: 500;
|
61 |
+
letter-spacing: 0.5px;
|
62 |
}
|
63 |
body.dark-mode #output code,
|
64 |
body.dark-mode #output pre {
|
65 |
background: #2C3E50;
|
66 |
}
|
67 |
body.dark-mode .spinner {
|
68 |
+
border: 4px solid #2F4054;
|
69 |
+
border-top: 4px solid #E0E6ED;
|
70 |
}
|
71 |
|
72 |
/* Light Mode */
|
|
|
150 |
border-radius: 5px;
|
151 |
cursor: pointer;
|
152 |
margin: 5px;
|
153 |
+
transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
|
154 |
}
|
155 |
button:active {
|
156 |
+
transform: scale(0.97) translateY(2px);
|
157 |
+
box-shadow: none;
|
158 |
}
|
159 |
.spinner {
|
160 |
display: none;
|
|
|
179 |
}
|
180 |
textarea {
|
181 |
width: 100%;
|
182 |
+
height: 400px;
|
183 |
margin-top: 10px;
|
184 |
padding: 10px;
|
185 |
border-radius: 5px;
|
|
|
194 |
max-height: 600px;
|
195 |
overflow-y: auto;
|
196 |
border-radius: 5px;
|
197 |
+
border: 1px solid #4A6FA5;
|
198 |
+
transition: background 0.3s, border 0.3s;
|
199 |
}
|
200 |
#output code {
|
201 |
padding: 2px 4px;
|
|
|
210 |
animation: fadeIn 0.5s ease-in;
|
211 |
}
|
212 |
@keyframes fadeIn {
|
213 |
+
from { opacity: 0; transform: scale(0.98); }
|
214 |
+
to { opacity: 1; transform: scale(1.02); }
|
215 |
}
|
216 |
|
217 |
/* Toggle Switch */
|
|
|
225 |
.mode-toggle label {
|
226 |
margin-left: 10px;
|
227 |
font-size: 14px;
|
228 |
+
color: #E0E6ED;
|
229 |
}
|
230 |
.switch {
|
231 |
position: relative;
|
|
|
266 |
input:checked + .slider:before {
|
267 |
transform: translateX(26px);
|
268 |
}
|
269 |
+
|
270 |
+
/* Copy Button */
|
271 |
+
.copy-button {
|
272 |
+
padding: 8px 16px;
|
273 |
+
background: #3498DB;
|
274 |
+
color: white;
|
275 |
+
border: none;
|
276 |
+
border-radius: 5px;
|
277 |
+
cursor: pointer;
|
278 |
+
margin-left: 10px;
|
279 |
+
transition: background 0.3s, transform 0.1s;
|
280 |
+
}
|
281 |
+
.copy-button:hover {
|
282 |
+
background: #2C7DB2;
|
283 |
+
}
|
284 |
+
.copy-button:active {
|
285 |
+
transform: scale(0.97) translateY(2px);
|
286 |
+
}
|
287 |
</style>
|
288 |
</head>
|
289 |
<body class="dark-mode">
|
|
|
309 |
</div>
|
310 |
<div class="output-container">
|
311 |
<div class="markdown-section">
|
312 |
+
<h2>Markdown Output: <button class="copy-button" onclick="copyToClipboard()">Copy</button></h2>
|
313 |
<textarea id="markdownOutput" readonly></textarea>
|
314 |
</div>
|
315 |
<div class="preview-section">
|
|
|
417 |
alert('Error downloading file: ' + error.message);
|
418 |
}
|
419 |
}
|
420 |
+
|
421 |
+
async function copyToClipboard() {
|
422 |
+
const markdownOutput = document.getElementById('markdownOutput');
|
423 |
+
try {
|
424 |
+
await navigator.clipboard.writeText(markdownOutput.value);
|
425 |
+
alert('Markdown copied to clipboard!');
|
426 |
+
} catch (err) {
|
427 |
+
alert('Failed to copy to clipboard: ' + err.message);
|
428 |
+
}
|
429 |
+
}
|
430 |
</script>
|
431 |
</body>
|
432 |
</html>
|