Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -92,14 +92,14 @@ HTML_CONTENT = """
|
|
92 |
|
93 |
.btn:hover {
|
94 |
color: #ffffff;
|
95 |
-
box-shadow: 0 0 15px rgba(
|
96 |
}
|
97 |
|
98 |
.btn:hover::before {
|
99 |
content: '';
|
100 |
position: absolute;
|
101 |
inset: -10px;
|
102 |
-
background: radial-gradient(circle at center, rgba(
|
103 |
filter: blur(20px);
|
104 |
animation: glowAnimation 2s infinite;
|
105 |
z-index: -1;
|
@@ -130,18 +130,19 @@ HTML_CONTENT = """
|
|
130 |
position: relative;
|
131 |
overflow: hidden;
|
132 |
z-index: 1;
|
|
|
133 |
}
|
134 |
|
135 |
.small-btn:hover {
|
136 |
color: #ffffff;
|
137 |
-
box-shadow: 0 0 10px rgba(
|
138 |
}
|
139 |
|
140 |
.small-btn:hover::before {
|
141 |
content: '';
|
142 |
position: absolute;
|
143 |
inset: -10px;
|
144 |
-
background: radial-gradient(circle at center, rgba(
|
145 |
filter: blur(15px);
|
146 |
animation: glowAnimation 2s infinite;
|
147 |
z-index: -1;
|
@@ -162,6 +163,7 @@ HTML_CONTENT = """
|
|
162 |
cursor: pointer;
|
163 |
transition: all 0.3s ease;
|
164 |
background: rgba(255, 255, 255, 0.05);
|
|
|
165 |
}
|
166 |
|
167 |
.drop-zone:hover, .drop-zone.drag-over {
|
@@ -170,17 +172,23 @@ HTML_CONTENT = """
|
|
170 |
position: relative;
|
171 |
}
|
172 |
|
173 |
-
.drop-zone:hover::before {
|
174 |
content: '';
|
175 |
position: absolute;
|
176 |
inset: -10px;
|
177 |
-
background: radial-gradient(circle at center, rgba(
|
178 |
-
filter: blur(
|
179 |
-
animation:
|
180 |
z-index: -1;
|
181 |
pointer-events: none;
|
182 |
}
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
.file-input {
|
185 |
display: none;
|
186 |
}
|
@@ -189,6 +197,7 @@ HTML_CONTENT = """
|
|
189 |
margin-top: 1rem;
|
190 |
font-size: 0.9rem;
|
191 |
color: #aaa;
|
|
|
192 |
}
|
193 |
|
194 |
/* Progress Bar */
|
@@ -242,12 +251,19 @@ HTML_CONTENT = """
|
|
242 |
font-weight: 600;
|
243 |
transition: all 0.3s ease;
|
244 |
margin-right: 10px;
|
|
|
245 |
}
|
246 |
|
247 |
.result-link:hover {
|
248 |
text-decoration: underline;
|
249 |
}
|
250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
/* File Types */
|
252 |
.file-types {
|
253 |
margin-top: 2rem;
|
@@ -337,6 +353,15 @@ HTML_CONTENT = """
|
|
337 |
margin-bottom: 10px;
|
338 |
margin-right: 0;
|
339 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
}
|
341 |
|
342 |
</style>
|
@@ -516,6 +541,11 @@ HTML_CONTENT = """
|
|
516 |
link.className = 'result-link';
|
517 |
link.target = '_blank';
|
518 |
|
|
|
|
|
|
|
|
|
|
|
519 |
const copyBtn = document.createElement('button');
|
520 |
copyBtn.textContent = 'Copy Link';
|
521 |
copyBtn.className = 'small-btn copy-btn';
|
@@ -524,9 +554,7 @@ HTML_CONTENT = """
|
|
524 |
alert('Link copied to clipboard!');
|
525 |
});
|
526 |
};
|
527 |
-
|
528 |
-
linkContainer.appendChild(link);
|
529 |
-
linkContainer.appendChild(copyBtn);
|
530 |
|
531 |
if (fileName.toLowerCase().endsWith('.mp4')) {
|
532 |
const embedBtn = document.createElement('button');
|
@@ -535,9 +563,11 @@ HTML_CONTENT = """
|
|
535 |
embedBtn.onclick = () => {
|
536 |
showEmbedModal(url);
|
537 |
};
|
538 |
-
|
539 |
}
|
540 |
|
|
|
|
|
541 |
resultContainer.appendChild(linkContainer);
|
542 |
resultContainer.style.display = 'block';
|
543 |
}
|
|
|
92 |
|
93 |
.btn:hover {
|
94 |
color: #ffffff;
|
95 |
+
box-shadow: 0 0 15px rgba(200, 200, 200, 0.5);
|
96 |
}
|
97 |
|
98 |
.btn:hover::before {
|
99 |
content: '';
|
100 |
position: absolute;
|
101 |
inset: -10px;
|
102 |
+
background: radial-gradient(circle at center, rgba(200,200,200,0.2), transparent);
|
103 |
filter: blur(20px);
|
104 |
animation: glowAnimation 2s infinite;
|
105 |
z-index: -1;
|
|
|
130 |
position: relative;
|
131 |
overflow: hidden;
|
132 |
z-index: 1;
|
133 |
+
margin-left: 5px;
|
134 |
}
|
135 |
|
136 |
.small-btn:hover {
|
137 |
color: #ffffff;
|
138 |
+
box-shadow: 0 0 10px rgba(200, 200, 200, 0.5);
|
139 |
}
|
140 |
|
141 |
.small-btn:hover::before {
|
142 |
content: '';
|
143 |
position: absolute;
|
144 |
inset: -10px;
|
145 |
+
background: radial-gradient(circle at center, rgba(200,200,200,0.2), transparent);
|
146 |
filter: blur(15px);
|
147 |
animation: glowAnimation 2s infinite;
|
148 |
z-index: -1;
|
|
|
163 |
cursor: pointer;
|
164 |
transition: all 0.3s ease;
|
165 |
background: rgba(255, 255, 255, 0.05);
|
166 |
+
overflow: hidden;
|
167 |
}
|
168 |
|
169 |
.drop-zone:hover, .drop-zone.drag-over {
|
|
|
172 |
position: relative;
|
173 |
}
|
174 |
|
175 |
+
.drop-zone:hover::before, .drop-zone.drag-over::before {
|
176 |
content: '';
|
177 |
position: absolute;
|
178 |
inset: -10px;
|
179 |
+
background: radial-gradient(circle at center, rgba(200,200,200,0.2), transparent);
|
180 |
+
filter: blur(30px);
|
181 |
+
animation: grainGlow 5s infinite;
|
182 |
z-index: -1;
|
183 |
pointer-events: none;
|
184 |
}
|
185 |
|
186 |
+
@keyframes grainGlow {
|
187 |
+
0% { opacity: 0.2; }
|
188 |
+
50% { opacity: 0.5; }
|
189 |
+
100% { opacity: 0.2; }
|
190 |
+
}
|
191 |
+
|
192 |
.file-input {
|
193 |
display: none;
|
194 |
}
|
|
|
197 |
margin-top: 1rem;
|
198 |
font-size: 0.9rem;
|
199 |
color: #aaa;
|
200 |
+
word-break: break-all;
|
201 |
}
|
202 |
|
203 |
/* Progress Bar */
|
|
|
251 |
font-weight: 600;
|
252 |
transition: all 0.3s ease;
|
253 |
margin-right: 10px;
|
254 |
+
word-break: break-all;
|
255 |
}
|
256 |
|
257 |
.result-link:hover {
|
258 |
text-decoration: underline;
|
259 |
}
|
260 |
|
261 |
+
.link-buttons {
|
262 |
+
display: flex;
|
263 |
+
flex-wrap: wrap;
|
264 |
+
margin-top: 10px;
|
265 |
+
}
|
266 |
+
|
267 |
/* File Types */
|
268 |
.file-types {
|
269 |
margin-top: 2rem;
|
|
|
353 |
margin-bottom: 10px;
|
354 |
margin-right: 0;
|
355 |
}
|
356 |
+
|
357 |
+
.link-buttons {
|
358 |
+
flex-direction: column;
|
359 |
+
}
|
360 |
+
|
361 |
+
.small-btn {
|
362 |
+
margin-left: 0;
|
363 |
+
margin-top: 5px;
|
364 |
+
}
|
365 |
}
|
366 |
|
367 |
</style>
|
|
|
541 |
link.className = 'result-link';
|
542 |
link.target = '_blank';
|
543 |
|
544 |
+
linkContainer.appendChild(link);
|
545 |
+
|
546 |
+
const buttonsContainer = document.createElement('div');
|
547 |
+
buttonsContainer.className = 'link-buttons';
|
548 |
+
|
549 |
const copyBtn = document.createElement('button');
|
550 |
copyBtn.textContent = 'Copy Link';
|
551 |
copyBtn.className = 'small-btn copy-btn';
|
|
|
554 |
alert('Link copied to clipboard!');
|
555 |
});
|
556 |
};
|
557 |
+
buttonsContainer.appendChild(copyBtn);
|
|
|
|
|
558 |
|
559 |
if (fileName.toLowerCase().endsWith('.mp4')) {
|
560 |
const embedBtn = document.createElement('button');
|
|
|
563 |
embedBtn.onclick = () => {
|
564 |
showEmbedModal(url);
|
565 |
};
|
566 |
+
buttonsContainer.appendChild(embedBtn);
|
567 |
}
|
568 |
|
569 |
+
linkContainer.appendChild(buttonsContainer);
|
570 |
+
|
571 |
resultContainer.appendChild(linkContainer);
|
572 |
resultContainer.style.display = 'block';
|
573 |
}
|