aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-nginx/sites/www/src/main.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2023-07-19 16:45:18 +0800
committercrupest <crupest@outlook.com>2023-07-19 16:45:18 +0800
commit6278a801235cfae67dbe24843a401b6036278843 (patch)
tree10cc037956c9df33f206d75436514299c156e7e8 /docker/crupest-nginx/sites/www/src/main.ts
parentbf3f4fcef32940991bf8f7a1d896d10653012339 (diff)
downloadcrupest-6278a801235cfae67dbe24843a401b6036278843.tar.gz
crupest-6278a801235cfae67dbe24843a401b6036278843.tar.bz2
crupest-6278a801235cfae67dbe24843a401b6036278843.zip
Yay, pretty, pretty, pretty.
Diffstat (limited to 'docker/crupest-nginx/sites/www/src/main.ts')
-rw-r--r--docker/crupest-nginx/sites/www/src/main.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/crupest-nginx/sites/www/src/main.ts b/docker/crupest-nginx/sites/www/src/main.ts
index 17d7e12..13553ed 100644
--- a/docker/crupest-nginx/sites/www/src/main.ts
+++ b/docker/crupest-nginx/sites/www/src/main.ts
@@ -71,10 +71,11 @@ async function loadTodos(syncWith: Promise<unknown>): Promise<void> {
const todosPromise = fetchTodos();
await syncWith; // Let's wait this first.
const todos = await todosPromise;
- todos.forEach((item) => {
+ todos.forEach((item, index) => {
const { status, title, closed } = item;
const li = document.createElement("li");
li.dataset.status = closed ? "closed" : "open";
+ li.style.animationDelay = `${index * 0.04}s`;
// The color from api server is kind of ugly at present.
// li.style.background = color;
const statusSpan = document.createElement("span");