Highlight user difficulty level too.
parent
6d15b65e3c
commit
10c291bed2
|
@ -65,7 +65,7 @@
|
|||
<p><b>阅读文章并回答问题</b></p>
|
||||
<div id="text-content">
|
||||
<div id="found">
|
||||
<div class="alert alert-success" role="alert">According to your word list, your level is <span class="text-decoration-underline" id="user-level">{{ today_article["user_level"] }}</span> and we have chosen an article with a difficulty level of <span class="text-decoration-underline" id="text_level">{{ today_article["text_level"] }}</span> for you.</div>
|
||||
<div class="alert alert-success" role="alert">According to your word list, your level is <span class="text-decoration-underline" id="user_level">{{ today_article["user_level"] }}</span> and we have chosen an article with a difficulty level of <span class="text-decoration-underline" id="text_level">{{ today_article["text_level"] }}</span> for you.</div>
|
||||
<p class="text-muted" id="date">Article added on: {{ today_article["date"] }}</p><br/>
|
||||
<div class="p-3 mb-2 bg-light text-dark" style="margin: 0 0.5%;"><br/>
|
||||
<p class="display-6" id="article_title">{{ today_article["article_title"] }}</p><br/>
|
||||
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue