diff --git a/files/routes/front.py b/files/routes/front.py index 6260bb913..070eee2ab 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -218,7 +218,13 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' posts = posts[:size] - if page == 1: posts = g.db.query(Submission.id).options(lazyload('*')).filter(Submission.stickied != None).all() + posts + pins = g.db.query(Submission.id).options(lazyload('*')).filter(Submission.stickied != None) + if v and v.admin_level == 0: + blocking = [x[0] for x in g.db.query(UserBlock.target_id).filter_by(user_id=v.id).all()] + blocked = [x[0] for x in g.db.query(UserBlock.user_id).filter_by(target_id=v.id).all()] + pins = pins.filter(Submission.author_id.notin_(blocking), Submission.author_id.notin_(blocked)) + + if page == 1: posts = pins + posts if ids_only: posts = [x[0] for x in posts] diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 03ad7dddb..5556b35de 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,11 +15,11 @@ {% if v %} - - {% if v.agendaposter %}{% elif v.css %}{% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index 7af6b65cb..63287cfa6 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -250,12 +250,12 @@ {% if v %} - - - {% if v.agendaposter %}{% elif v.css %}{% endif %} + + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} {% endblock %} diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html index 7c1a0ecdc..7ce3c798c 100644 --- a/files/templates/emoji_modal.html +++ b/files/templates/emoji_modal.html @@ -1,4 +1,4 @@ - + - - {% if v.agendaposter %}{% elif v.css %}{% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %}