remotes/1693045480750635534/spooky-22
Aevann1 2022-02-06 14:13:48 +02:00
parent 022e300d2f
commit 936f5cccab
4 changed files with 15 additions and 11 deletions

View File

@ -304,7 +304,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
if sort == "hot":
ti = int(time.time()) + 3600
posts = posts.order_by(-1000000*(Submission.realupvotes + 1 + Submission.comment_count/5 + (func.length(Submission.body_html)-func.length(func.replace(Submission.body_html,'</a>','')))/4)/(func.power(((ti - Submission.created_utc)/1000), 1.23)))
posts = posts.order_by(-1000000*(Submission.realupvotes + 1 + Submission.comment_count/5 + (func.length(Submission.body_html)-func.length(func.replace(Submission.body_html,'</a>',''))))/(func.power(((ti - Submission.created_utc)/1000), 1.23)))
elif sort == "new":
posts = posts.order_by(Submission.created_utc.desc())
elif sort == "old":

View File

@ -163,7 +163,7 @@
{% if request.host != 'pcmemes.net' %}
<a class="dropdown-item" href="/discord"><i class="fab fa-discord fa-fw text-left mr-3"></i>Discord</a>
{% endif %}
{% if not (g.webview and v.truecoins < 1) %}
{% if not (g.webview and v.truecoins < 1) and request.host != '2Much4You' %}
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="{{config('GUMROAD_LINK')}}"><i class="fas fa-dollar-sign fa-fw text-left mr-3"></i>Donate</a>
{% endif %}
{% if request.host == 'rdrama.net' %}<a class="dropdown-item" href="/archives"><i class="fas fa-book fa-fw text-left mr-3"></i>Archives</a>{% endif %}
@ -206,9 +206,11 @@
<li class="nav-item">
<a class="nav-link" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
</li>
<li class="nav-item">
<a class="nav-link copy-link" data-clipboard-text="{{SITE_FULL}}/signup?ref={{v.username}}"><i class="fas fa-user-friends fa-fw text-left mr-3"></i>Invite friends</a>
</li>
{% if not g.webview %}
<li class="nav-item">
<a class="nav-link copy-link" data-clipboard-text="{{SITE_FULL}}/signup?ref={{v.username}}"><i class="fas fa-user-friends fa-fw text-left mr-3"></i>Invite friends</a>
</li>
{% endif %}
<a class="nav-item nav-link" href="/assets/{{config('SITE_NAME')}}_v1.6.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/Drama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>

View File

@ -420,6 +420,10 @@
<div id="post-content" class="{% if p.deleted_utc %}deleted {% endif %}card-block w-100 my-md-auto">
<div class="post-meta text-left mb-2">
{% if p.sub %}
<a href='/s/{{p.sub}}'>/s/{{p.sub}}</a>&nbsp;&nbsp;
{% endif %}
{% if p.bannedfor %}
<a role="button"><i class="fad fa-gavel text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="User was banned for this post{% if p.author.banned_by %} by @{{p.author.banned_by.username}}{% endif %}"></i></a>
{% endif %}
@ -459,9 +463,6 @@
&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
{% if p.sub %}
&nbsp;&nbsp;<a href='/s/{{p.sub}}'>/s/{{p.sub}}</a>
{% endif %}
</div>
{% if p.active_flags %}
<div id="flaggers" class="flaggers d-none">

View File

@ -152,6 +152,10 @@
<div class="card-block text-left x-scroll-parent my-md-auto w-100">
<div class="post-meta text-left x-scroll mb-md-2">
{% if p.sub %}
<a href='/s/{{p.sub}}'>/s/{{p.sub}}</a>&nbsp;&nbsp;
{% endif %}
{% if p.bannedfor %}
<a role="button"><i class="fad fa-gavel text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="User was banned for this post{% if p.author.banned_by %} by @{{p.author.banned_by.username}}{% endif %}"></i></a>
{% endif %}
@ -195,9 +199,6 @@
&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
{% if p.sub %}
&nbsp;&nbsp;<a href='/s/{{p.sub}}'>/s/{{p.sub}}</a>
{% endif %}
</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 %}">