gf
This commit is contained in:
parent
8020c6402d
commit
45b23a717d
4 changed files with 30 additions and 7 deletions
|
@ -22,6 +22,15 @@ def post_embed(id, v):
|
|||
|
||||
return render_template("submission_listing.html", listing=[p], v=v)
|
||||
|
||||
@app.template_filter("favorite_emojis")
|
||||
def favorite_emojis():
|
||||
str = ""
|
||||
emojis = session["favorite_emojis"]
|
||||
emojis = sorted(emojis.items(), key=lambda x: x[1], reverse=True)
|
||||
for k, v in emojis:
|
||||
str += f'<button class="btn m-1 px-0" onclick="getEmoji(\'{k}\', \'@form@\')" style="background: None!important; width:60px; overflow: hidden; border: none;" data-toggle="tooltip" title=":{k}:" delay:="0"><img loading="lazy" width=50 src="/assets/images/emojis/{k}.gif" alt="{k}-emoji"/></button>'
|
||||
return str
|
||||
|
||||
@app.context_processor
|
||||
def inject_constants():
|
||||
constants = [c for c in dir(const) if not c.startswith("_")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue