master
Aevann1 2022-03-17 12:28:13 +02:00
parent de6cebe659
commit 830949a209
14 changed files with 21 additions and 19 deletions

View File

@ -414,7 +414,9 @@ def morecomments(v, cid):
c = g.db.query(Comment).filter_by(id=cid).one_or_none()
comments = c.replies
p = comments[0].post
if comments: p = comments[0].post
else: p = None
return render_template("comments.html", v=v, comments=comments, p=p, render_replies=True, ajax=True)
@app.post("/edit_post/<pid>")

View File

@ -309,7 +309,7 @@ def settings_profile_post(v):
defaultsorting = request.values.get("defaultsorting")
if defaultsorting:
if defaultsorting in {"hot", "new", "old", "comments", "controversial", "top", "bottom"}:
if defaultsorting in {"hot", "bump", "new", "old", "comments", "controversial", "top", "bottom"}:
v.defaultsorting = defaultsorting
updated = True
else: abort(400)

View File

@ -15,7 +15,7 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=28">
{% if v.agendaposter %}
<style>
html {
@ -39,7 +39,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=28">
{% endif %}
</head>

View File

@ -8,7 +8,7 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175">
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=28">
{% if v.agendaposter %}
<style>
html {
@ -33,7 +33,7 @@
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=28">
{% endif %}
{% if sub and sub.css and not request.path.endswith('settings') %}

View File

@ -6,7 +6,7 @@
{% block content %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=28">
{% if v.agendaposter %}
<style>
html {
@ -30,7 +30,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=28">
{% endif %}
<div class="row justify-content-around">

View File

@ -19,7 +19,7 @@
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=28">
</head>

View File

@ -14,7 +14,7 @@
<title>2-Step Login - {{SITE_NAME}}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=28">
</head>

View File

@ -34,7 +34,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=28">
{% if v.agendaposter %}
<style>
html {

View File

@ -39,10 +39,10 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=28">
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=28">
{% endif %}
</head>

View File

@ -67,7 +67,7 @@
<p>Change the default sorting for posts.</p>
<div class="input-group mb2">
<select autocomplete="off" id='defaultsorting' class="form-control" form="profile-settings" name="defaultsorting" onchange="post_toast(this,'/settings/profile?defaultsorting='+document.getElementById('defaultsorting').value)">
{% for entry in ["hot", "new", "old", "top", "bottom", "controversial", "comments"] %}
{% for entry in ["hot", "bump", "new", "old", "top", "bottom", "controversial", "comments"] %}
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry}}>{{entry}}</option>
{% endfor %}
</select>

View File

@ -31,7 +31,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=28">
</head>

View File

@ -32,7 +32,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=28">
</head>

View File

@ -205,7 +205,7 @@
&nbsp;&nbsp;{{p.views}} thread views
</div>
<h5 class="card-title post-title text-left w-lg-95 mb-0 pb-0 pb-md-1"><a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="{{p.permalink}}" class="stretched-link {% if p.author.agendaposter %}agendaposter{% endif %}">
<h5 class="card-title post-title text-left w-lg-95 mb-0 pb-0 pb-md-1"><a {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="{{p.permalink}}" class="{% if voted %}visited{% endif %} stretched-link {% if p.author.agendaposter %}agendaposter{% endif %}">
{% if p.club %}<span class="patron font-weight-bolder mr-1" style="background-color:red; font-size:12px; line-height:2;">{{CC}}</span>{% endif %}
{% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2;">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}}

View File

@ -26,7 +26,7 @@
{% block stylesheets %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=175"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=28">
{% if v.agendaposter %}
<style>
html {
@ -51,7 +51,7 @@
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=175">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=28">
{% endif %}
{% endblock %}