Spaces:
Sleeping
Sleeping
jslmmfboom-coder commited on
Commit ·
5ec338d
1
Parent(s): 4c16f88
Fix: background stays fixed, remove parallax scroll on about page
Browse files- index.html +6 -8
- index.zip +3 -0
index.html
CHANGED
|
@@ -74,7 +74,6 @@ body{
|
|
| 74 |
/* === Parallax 背景层(滚动速度为前景50%) === */
|
| 75 |
.parallax-bg{
|
| 76 |
position:fixed;inset:0;z-index:-3;pointer-events:none;
|
| 77 |
-
transform:translateY(0);will-change:transform;
|
| 78 |
}
|
| 79 |
.parallax-bg .bg-cover-inner{
|
| 80 |
position:absolute;inset:0;
|
|
@@ -528,12 +527,6 @@ document.getElementById('usernameInput').addEventListener('keydown', e => {
|
|
| 528 |
if (e.key === 'Enter') doLogin();
|
| 529 |
});
|
| 530 |
|
| 531 |
-
// === Parallax Scrolling ===
|
| 532 |
-
window.addEventListener('scroll', () => {
|
| 533 |
-
const scrolled = window.pageYOffset;
|
| 534 |
-
document.getElementById('parallaxBg').style.transform = `translateY(${scrolled * 0.5}px)`;
|
| 535 |
-
});
|
| 536 |
-
|
| 537 |
// === Scene Mode Selector ===
|
| 538 |
function selectSceneMode(mode) {
|
| 539 |
selectedSceneMode = mode;
|
|
@@ -619,8 +612,13 @@ async function doDetect() {
|
|
| 619 |
const fd = new FormData();
|
| 620 |
fd.append('username', currentUser);
|
| 621 |
fd.append('scene_mode', selectedSceneMode);
|
| 622 |
-
fd.append('
|
| 623 |
const res = await fetch('/api/detect', { method: 'POST', body: fd });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 624 |
const data = await res.json();
|
| 625 |
if (data.error) { alert(data.error); return; }
|
| 626 |
renderResult(data);
|
|
|
|
| 74 |
/* === Parallax 背景层(滚动速度为前景50%) === */
|
| 75 |
.parallax-bg{
|
| 76 |
position:fixed;inset:0;z-index:-3;pointer-events:none;
|
|
|
|
| 77 |
}
|
| 78 |
.parallax-bg .bg-cover-inner{
|
| 79 |
position:absolute;inset:0;
|
|
|
|
| 527 |
if (e.key === 'Enter') doLogin();
|
| 528 |
});
|
| 529 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 530 |
// === Scene Mode Selector ===
|
| 531 |
function selectSceneMode(mode) {
|
| 532 |
selectedSceneMode = mode;
|
|
|
|
| 612 |
const fd = new FormData();
|
| 613 |
fd.append('username', currentUser);
|
| 614 |
fd.append('scene_mode', selectedSceneMode);
|
| 615 |
+
fd.append('images', input.files[0]);
|
| 616 |
const res = await fetch('/api/detect', { method: 'POST', body: fd });
|
| 617 |
+
if (!res.ok) {
|
| 618 |
+
const err = await res.json();
|
| 619 |
+
alert(err.detail || '检测失败');
|
| 620 |
+
return;
|
| 621 |
+
}
|
| 622 |
const data = await res.json();
|
| 623 |
if (data.error) { alert(data.error); return; }
|
| 624 |
renderResult(data);
|
index.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c697fe120e5598f29fb4ef75e0ea84c315b9e737ce194b76adc42a2e93876565
|
| 3 |
+
size 11504
|