diff --git a/app/main.py b/app/main.py index b13df3e..634338a 100644 --- a/app/main.py +++ b/app/main.py @@ -110,7 +110,7 @@ def get_today_article(user_word_list, articleID): d = reading break - s = '

According to your word list, your level is %4.2f and we have chosen an article with a difficulty level of %4.2f for you.

' % (user_level, text_level) + s = '' % (user_level, text_level) s += '

%s

' % (d['date']) s += '

%s

' % (d['text']) s += '

%s

' % (d['source']) @@ -230,6 +230,8 @@ def mainpage(): + + EnglishPal 英文单词高效记 @@ -242,7 +244,7 @@ def mainpage(): page += '

登录 成为会员 使用说明

\n' #page += '

advertisement

' % (get_random_image(path_prefix + 'static/img/')) page += '

%s

' % (get_random_ads()) - page += '

共有文章%d篇' % (total_number_of_essays()) + page += '

' % (total_number_of_essays()) page += '

粘帖1篇文章 (English only)

' page += '
' page += '
' @@ -257,6 +259,7 @@ def mainpage(): break page += '%s %d\n' % (youdao_link(x[0]), x[0], x[1]) + page += ' ' page += '' return page @@ -336,10 +339,11 @@ def userpage(username): page = '\n' page += '\n' page += '\n' # forbid treating numbers as cell numbers in smart phones + page += '' page += 'EnglishPal Study Room for %s' % (username) page += '

English Pal for %s 登出

' % (username) - page += '

下一篇

' % (username) page += '

阅读文章并回答问题

\n' + page += '

下一篇

' % (username) page += '
%s
' % (get_today_article(user_freq_record, session['articleID'])) page += '

收集生词吧 (可以在正文中划词,也可以复制黏贴)

' page += '' % (username) @@ -388,11 +392,12 @@ def userpage(username): session['time'] = 0 # discard anchor if isinstance(d[word], list): # d[word] is a list of dates if freq > 1: - page += '

%s(%d) 熟悉 不熟悉 删除

\n' % (youdao_link(word), word, '; '.join(d[word]), freq,username, word,username,word, username,word) + page += '

%s(%d) 熟悉 不熟悉 删除

\n' % (youdao_link(word), word, '; '.join(d[word]), freq,username, word,username,word, username,word) else: - page += '

%s(%d) 熟悉 不熟悉 删除

\n' % (youdao_link(word), word, '; '.join(d[word]), freq,username, word,username,word, username,word) + page += '

%s(%d) 熟悉 不熟悉 删除

\n' % (youdao_link(word), word, '; '.join(d[word]), freq,username, word,username,word, username,word) elif isinstance(d[word], int): # d[word] is a frequency. to migrate from old format. page += '%s%d\n' % (youdao_link(word), word, freq) + page += '' return page ### Sign-up, login, logout ###