1
0
Fork 0

app/main.py: light grey background for the article.

Lanhui-go-bootstrap
Hui Lan 2021-08-01 21:09:38 +08:00
parent 81e1e795be
commit 0efd2b420b
1 changed files with 3 additions and 1 deletions

View File

@ -111,12 +111,14 @@ def get_today_article(user_word_list, articleID):
break break
s = '<div class="alert alert-success" role="alert">According to your word list, your level is <span class="badge bg-success">%4.2f</span> and we have chosen an article with a difficulty level of <span class="badge bg-success">%4.2f</span> for you.</div>' % (user_level, text_level) s = '<div class="alert alert-success" role="alert">According to your word list, your level is <span class="badge bg-success">%4.2f</span> and we have chosen an article with a difficulty level of <span class="badge bg-success">%4.2f</span> for you.</div>' % (user_level, text_level)
s += '<p><b>%s</b></p>' % (d['date']) s += '<p><b>Article added on: %s</b></p>' % (d['date'])
s += '<div class="p-3 mb-2 bg-light text-dark">'
s += '<p><font size=+2>%s</font></p>' % (d['text']) s += '<p><font size=+2>%s</font></p>' % (d['text'])
s += '<p><i>%s</i></p>' % (d['source']) s += '<p><i>%s</i></p>' % (d['source'])
s += '<p><b>%s</b></p>' % (get_question_part(d['question'])) s += '<p><b>%s</b></p>' % (get_question_part(d['question']))
s = s.replace('\n', '<br/>') s = s.replace('\n', '<br/>')
s += '%s' % (get_answer_part(d['question'])) s += '%s' % (get_answer_part(d['question']))
s += '</div>'
session['articleID'] = d['article_id'] session['articleID'] = d['article_id']
return s return s