master
Aevann1 2021-10-12 07:39:03 +02:00
parent 951afa7987
commit dbc08a2579
11 changed files with 29 additions and 23 deletions

View File

@ -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]

View File

@ -15,11 +15,11 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=74">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=74">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=75">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=75">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=72"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=72">
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=75">
{% endif %}
</head>

View File

@ -250,12 +250,12 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=74">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=74">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
<link rel="stylesheet" href="/assets/css/main.css?v=75">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=75">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=75">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=74">
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=75">
{% endif %}
{% endblock %}

View File

@ -1,4 +1,4 @@
<script src="/assets/js/emoji_modal.js?v=54"></script>
<script src="/assets/js/emoji_modal.js?v=55"></script>
<style>
a.emojitab {

View File

@ -17,11 +17,11 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=74">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=74">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=75">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=75">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=74">
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=75">
{% endif %}
<div class="row justify-content-around">

View File

@ -12,7 +12,7 @@
<title>2-Step Login - {{'SITE_NAME' | app_config}}</title>
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=74">
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=75">
</head>

View File

@ -55,8 +55,8 @@
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=74">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=74">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=75">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=75">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
<link href="/assets/css/fa.css?v=52" rel="stylesheet">
</head>

View File

@ -40,10 +40,10 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=74">
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=75">
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=74">
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=75">
{% endif %}
<link href="/assets/css/fa.css?v=52" rel="stylesheet">

View File

@ -36,7 +36,7 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=74">
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=75">
</head>

View File

@ -31,7 +31,7 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=74">
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=75">
</head>

View File

@ -25,12 +25,12 @@
{% block stylesheets %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=74">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=74">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
<link rel="stylesheet" href="/assets/css/main.css?v=75"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=75">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css?v=75">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<style>:root{--primary:#{{'DEFAULT_COLOR' | app_config}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=74">
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=74">
<link rel="stylesheet" href="/assets/css/main.css?v=75">
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=75">
{% endif %}
{% endblock %}