forked from rDrama/rDrama
fdMerge branch 'frost' of https://github.com/Aevann1/Drama into frost
commit
17871224e5
|
@ -138,7 +138,7 @@ AGENDAPOSTER_MSG = """Hi @{username},\n\nYour {type} has been automatically remo
|
||||||
included. \n\n*This is an automated message; if you need help,
|
included. \n\n*This is an automated message; if you need help,
|
||||||
you can message us [here](/contact).*"""
|
you can message us [here](/contact).*"""
|
||||||
|
|
||||||
if SITE_NAME == 'Drama':
|
if SITE_NAME in ('Drama','2Much4You'):
|
||||||
PW_ID = 3750
|
PW_ID = 3750
|
||||||
BASEDBOT_ID = 0
|
BASEDBOT_ID = 0
|
||||||
KIPPY_ID = 7150
|
KIPPY_ID = 7150
|
||||||
|
|
|
@ -151,10 +151,12 @@ def front_all(v, sub=None):
|
||||||
|
|
||||||
if v:
|
if v:
|
||||||
defaultsorting = v.defaultsorting
|
defaultsorting = v.defaultsorting
|
||||||
defaulttime = v.defaulttime
|
if sub or SITE_NAME == '2Much4You': defaulttime = 'all'
|
||||||
|
else: defaulttime = v.defaulttime
|
||||||
else:
|
else:
|
||||||
defaultsorting = "hot"
|
defaultsorting = "hot"
|
||||||
defaulttime = defaulttimefilter
|
if sub or SITE_NAME == '2Much4You': defaulttime = 'all'
|
||||||
|
else: defaulttime = v.defaulttime
|
||||||
|
|
||||||
sort=request.values.get("sort", defaultsorting)
|
sort=request.values.get("sort", defaultsorting)
|
||||||
t=request.values.get('t', defaulttime)
|
t=request.values.get('t', defaulttime)
|
||||||
|
@ -341,6 +343,9 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
||||||
if (sort == "hot" or (v and v.id == Q_ID)) and page == 1 and ccmode == "false" and not gt and not lt:
|
if (sort == "hot" or (v and v.id == Q_ID)) and page == 1 and ccmode == "false" and not gt and not lt:
|
||||||
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False)
|
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False)
|
||||||
if sub: pins = pins.filter_by(sub=sub.name)
|
if sub: pins = pins.filter_by(sub=sub.name)
|
||||||
|
elif SITE_NAME == '2Much4You': pins = pins.filter(Submission.sub != None)
|
||||||
|
else: pins = pins.filter_by(sub=None)
|
||||||
|
|
||||||
if v and v.admin_level == 0:
|
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()]
|
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()]
|
blocked = [x[0] for x in g.db.query(UserBlock.user_id).filter_by(target_id=v.id).all()]
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=20">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=108"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=108"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=20">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=20">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=20">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
|
|
||||||
<nav class="shadow shadow-md fixed-top">
|
<nav class="shadow shadow-md fixed-top">
|
||||||
{% if SITE_NAME == 'Drama' or SUBS %}
|
{% if SITE_NAME == 'Drama' or SUBS %}
|
||||||
|
<style>
|
||||||
|
body {padding-top: 110.88px !important}
|
||||||
|
@media (max-width: 767.98px) {
|
||||||
|
body {
|
||||||
|
padding-top: 94.55px !important
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% elif SUBS %}
|
||||||
<style>
|
<style>
|
||||||
body {padding-top: 85.88px !important}
|
body {padding-top: 85.88px !important}
|
||||||
@media (max-width: 767.98px) {
|
@media (max-width: 767.98px) {
|
||||||
|
@ -21,11 +30,13 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if SITE_NAME == 'Drama' %}
|
{% if SITE_NAME == 'Drama' %}
|
||||||
<div id="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: center; font-weight: bold;white-space:nowrap">
|
<div class="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: center; font-weight: bold;white-space:nowrap">
|
||||||
<a style="color: white" class="text-small-mobile" href="https://reddit.com/r/SubredditDrama">💖🌈 welcome to {{SITE}}: the official site for r/subredditdrama</a>
|
<a style="color: white" class="text-small-mobile" href="https://reddit.com/r/SubredditDrama">💖🌈 welcome to {{SITE}}: the official site for r/subredditdrama</a>
|
||||||
</div>
|
</div>
|
||||||
{% elif SUBS %}
|
{% endif %}
|
||||||
<div id="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: left; font-weight: bold;white-space:nowrap">
|
|
||||||
|
{% if SUBS %}
|
||||||
|
<div class="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: left; font-weight: bold;white-space:nowrap">
|
||||||
{% for s in SUBS %}
|
{% for s in SUBS %}
|
||||||
<a {% if sub and s == sub.name %} style="color: var(--secondary)" {% else %} style="color: white"{% endif %} class="text-small-mobile ml-2" href="/s/{{s}}">/s/{{s}}</a>
|
<a {% if sub and s == sub.name %} style="color: var(--secondary)" {% else %} style="color: white"{% endif %} class="text-small-mobile ml-2" href="/s/{{s}}">/s/{{s}}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=20">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=20">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row justify-content-around">
|
<div class="row justify-content-around">
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=20">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<title>2-Step Login - {{SITE_NAME}}</title>
|
<title>2-Step Login - {{SITE_NAME}}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=20">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
|
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=20">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=20">
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=20">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
|
<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>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=20">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=20">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=20">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/static/assets/css/main.css?a=116">
|
<link rel="stylesheet" href="/static/assets/css/main.css?a=116">
|
||||||
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=19">
|
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=20">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue