forked from rDrama/rDrama
1
0
Fork 0

fdMerge branch 'frost' of https://github.com/Aevann1/Drama into frost

master
Aevann1 2022-02-27 23:28:28 +00:00
commit 5c21f72491
17 changed files with 107 additions and 91 deletions

View File

@ -51,6 +51,7 @@ class Submission(Base):
flair = Column(String)
ban_reason = Column(String)
embed_url = Column(String)
new = Column(Boolean)
author = relationship("User", primaryjoin="Submission.author_id==User.id")
oauth_app = relationship("OauthApp", viewonly=True)

View File

@ -162,8 +162,11 @@ def front_all(v, sub=None):
sort=request.values.get("sort", defaultsorting)
t=request.values.get('t', defaulttime)
ccmode=request.values.get('ccmode', "false").lower()
subs=session.get('subs', False)
subsonly=request.values.get('subsonly', "false").lower()
if SITE_NAME == 'Drama': defaultsubs = 'Exclude subs'
else: defaultsubs = 'Include subs'
subs=session.get('subs', defaultsubs)
try: gt=int(request.values.get("utc_greater_than", 0))
except: gt=0
@ -182,7 +185,6 @@ def front_all(v, sub=None):
lt=lt,
sub=sub,
site=SITE,
subsonly=subsonly
)
posts = get_posts(ids, v=v)
@ -263,23 +265,22 @@ def front_all(v, sub=None):
g.db.commit()
if request.headers.get("Authorization"): return {"data": [x.json for x in posts], "next_exists": next_exists}
return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page, ccmode=ccmode, sub=sub, subs=subs, subsonly=subsonly, home=True)
return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page, ccmode=ccmode, sub=sub, subs=subs, home=True)
@cache.memoize(timeout=86400)
def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false", subs=False, filter_words='', gt=0, lt=0, sub=None, site=None, subsonly="false"):
def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false", subs='Exclude subs', filter_words='', gt=0, lt=0, sub=None, site=None):
posts = g.db.query(Submission)
if sub: posts = posts.filter_by(sub=sub.name)
elif subsonly == "true":
elif subs == "View subs only":
posts = posts.filter(Submission.sub != None)
if v and v.all_blocks: posts = posts.filter(Submission.sub.notin_(v.all_blocks))
elif subs:
elif subs == "Include subs":
if v and v.all_blocks: posts = posts.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
elif SITE_NAME == 'Drama': posts = posts.filter(Submission.sub == None)
elif v and v.all_blocks: posts = posts.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
elif subs == 'Exclude subs': posts = posts.filter(Submission.sub == None)
if gt: posts = posts.filter(Submission.created_utc > gt)
if lt: posts = posts.filter(Submission.created_utc < lt)
@ -353,13 +354,12 @@ 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:
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False)
if sub: pins = pins.filter_by(sub=sub.name)
elif subsonly == "true":
elif subs == "View subs only":
pins = pins.filter(Submission.sub != None)
if v and v.all_blocks: pins = pins.filter(Submission.sub.notin_(v.all_blocks))
elif subs:
elif subs == "Include subs":
if v and v.all_blocks: pins = pins.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
elif SITE_NAME == 'Drama': pins = pins.filter(Submission.sub == None)
elif v and v.all_blocks: pins = pins.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
elif subs == 'Exclude subs': pins = pins.filter(Submission.sub == 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()]

View File

@ -159,7 +159,7 @@ def post_id(pid, anything=None, v=None, sub=None):
post = get_post(pid, v=v)
if 'megathread' in post.title.lower(): defaultsortingcomments = 'new'
if post.new: defaultsortingcomments = 'new'
elif v: defaultsortingcomments = v.defaultsortingcomments
else: defaultsortingcomments = "top"
sort = request.values.get("sort", defaultsortingcomments)
@ -1093,6 +1093,7 @@ def submit_post(v, sub=None):
club=club,
author_id=v.id,
over_18=bool(request.values.get("over_18","")),
new=bool(request.values.get("new","")),
app_id=v.client.application.id if v.client else None,
is_bot = request.headers.get("Authorization"),
url=url,
@ -1206,14 +1207,15 @@ def submit_post(v, sub=None):
for x in notify_users:
add_notif(cid, x)
text = f"@{v.username} has made a new post: [{post.title}]({post.shortlink})"
if post.sub: text += f" in <a href='/s/{post.sub}'>/s/{post.sub}"
if request.values.get('followers'):
text = f"@{v.username} has made a new post: [{post.title}]({post.shortlink})"
if post.sub: text += f" in <a href='/s/{post.sub}'>/s/{post.sub}"
cid = notif_comment(text, autojanny=True)
for follow in v.followers:
user = get_account(follow.user_id)
if post.club and not user.paid_dues: continue
add_notif(cid, user.id)
cid = notif_comment(text, autojanny=True)
for follow in v.followers:
user = get_account(follow.user_id)
if post.club and not user.paid_dues: continue
add_notif(cid, user.id)
@ -1388,7 +1390,7 @@ def submit_post(v, sub=None):
if request.headers.get("Authorization"): return post.json
else:
post.voted = 1
if 'megathread' in post.title.lower(): sort = 'new'
if post.new: sort = 'new'
else: sort = v.defaultsortingcomments
return render_template('submission.html', v=v, p=post, sort=sort, render_replies=True, offset=0, success=True, sub=post.subr)

View File

@ -439,10 +439,10 @@ def sub_sidebar(v, sub):
return redirect(f'/s/{sub.name}/settings')
@app.post("/sub_toggle")
def sub_toggle():
session["subs"] = not session.get("subs")
return '', 204
@app.post("/sub_toggle/<mode>")
def sub_toggle(mode):
if mode in ('Exclude subs', 'Include subs', 'View subs only'): session["subs"] = mode
return redirect('/')
@app.get("/subs")

View File

@ -15,7 +15,7 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=153"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
{% 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?a=153"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
{% endif %}
</head>

View File

@ -7,7 +7,7 @@
<script src="/static/assets/js/bootstrap.js?a=245"></script>
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=153">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155">
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
{% if v.agendaposter %}
<style>
@ -32,7 +32,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=153"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
{% endif %}
{% if sub and sub.css and not request.path.endswith('settings') %}

View File

@ -38,59 +38,62 @@
{% block navbar %}
<div class="d-flex align-items-center">
{% if request.path == '/' and v.paid_dues %}
{% if ccmode=="true"%}<a data-bs-toggle="tooltip" data-bs-placement="bottom" title="Only show country club posts" class="btn btn-primary text-primary text-small-m mx-2" href="?sort={{sort}}&t={{t}}&ccmode=false&subsonly={{subsonly}}">CC</a>{% endif %}
{% if ccmode=="false" %}<a data-bs-toggle="tooltip" data-bs-placement="bottom" title="Only show country club posts" class="btn btn-secondary text-small-m mx-2" href="?sort={{sort}}&t={{t}}&ccmode=true&subsonly={{subsonly}}"></i>CC</a>{% endif %}
{% endif %}
{% if request.path in ('/','/logged_out') and SITE_NAME == 'Drama' %}
{% if subs %}
{% set classes='btn-primary text-primary' %}
{% else %}
{% set classes='btn-secondary' %}
{% endif %}
<button data-bs-toggle="tooltip" data-bs-placement="bottom" title="Include posts from subs" class="{{classes}} btn text-small-m mx-2" onclick="post('/sub_toggle')">Subs</button>
{% if ccmode=="true"%}<a data-bs-toggle="tooltip" data-bs-placement="bottom" title="Only show country club posts" class="btn btn-primary text-primary text-small-m mx-2" href="?sort={{sort}}&t={{t}}&ccmode=false"><i class="fas fa-golf-club mr-2"></i>CC</a>{% endif %}
{% if ccmode=="false" %}<a data-bs-toggle="tooltip" data-bs-placement="bottom" title="Only show country club posts" class="btn btn-secondary text-small-m mx-2" href="?sort={{sort}}&t={{t}}&ccmode=true"><i class="fas fa-golf-club mr-2"></i>CC</a>{% endif %}
{% endif %}
<div class="dropdown dropdown-actions mx-2">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if t=="hour" %}<i class="fas fa-clock mr-1"></i>
{% elif t=="day" %}<i class="fas fa-calendar-day mr-1"></i>
{% elif t=="week" %}<i class="fas fa-calendar-week mr-1"></i>
{% elif t=="month" %}<i class="fas fa-calendar-alt mr-1"></i>
{% elif t=="year" %}<i class="fas fa-calendar mr-1"></i>
{% elif t=="all" %}<i class="fas fa-infinity mr-1"></i>
<i class="fas fa-user-group mr-2"></i>
{{subs | capitalize}}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px);">
{% if subs != "Exclude subs" %}<button data-bs-toggle="tooltip" data-bs-placement="bottom" title="Exclude posts from subs" class="dropdown-item" onclick="post('/sub_toggle/Exclude%20subs')"> <i class="fas fa-user-group mr-2"></i>Exclude subs</button>{% endif %}
{% if subs != "Include subs" %}<button data-bs-toggle="tooltip" data-bs-placement="bottom" title="Include posts from subs" class="dropdown-item" onclick="post('/sub_toggle/Include%20subs')"> <i class="fas fa-user-group mr-2"></i>Include subs</button>{% endif %}
{% if subs != "View subs only" %}<button data-bs-toggle="tooltip" data-bs-placement="bottom" title="Include posts from subs" class="dropdown-item" onclick="post('/sub_toggle/View%20subs%20only')"> <i class="fas fa-user-group mr-2"></i>View subs only</button>{% endif %}
</div>
</div>
<div class="dropdown dropdown-actions mx-2">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if t=="hour" %}<i class="fas fa-clock mr-2"></i>
{% elif t=="day" %}<i class="fas fa-calendar-day mr-2"></i>
{% elif t=="week" %}<i class="fas fa-calendar-week mr-2"></i>
{% elif t=="month" %}<i class="fas fa-calendar-alt mr-2"></i>
{% elif t=="year" %}<i class="fas fa-calendar mr-2"></i>
{% elif t=="all" %}<i class="fas fa-infinity mr-2"></i>
{% endif %}
{{t | capitalize}}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px);">
{% if t != "hour" %}<a class="dropdown-item" href="?sort={{sort}}&t=hour&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-clock mr-2"></i>Hour</a>{% endif %}
{% if t != "day" %}<a class="dropdown-item" href="?sort={{sort}}&t=day&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-calendar-day mr-2"></i>Day</a>{% endif %}
{% if t != "week" %}<a class="dropdown-item" href="?sort={{sort}}&t=week&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-calendar-week mr-2"></i>Week</a>{% endif %}
{% if t != "month" %}<a class="dropdown-item" href="?sort={{sort}}&t=month&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-calendar-alt mr-2"></i>Month</a>{% endif %}
{% if t != "year" %}<a class="dropdown-item" href="?sort={{sort}}&t=year&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-calendar mr-2"></i>Year</a>{% endif %}
{% if t != "all" %}<a class="dropdown-item" href="?sort={{sort}}&t=all&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-infinity mr-2"></i>All</a>{% endif %}
{% if t != "hour" %}<a class="dropdown-item" href="?sort={{sort}}&t=hour&ccmode={{ccmode}}"><i class="fas fa-clock mr-2"></i>Hour</a>{% endif %}
{% if t != "day" %}<a class="dropdown-item" href="?sort={{sort}}&t=day&ccmode={{ccmode}}"><i class="fas fa-calendar-day mr-2"></i>Day</a>{% endif %}
{% if t != "week" %}<a class="dropdown-item" href="?sort={{sort}}&t=week&ccmode={{ccmode}}"><i class="fas fa-calendar-week mr-2"></i>Week</a>{% endif %}
{% if t != "month" %}<a class="dropdown-item" href="?sort={{sort}}&t=month&ccmode={{ccmode}}"><i class="fas fa-calendar-alt mr-2"></i>Month</a>{% endif %}
{% if t != "year" %}<a class="dropdown-item" href="?sort={{sort}}&t=year&ccmode={{ccmode}}"><i class="fas fa-calendar mr-2"></i>Year</a>{% endif %}
{% if t != "all" %}<a class="dropdown-item" href="?sort={{sort}}&t=all&ccmode={{ccmode}}"><i class="fas fa-infinity mr-2"></i>All</a>{% endif %}
</div>
</div>
<div class="dropdown dropdown-actions ml-2">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton2" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if sort=="hot" %}<i class="fas fa-fire mr-1"></i>{% endif %}
{% if sort=="top" %}<i class="fas fa-arrow-alt-circle-up mr-1"></i>{% endif %}
{% if sort=="bottom" %}<i class="fas fa-arrow-alt-circle-down mr-1"></i>{% endif %}
{% if sort=="new" %}<i class="fas fa-sparkles mr-1"></i>{% endif %}
{% if sort=="old" %}<i class="fas fa-book mr-1"></i>{% endif %}
{% if sort=="controversial" %}<i class="fas fa-bullhorn mr-1"></i>{% endif %}
{% if sort=="comments" %}<i class="fas fa-comments mr-1"></i>{% endif %}
{% if sort=="hot" %}<i class="fas fa-fire mr-2"></i>{% endif %}
{% if sort=="top" %}<i class="fas fa-arrow-alt-circle-up mr-2"></i>{% endif %}
{% if sort=="bottom" %}<i class="fas fa-arrow-alt-circle-down mr-2"></i>{% endif %}
{% if sort=="new" %}<i class="fas fa-sparkles mr-2"></i>{% endif %}
{% if sort=="old" %}<i class="fas fa-book mr-2"></i>{% endif %}
{% if sort=="controversial" %}<i class="fas fa-bullhorn mr-2"></i>{% endif %}
{% if sort=="comments" %}<i class="fas fa-comments mr-2"></i>{% endif %}
{{sort | capitalize}}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton2" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px);">
{% if sort != "hot" %}<a class="dropdown-item" href="?sort=hot&t={{t}}&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-fire mr-2"></i>Hot</a>{% endif %}
{% if sort != "top" %}<a class="dropdown-item" href="?sort=top&t={{t}}&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-arrow-alt-circle-up mr-2"></i>Top</a>{% endif %}
{% if sort != "bottom" %}<a class="dropdown-item" href="?sort=bottom&t={{t}}&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-arrow-alt-circle-down mr-2"></i>Bottom</a>{% endif %}
{% if sort != "new" %}<a class="dropdown-item" href="?sort=new&t={{t}}&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-sparkles mr-2"></i>New</a>{% endif %}
{% if sort != "old" %}<a class="dropdown-item" href="?sort=old&t={{t}}&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-book mr-2"></i>Old</a>{% endif %}
{% if sort != "controversial" %}<a class="dropdown-item" href="?sort=controversial&t={{t}}&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-bullhorn mr-2"></i>Controversial</a>{% endif %}
{% if sort != "comments" %}<a class="dropdown-item" href="?sort=comments&t={{t}}&ccmode={{ccmode}}&subsonly={{subsonly}}"><i class="fas fa-comments mr-2"></i>Comments</a>{% endif %}
{% if sort != "hot" %}<a class="dropdown-item" href="?sort=hot&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-fire mr-2"></i>Hot</a>{% endif %}
{% if sort != "top" %}<a class="dropdown-item" href="?sort=top&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-alt-circle-up mr-2"></i>Top</a>{% endif %}
{% if sort != "bottom" %}<a class="dropdown-item" href="?sort=bottom&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-arrow-alt-circle-down mr-2"></i>Bottom</a>{% endif %}
{% if sort != "new" %}<a class="dropdown-item" href="?sort=new&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-sparkles mr-2"></i>New</a>{% endif %}
{% if sort != "old" %}<a class="dropdown-item" href="?sort=old&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-book mr-2"></i>Old</a>{% endif %}
{% if sort != "controversial" %}<a class="dropdown-item" href="?sort=controversial&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-bullhorn mr-2"></i>Controversial</a>{% endif %}
{% if sort != "comments" %}<a class="dropdown-item" href="?sort=comments&t={{t}}&ccmode={{ccmode}}"><i class="fas fa-comments mr-2"></i>Comments</a>{% endif %}
</div>
</div>
</div>
@ -157,14 +160,14 @@
<ul class="pagination pagination-sm mb-0">
{% if page>1 %}
<li class="page-item">
<small><a class="page-link" href="?sort={{sort}}&page={{page-1}}&t={{t}}&ccmode={{ccmode}}&subsonly={{subsonly}}" tabindex="-1">Prev</a></small>
<small><a class="page-link" href="?sort={{sort}}&page={{page-1}}&t={{t}}&ccmode={{ccmode}}" tabindex="-1">Prev</a></small>
</li>
{% else %}
<li class="page-item disabled"><span class="page-link">Prev</span></li>
{% endif %}
{% if next_exists %}
<li class="page-item">
<small><a class="page-link" href="?sort={{sort}}&page={{page+1}}&t={{t}}&ccmode={{ccmode}}&subsonly={{subsonly}}">Next</a></small>
<small><a class="page-link" href="?sort={{sort}}&page={{page+1}}&t={{t}}&ccmode={{ccmode}}">Next</a></small>
</li>
{% else %}
<li class="page-item disabled"><span class="page-link">Next</span></li>

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?a=153"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
{% 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?a=153"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
{% endif %}
<div class="row justify-content-around">

View File

@ -18,7 +18,7 @@
{% endblock %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=153">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
</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?a=153"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
</head>

View File

@ -34,7 +34,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=153"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
{% 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?a=153"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=153"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
{% endif %}
</head>

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?a=153"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
</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?a=153"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
</head>

View File

@ -744,7 +744,7 @@
{% if p.edited_utc %}
&nbsp;&nbsp;Edited <span data-bs-toggle="tooltip" data-bs-placement="bottom" onmouseover="timestamp('edited_timestamp','{{p.edited_utc}}')" id="edited_timestamp">{{p.edited_string}}</span>
{% endif %}
&nbsp;&nbsp;{{p.views}} views
&nbsp;&nbsp;{{p.views}} clicks
</div>
{% if p.active_flags %}
<div id="flaggers" class="flaggers d-none">

View File

@ -208,7 +208,7 @@
{% if p.edited_utc %}
&nbsp;&nbsp;Edited <span data-bs-toggle="tooltip" data-bs-placement="bottom" id="edited_timestamp-{{p.id}}" onmouseover="timestamp('edited_timestamp-{{p.id}}','{{p.edited_utc}}')">{{p.edited_string}}</span>
{% endif %}
&nbsp;&nbsp;{{p.views}} views
&nbsp;&nbsp;{{p.views}} clicks
</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 %}">

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?a=153"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?a=26">
{% if v.agendaposter %}
<style>
html {
@ -50,7 +50,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?a=153">
<link rel="stylesheet" href="/static/assets/css/main.css?a=155">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?a=26">
{% endif %}
{% endblock %}
@ -161,27 +161,37 @@
<pre></pre>
<div class="custom-control custom-checkbox">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="nsfwCheck" name="over_18">
<label class="custom-control-label" for="nsfwCheck">+18</label>
<input checked autocomplete="off" type="checkbox" class="custom-control-input" id="followers" name="followers">
<label class="custom-control-label" for="followers">Alert Followers</label>
</div>
<div class="custom-control custom-checkbox">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="new" name="new">
<label class="custom-control-label" for="new">Make the default comment sorting "new"</label>
</div>
<div class="custom-control custom-checkbox">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="nsfw" name="over_18">
<label class="custom-control-label" for="nsfw">+18</label>
</div>
<div class="custom-control custom-checkbox">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="privateCheck" name="private">
<label class="custom-control-label" for="privateCheck">Draft</label>
<input autocomplete="off" type="checkbox" class="custom-control-input" id="private" name="private">
<label class="custom-control-label" for="private">Draft</label>
</div>
{% if v.club_allowed != False %}
<div class="custom-control custom-checkbox">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="clubCheck" name="club">
<label class="custom-control-label" for="clubCheck">{{CC_TITLE}} thread</label>
<input autocomplete="off" type="checkbox" class="custom-control-input" id="club" name="club">
<label class="custom-control-label" for="club">{{CC_TITLE}} thread</label>
</div>
{% endif %}
<div class="custom-control custom-checkbox">
<input {% if ghost != 42069 and v.coins < ghost and v.procoins < ghost %}disabled{% endif %} autocomplete="off" type="checkbox" class="custom-control-input" id="ghostCheck" name="ghost">
<input {% if ghost != 42069 and v.coins < ghost and v.procoins < ghost %}disabled{% endif %} autocomplete="off" type="checkbox" class="custom-control-input" id="ghost" name="ghost">
{% if ghost == 42069 %}
<label class="custom-control-label" for="ghostCheck">Ghost Thread (will use a ghost award you own)</label>
<label class="custom-control-label" for="ghost">Ghost Thread (will use a ghost award you own)</label>
{% else %}
<label class="custom-control-label" for="ghostCheck">Ghost Thread (cost: {{ghost}} coins or marseybux)</label>
<label class="custom-control-label" for="ghost">Ghost Thread (cost: {{ghost}} coins or marseybux)</label>
{% endif %}
</div>