2022-01-26 21:10:09 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0, user-scalable=yes" />
|
|
|
|
|
|
|
|
{{ yml['header'] | safe }}
|
|
|
|
{% if yml['css']['item'] %}
|
|
|
|
{% for css in yml['css']['item'] %}
|
|
|
|
<link href="{{ css }}" rel="stylesheet">
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if yml['js']['head'] %}
|
|
|
|
{% for js in yml['js']['head'] %}
|
|
|
|
<script src="{{ js }}" ></script>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<title>EnglishPal 英文单词高效记</title>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container-fluid">
|
|
|
|
<p><b><font size="+3" color="red">English Pal - Learn English smartly!</font></b></p>
|
|
|
|
{% if session['logged_in'] %}
|
2023-04-26 18:49:59 +08:00
|
|
|
<a href="/{{ session['username'] }}/userpage">{{ session['username'] }}</a>
|
2023-03-23 13:40:22 +08:00
|
|
|
{% if session['username'] == admin_name %}
|
|
|
|
<a href="/admin">管理</a></p>
|
|
|
|
{% endif %}
|
2022-01-26 21:10:09 +08:00
|
|
|
{% else %}
|
2023-03-23 22:05:36 +08:00
|
|
|
<p><a href="/login">登录</a> <a href="/signup">注册</a> <a href="/static/usr/instructions.html">使用说明</a></p >
|
2023-03-08 16:33:13 +08:00
|
|
|
<p><b> {{ random_ads }}。 <a href="/signup">试试</a>吧!</b></p>
|
2022-01-26 21:10:09 +08:00
|
|
|
{% endif %}
|
2023-03-23 13:40:22 +08:00
|
|
|
<div class="alert alert-success" role="alert">共有文章 <span class="badge bg-success"> {{ number_of_essays }} </span> 篇</div>
|
2022-01-27 20:12:10 +08:00
|
|
|
<p>粘贴1篇文章 (English only)</p>
|
2022-01-26 21:10:09 +08:00
|
|
|
<form method="post" action="/">
|
2024-03-27 12:39:42 +08:00
|
|
|
<textarea name="content" id="article" rows="10" cols="120"></textarea><br/>
|
2022-01-26 21:10:09 +08:00
|
|
|
<input type="submit" value="get文章中的词频"/>
|
2024-03-27 12:39:42 +08:00
|
|
|
<input type="reset" value="清除" onclick="clearArticle()"/>
|
2022-01-26 21:10:09 +08:00
|
|
|
</form>
|
|
|
|
{% if d_len > 0 %}
|
2022-01-27 12:48:25 +08:00
|
|
|
<p><b>最常见的词</b></p>
|
2022-01-26 21:10:09 +08:00
|
|
|
{% for x in lst if x[1]>99 %}
|
|
|
|
<a href="http://youdao.com/w/eng/{{x[0]}}/#keyfrom=dict2.index">{{x[0]}}</a> {{x[1]}}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2023-08-10 14:19:37 +08:00
|
|
|
<p class="text-muted">Version: 20230810</p>
|
2022-01-26 21:10:09 +08:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
|
|
|
|
</div>
|
|
|
|
{{ yml['footer'] | safe }}
|
|
|
|
{% if yml['js']['bottom'] %}
|
|
|
|
{% for js in yml['js']['bottom'] %}
|
|
|
|
<script src="{{ js }}" ></script>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2024-03-27 12:39:42 +08:00
|
|
|
<script type="text/javascript">
|
|
|
|
window.onload = function() {
|
|
|
|
document.getElementById('article').value = localStorage.getItem('article') || '';
|
|
|
|
}
|
|
|
|
document.getElementById('article').addEventListener('input', saveArticle);
|
|
|
|
|
|
|
|
function saveArticle() {
|
|
|
|
localStorage.setItem('article', document.getElementById('article').value);
|
|
|
|
}
|
|
|
|
|
|
|
|
function clearArticle() {
|
|
|
|
localStorage.removeItem('article');
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
2022-01-26 21:10:09 +08:00
|
|
|
</body>
|
2022-01-27 20:12:10 +08:00
|
|
|
</html>
|