From 6d15b65e3cd946ae0aff242bdf18412ea6f113d1 Mon Sep 17 00:00:00 2001 From: Lan Hui <1348141770@qq.com> Date: Thu, 10 Aug 2023 19:09:15 +0800 Subject: [PATCH] Make highlighting text difficulty level work. --- app/templates/userpage_get.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html index 28cc926..d5fb72e 100644 --- a/app/templates/userpage_get.html +++ b/app/templates/userpage_get.html @@ -65,7 +65,7 @@

阅读文章并回答问题

- +

Article added on: {{ today_article["date"] }}



{{ today_article["article_title"] }}


@@ -202,9 +202,8 @@ $('#source').html(today_article['source']); $('#question').html(today_article["question"]); $('#answer').html(today_article["answer"]); - document.querySelector('#text_level').classList.add('display-5'); // enlarge text difficult level for one second - - setTimeout(() => document.querySelector('#text_level').classList.remove('display-5'), 800); + document.querySelector('#text_level').classList.add('mark'); // highlight text difficult level for 2 seconds + setTimeout(() => {document.querySelector('#text_level').classList.remove('mark');}, 2000); } function check_pre(visited_articles){