将标记文章按钮移到页面上方;标记文章时不要alert
parent
2bec0642dd
commit
b2e11aea6f
|
@ -84,10 +84,18 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p><b>阅读文章并回答问题</b></p>
|
<p><b>阅读文章并回答问题</b></p>
|
||||||
|
|
||||||
<div id="text-content">
|
<div id="text-content">
|
||||||
<div id="found">
|
<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. The Oxford word coverage is <span class="text-decoration-underline" id="ratio">{{ (today_article["ratio"] * 100) | int }}%.</span></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. The Oxford word coverage is <span class="text-decoration-underline" id="ratio">{{ (today_article["ratio"] * 100) | int }}%.</span></div>
|
||||||
<p class="text-muted" id="date">Article added on: {{ today_article["date"] }}</p><br/>
|
<p class="text-muted" id="date">Article added on: {{ today_article["date"] }}</p><br/>
|
||||||
|
|
||||||
|
<button onclick="saveArticle()" >标记文章</button>
|
||||||
|
<select id="saved_articles_dropdown">
|
||||||
|
<!-- 这里将显示已经保存的文章 -->
|
||||||
|
<option></option>
|
||||||
|
</select>
|
||||||
|
|
||||||
<div class="p-3 mb-2 bg-light text-dark" style="margin: 0 0.5%;"><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/>
|
<p class="display-6" id="article_title">{{ today_article["article_title"] }}</p><br/>
|
||||||
<p class="lead"><font id="article">{{ today_article["article_body"] }}</font></p><br/>
|
<p class="lead"><font id="article">{{ today_article["article_body"] }}</font></p><br/>
|
||||||
|
@ -121,11 +129,6 @@
|
||||||
<input type="checkbox" id="highlightCheckbox" onclick="toggleHighlighting()" />生词高亮
|
<input type="checkbox" id="highlightCheckbox" onclick="toggleHighlighting()" />生词高亮
|
||||||
<input type="checkbox" id="readCheckbox" onclick="onReadClick()" />大声朗读
|
<input type="checkbox" id="readCheckbox" onclick="onReadClick()" />大声朗读
|
||||||
<input type="checkbox" id="chooseCheckbox" onclick="onChooseClick()" />划词入库
|
<input type="checkbox" id="chooseCheckbox" onclick="onChooseClick()" />划词入库
|
||||||
<button onclick="saveArticle()" class="btn btn-primary">标记文章</button>
|
|
||||||
<select id="saved_articles_dropdown" style="height: 50px">
|
|
||||||
<!-- 这里将显示已经保存的文章 -->
|
|
||||||
<option></option>
|
|
||||||
</select>
|
|
||||||
<div class="range">
|
<div class="range">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="sliderValue">
|
<div class="sliderValue">
|
||||||
|
@ -361,7 +364,6 @@
|
||||||
option.title = article.article_title;
|
option.title = article.article_title;
|
||||||
savedArticlesDropdown.appendChild(option);
|
savedArticlesDropdown.appendChild(option);
|
||||||
localStorage.setItem(articleTitle, articleJSON); // 以文章标题为键,序列化的JSON字符串为值存储
|
localStorage.setItem(articleTitle, articleJSON); // 以文章标题为键,序列化的JSON字符串为值存储
|
||||||
alert("文章已标记");
|
|
||||||
}
|
}
|
||||||
function loadSelectedArticle() {
|
function loadSelectedArticle() {
|
||||||
const selectedOption = document.getElementById('saved_articles_dropdown');
|
const selectedOption = document.getElementById('saved_articles_dropdown');
|
||||||
|
|
Loading…
Reference in New Issue