From 10c291bed200663bcfd5ce82a8f170bd3c2f7918 Mon Sep 17 00:00:00 2001 From: Lan Hui <1348141770@qq.com> Date: Thu, 10 Aug 2023 19:12:30 +0800 Subject: [PATCH] Highlight user difficulty level too. --- app/templates/userpage_get.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html index d5fb72e..4cc6835 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"] }}


@@ -194,7 +194,7 @@ }); } function update(today_article){ - $('#user-level').html(today_article['user_level']); + $('#user_level').html(today_article['user_level']); $('#text_level').html(today_article["text_level"]); $('#date').html('Article added on: '+today_article["date"]); $('#article_title').html(today_article["article_title"]); @@ -204,6 +204,8 @@ $('#answer').html(today_article["answer"]); document.querySelector('#text_level').classList.add('mark'); // highlight text difficult level for 2 seconds setTimeout(() => {document.querySelector('#text_level').classList.remove('mark');}, 2000); + document.querySelector('#user_level').classList.add('mark'); // do the same thing for user difficulty level + setTimeout(() => {document.querySelector('#user_level').classList.remove('mark');}, 2000); } function check_pre(visited_articles){