From 34319435a9d6249c010aec7adabc89bf215a515d Mon Sep 17 00:00:00 2001 From: lihua Date: Mon, 3 Nov 2025 21:54:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E8=A7=A6=E6=91=B8=E4=BA=8B=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 1225 +++++++++++++++++++++++++++------------------------- 1 file changed, 634 insertions(+), 591 deletions(-) diff --git a/index.html b/index.html index e2c499d..2c68feb 100644 --- a/index.html +++ b/index.html @@ -1,406 +1,460 @@ - - - - 便签墙 - + + + +
+ + + - window.addEventListener('resize', syncMobileMode) - - - + \ No newline at end of file From b15a303a54baf131058d81fd05201bf0fad1e448 Mon Sep 17 00:00:00 2001 From: lihua Date: Mon, 3 Nov 2025 21:58:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?style:=20=E4=BD=BF=E7=94=A8=20Prettier=20?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 1456 ++++++++++++++++++++++++++-------------------------- 1 file changed, 730 insertions(+), 726 deletions(-) diff --git a/index.html b/index.html index 2c68feb..2e179f1 100644 --- a/index.html +++ b/index.html @@ -1,677 +1,682 @@ - - - - - 便签墙 - - - - -
- - - - - \ No newline at end of file + `; + + const state = { + angle, + scale: entryScale, + left, + top, + maximized: false, + closing: false, + }; + + cardStates.set(card, state); + applyTransform(card, state); + board.appendChild(card); + + requestAnimationFrame(() => { + requestAnimationFrame(() => { + state.scale = 1; + applyTransform(card, state); + card.style.opacity = "1"; + }); + }); + + if (board.children.length > maxCards) { + const oldest = board.firstElementChild; + if (oldest && oldest !== card) { + oldest.remove(); + } + } + } + + for (let i = 0; i < initialCardCount; i++) { + setTimeout(createCard, i * (isMobile ? 60 : 40)); + } + + scheduleNextSpawn(); + + document.addEventListener("visibilitychange", () => { + if (!document.hidden) { + scheduleNextSpawn(); + } + }); + + if (typeof pointerMediaQuery.addEventListener === "function") { + pointerMediaQuery.addEventListener("change", syncMobileMode); + } else if (typeof pointerMediaQuery.addListener === "function") { + pointerMediaQuery.addListener(syncMobileMode); + } + + window.addEventListener("resize", syncMobileMode); + + +