Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +17 -12
templates/index.html
CHANGED
@@ -113,7 +113,7 @@
|
|
113 |
font-size: 10pt;
|
114 |
}
|
115 |
.feed {
|
116 |
-
transition:
|
117 |
width: 100%;
|
118 |
height: 100%;
|
119 |
max-height: 80vh;
|
@@ -357,23 +357,28 @@
|
|
357 |
const img = new Image();
|
358 |
img.onload = function() {
|
359 |
if (firstLoad) {
|
360 |
-
|
361 |
}
|
362 |
firstLoad = false;
|
363 |
old = newUrl;
|
364 |
feed.src = this.src;
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
infoDiv.style.height = "100%";
|
371 |
-
infoText.style.opacity = "1";
|
372 |
-
}, 300);
|
373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
setTimeout(refreshImage, 500);
|
375 |
-
country.textContent = "{{ country }}";
|
376 |
-
|
377 |
};
|
378 |
|
379 |
img.onerror = function(event) {
|
|
|
113 |
font-size: 10pt;
|
114 |
}
|
115 |
.feed {
|
116 |
+
transition: 0.3s ease;
|
117 |
width: 100%;
|
118 |
height: 100%;
|
119 |
max-height: 80vh;
|
|
|
357 |
const img = new Image();
|
358 |
img.onload = function() {
|
359 |
if (firstLoad) {
|
360 |
+
infoDiv.style.height = "0%";
|
361 |
}
|
362 |
firstLoad = false;
|
363 |
old = newUrl;
|
364 |
feed.src = this.src;
|
365 |
+
country.textContent = "connecting...";
|
366 |
+
|
367 |
+
const pixelWidth = this.naturalWidth;
|
368 |
+
|
369 |
+
feed.style.width = "0px";
|
|
|
|
|
|
|
370 |
|
371 |
+
setTimeout(() => {
|
372 |
+
locationName.textContent = "{{ name|safe }}";
|
373 |
+
feed.style.width = pixelWidth + "px";
|
374 |
+
feed.style.height = "70%";
|
375 |
+
feed.style.opacity = "1";
|
376 |
+
infoDiv.style.height = "100%";
|
377 |
+
infoText.style.opacity = "1";
|
378 |
+
country.textContent = "{{ country }}";
|
379 |
+
}, 100);
|
380 |
+
|
381 |
setTimeout(refreshImage, 500);
|
|
|
|
|
382 |
};
|
383 |
|
384 |
img.onerror = function(event) {
|