Browse Source

提示评论

master
欧醚 4 years ago
parent
commit
cf4ffde833
Signed by: OmmyZhang GPG Key ID: 757D312E7C9D13F7
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app.py
  2. +1
    -1
      templates/list.html

+ 1
- 1
app.py View File

@ -99,7 +99,7 @@ def can_list():
} for name, ques, hint, ans in C.verify } for name, ques, hint, ans in C.verify
] ]
return render_template('list.html', pagination=pag, vs=vs, showPrivate=(key==C.key), sort_by=sort_by, key=key)
return render_template('list.html', pagination=pag, vs=vs, showPrivate=(key==C.key), sort_by=sort_by, key=key, base_toot_url='https://%s/web/statuses/' % C.domain)
@app.route('/ordinary/new', methods=['POST']) @app.route('/ordinary/new', methods=['POST'])
@limiter.limit("5 / hour; 1 / 2 second") @limiter.limit("5 / hour; 1 / 2 second")

+ 1
- 1
templates/list.html View File

@ -436,7 +436,7 @@ $(document).ready(function(){
$(self).find('.timeago').timeago(); $(self).find('.timeago').timeago();
} else { } else {
$(self).empty(); $(self).empty();
$(self).append(`<div class="card card-body">(暂无评论)</div>`)
$(self).append(`<div class="card card-body"><p>(暂无评论) <sub><a target="_blank" href="{{base_toot_url}}${toot}">发表第一条评论</sub></p></div>`)
} }
}, },
error: (xhr, status, error) => { error: (xhr, status, error) => {

Loading…
Cancel
Save