forked from rDrama/rDrama
fdMerge branch 'frost' of https://github.com/Aevann1/Drama into frost
commit
53849ec242
|
@ -220,19 +220,19 @@ def remove_mod(v, sub):
|
||||||
|
|
||||||
return redirect(f'/h/{sub}/mods')
|
return redirect(f'/h/{sub}/mods')
|
||||||
|
|
||||||
@app.get("/create_sub")
|
# @app.get("/create_sub")
|
||||||
@is_not_permabanned
|
# @is_not_permabanned
|
||||||
def create_sub(v):
|
# def create_sub(v):
|
||||||
if SITE_NAME == 'rDrama' and v.admin_level < 3: abort(403)
|
# if SITE_NAME == 'rDrama' and v.admin_level < 3: abort(403)
|
||||||
|
|
||||||
if request.host == 'rdrama.net': cost = 0
|
# if request.host == 'rdrama.net': cost = 0
|
||||||
else:
|
# else:
|
||||||
num = v.subs_created + 1
|
# num = v.subs_created + 1
|
||||||
for a in v.alts:
|
# for a in v.alts:
|
||||||
num += a.subs_created
|
# num += a.subs_created
|
||||||
cost = num * 100
|
# cost = num * 100
|
||||||
|
|
||||||
return render_template("sub/create_sub.html", v=v, cost=cost)
|
# return render_template("sub/create_sub.html", v=v, cost=cost)
|
||||||
|
|
||||||
|
|
||||||
@app.post("/create_sub")
|
@app.post("/create_sub")
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
|
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
|
<a class="btn btn-primary btn-block mb-3 disabled" href="/create_sub">CREATE HOLE (temporarily disabled for 24 hours)</a>
|
||||||
{% if v.mods(sub.name) %}
|
{% if v.mods(sub.name) %}
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/settings">HOLE SETTINGS</a>
|
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/settings">HOLE SETTINGS</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/exilees">HOLE EXILEES</a>
|
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/exilees">HOLE EXILEES</a>
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/blockers">HOLE BLOCKERS</a>
|
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/blockers">HOLE BLOCKERS</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
|
<a class="btn btn-primary btn-block mb-3 disabled" href="/create_sub">CREATE HOLE (temporarily disabled for 24 hours)</a>
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/holes">BROWSE HOLES</a>
|
<a class="btn btn-primary btn-block mb-3" href="/holes">BROWSE HOLES</a>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
|
|
|
@ -81,32 +81,26 @@
|
||||||
{% if not postembed %}
|
{% if not postembed %}
|
||||||
<div class="voting my-2 d-none d-md-block pr-2">
|
<div class="voting my-2 d-none d-md-block pr-2">
|
||||||
{% if v and request.path.startswith('/@') and v.admin_level < 2 %}
|
{% if v and request.path.startswith('/@') and v.admin_level < 2 %}
|
||||||
|
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '1', '{{v.id}}')" class="post-{{p.id}}-up mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% else %}d-none{% endif %}"></div>
|
||||||
{% if voted==1 %}
|
|
||||||
<div class="mx-auto arrow-up post-{{p.id}}-up active"></div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<span class="post-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
<span class="post-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
||||||
|
|
||||||
{% if voted==-1 %}
|
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '-1', '{{v.id}}')" class="post-{{p.id}}-down text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% else %}d-none{% endif %}"></div>
|
||||||
<div class="text-muted mx-auto arrow-down post-{{p.id}}-down active"></div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% elif v %}
|
{% elif v %}
|
||||||
|
|
||||||
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '1', '{{v.id}}')" class="post-{{p.id}}-up mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}"></div>
|
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '1', '{{v.id}}')" class="post-{{p.id}}-up mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}"></div>
|
||||||
|
|
||||||
<span class="post-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
<span class="post-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
||||||
|
|
||||||
<div {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '-1', '{{v.id}}')" class="post-{{p.id}}-down text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
|
<div {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '-1', '{{v.id}}')" class="post-{{p.id}}-down text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '1', '{{v.id}}')" class="post-{{p.id}}-up mx-auto arrow-up" onclick="location.href='/login';"></div>
|
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '1', '{{v.id}}')" class="post-{{p.id}}-up mx-auto arrow-up" onclick="location.href='/login';"></div>
|
||||||
|
|
||||||
<span class="post-{{p.id}}-score-none score{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
<span class="post-{{p.id}}-score-none score{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
||||||
|
|
||||||
<div {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '-1', '{{v.id}}')" class="post-{{p.id}}-down text-muted mx-auto arrow-down" onclick="location.href='/login';"></div>
|
<div {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '-1', '{{v.id}}')" class="post-{{p.id}}-down text-muted mx-auto arrow-down" onclick="location.href='/login';"></div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -257,45 +251,36 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not postembed %}
|
{% if not postembed %}
|
||||||
{% if v and request.path.startswith('/@') and v.admin_level < 2 %}
|
{% if v and request.path.startswith('/@') and v.admin_level < 2 %}
|
||||||
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
|
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
|
||||||
|
|
||||||
{% if voted==1 %}
|
<span tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '1', '{{v.id}}')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% else %}d-none{% endif %}"></span>
|
||||||
<span class="mr-2 arrow-up post-{{p.id}}-up active">
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<span class="post-mobile-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
<span class="post-mobile-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
||||||
|
|
||||||
{% if voted==-1 %}
|
<span tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '-1', '{{v.id}}')" class="post-mobile-{{p.id}}-down mx-0 pl-1 my-0 arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% else %}d-none{% endif %}"></span>
|
||||||
<span class="ml-2 my-0 arrow-down post-{{p.id}}-down active"></span>
|
</li>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
|
||||||
{% elif v %}
|
{% elif v %}
|
||||||
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
|
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
|
||||||
|
|
||||||
<span tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '1', '{{v.id}}')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}">
|
<span tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '1', '{{v.id}}')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}"></span>
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="post-mobile-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
<span class="post-mobile-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
||||||
|
|
||||||
<span {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '-1', '{{v.id}}')" class="post-mobile-{{p.id}}-down mx-0 pl-1 my-0 arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}">
|
<span {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '-1', '{{v.id}}')" class="post-mobile-{{p.id}}-down mx-0 pl-1 my-0 arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></span>
|
||||||
</span>
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
|
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
|
||||||
<span tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" onclick="location.href='/login';">
|
<span tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" onclick="location.href='/login';">
|
||||||
<i class="fas fa-arrow-alt-up mx-0" aria-hidden="true"></i>
|
<i class="fas fa-arrow-alt-up mx-0" aria-hidden="true"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="post-mobile-score-{{p.id}} score{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
<span class="post-mobile-score-{{p.id}} score{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
||||||
|
|
||||||
<span tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" onclick="location.href='/login';">
|
<span tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" onclick="location.href='/login';">
|
||||||
<i class="fas fa-arrow-alt-down mx-0" aria-hidden="true"></i>
|
<i class="fas fa-arrow-alt-down mx-0" aria-hidden="true"></i>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue