forked from rDrama/rDrama
1
0
Fork 0

blocks num

master
Aevann1 2022-03-06 03:53:11 +02:00
parent 39254f19eb
commit fa14b9019e
18 changed files with 123 additions and 112 deletions

View File

@ -4,6 +4,7 @@ from files.__main__ import Base
from files.helpers.lazy import lazy from files.helpers.lazy import lazy
from os import environ from os import environ
from .sub_subscription import * from .sub_subscription import *
from .sub_block import *
SITE_NAME = environ.get("SITE_NAME", '').strip() SITE_NAME = environ.get("SITE_NAME", '').strip()
SITE = environ.get("DOMAIN", '').strip() SITE = environ.get("DOMAIN", '').strip()
@ -21,6 +22,8 @@ class Sub(Base):
css = Column(String) css = Column(String)
subscriptions = relationship("SubSubscription", lazy="dynamic", primaryjoin="SubSubscription.sub==Sub.name", viewonly=True) subscriptions = relationship("SubSubscription", lazy="dynamic", primaryjoin="SubSubscription.sub==Sub.name", viewonly=True)
blocks = relationship("SubBlock", lazy="dynamic", primaryjoin="SubBlock.sub==Sub.name", viewonly=True)
def __repr__(self): def __repr__(self):
return f"<Sub(name={self.name})>" return f"<Sub(name={self.name})>"
@ -41,3 +44,8 @@ class Sub(Base):
@lazy @lazy
def subscription_num(self): def subscription_num(self):
return self.subscriptions.count() return self.subscriptions.count()
@property
@lazy
def block_num(self):
return self.blocks.count()

View File

@ -53,7 +53,7 @@
<tr> <tr>
<td><i class="{{a['icon']}} {{a['color']}}" style="font-size: 30px"></i></td> <td><i class="{{a['icon']}} {{a['color']}}" style="font-size: 30px"></i></td>
<td>{{a['title']}}</td> <td>{{a['title']}}</td>
<td><input autocomplete="off" type="number" class="form-control" name="{{a['kind']}}" value="0" min="0" max="10" placeholder="Enter amount..." ></td> <td><input autocomplete="off" type="number" class="form-control" name="{{a['kind']}}" value="0" min="0" max="10" placeholder="Enter amount..."></td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

View File

@ -14,13 +14,13 @@
<form id="banModalForm"> <form id="banModalForm">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}" > <input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<label for="ban-modal-link">Public ban reason (optional)</label> <label for="ban-modal-link">Public ban reason (optional)</label>
<textarea autocomplete="off" maxlength="64" name="reason" form="banModalForm" class="form-control" id="ban-modal-link" aria-label="With textarea" placeholder="Enter reason"></textarea> <textarea autocomplete="off" maxlength="64" name="reason" form="banModalForm" class="form-control" id="ban-modal-link" aria-label="With textarea" placeholder="Enter reason"></textarea>
<label for="days" class="mt-3">Duration days</label> <label for="days" class="mt-3">Duration days</label>
<input autocomplete="off" type="number" step="any" name="days" id="days" class="form-control" placeholder="leave blank for permanent" > <input autocomplete="off" type="number" step="any" name="days" id="days" class="form-control" placeholder="leave blank for permanent">
<div class="custom-control custom-switch mt-3"> <div class="custom-control custom-switch mt-3">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="alts" name="alts"> <input autocomplete="off" type="checkbox" class="custom-control-input" id="alts" name="alts">

View File

@ -769,7 +769,7 @@
{% endif %} {% endif %}
{% if c.oauth_app %} {% if c.oauth_app %}
<a href="{{c.oauth_app.permalink}}/comments" class="list-group-item text-info" ><i class="fas fa-code text-info mr-2"></i>API App</a> <a href="{{c.oauth_app.permalink}}/comments" class="list-group-item text-info"><i class="fas fa-code text-info mr-2"></i>API App</a>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>

View File

@ -63,22 +63,22 @@
{% block title %} {% block title %}
<title>{{SITE_NAME}}</title> <title>{{SITE_NAME}}</title>
<meta property="og:type" content="article" > <meta property="og:type" content="article">
<meta property="og:title" content="{{SITE_NAME}}" > <meta property="og:title" content="{{SITE_NAME}}">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta property="og:url" content="{{SITE_FULL}}{{request.full_path}}"> <meta property="og:url" content="{{SITE_FULL}}{{request.full_path}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}"> <meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:author" name="author" content="@{{SITE_FULL}}/" > <meta property="og:author" name="author" content="@{{SITE_FULL}}/">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@{{SITE_FULL}}/"> <meta name="twitter:site" content="@{{SITE_FULL}}/">
<meta name="twitter:title" content="{{SITE_NAME}}" > <meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="@{{SITE_FULL}}/"> <meta name="twitter:creator" content="@{{SITE_FULL}}/">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}" > <meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta name="twitter:url" content="{{SITE_FULL}}{{request.full_path}}" > <meta name="twitter:url" content="{{SITE_FULL}}{{request.full_path}}">
{% endblock %} {% endblock %}
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">

View File

@ -20,7 +20,7 @@
<tr> <tr>
<td>{{loop.index}}</td> <td>{{loop.index}}</td>
<td>{{marsey.name}}</td> <td>{{marsey.name}}</td>
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":{{marsey.name}}:" title=":{{marsey.name}}:" src="/e/{{marsey.name}}.webp?v=1012" ></td> <td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":{{marsey.name}}:" title=":{{marsey.name}}:" src="/e/{{marsey.name}}.webp?v=1012"></td>
<td>{{marsey.count}}</td> <td>{{marsey.count}}</td>
<td><a style="color:#{{author.namecolor}};font-weight:bold" href="/@{{author.username}}"><img loading="lazy" src="{{author.profile_url}}" class="pp20"><span {% if author.patron %}class="patron" style="background-color:#{{author.namecolor}}"{% endif %}>{{author.username}}</span></a></td> <td><a style="color:#{{author.namecolor}};font-weight:bold" href="/@{{author.username}}"><img loading="lazy" src="{{author.profile_url}}" class="pp20"><span {% if author.patron %}class="patron" style="background-color:#{{author.namecolor}}"{% endif %}>{{author.username}}</span></a></td>
</tr> </tr>
@ -30,7 +30,7 @@
<tr> <tr>
<td>{{loop.index}}</td> <td>{{loop.index}}</td>
<td>{{marsey.name}}</td> <td>{{marsey.name}}</td>
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":{{marsey.name}}:" title=":{{marsey.name}}:" src="/e/{{marsey.name}}.webp?v=1012" ></td> <td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":{{marsey.name}}:" title=":{{marsey.name}}:" src="/e/{{marsey.name}}.webp?v=1012"></td>
<td>{{marsey.count}}</td> <td>{{marsey.count}}</td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -38,7 +38,7 @@
{% endif %} {% endif %}
{% if v %} {% if v %}
<a class="list-inline-item" role="button" data-bs-toggle="dropdown" aria-expanded="false" ><i class="fas fa-ellipsis-h fa-fw"></i></a> <a class="list-inline-item" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fas fa-ellipsis-h fa-fw"></i></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{% if v.admin_level %} {% if v.admin_level %}
<a id="distinguish-{{p.id}}" class="dropdown-item {% if p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Distinguish</a> <a id="distinguish-{{p.id}}" class="dropdown-item {% if p.distinguish_level %}d-none{% endif %} list-inline-item text-info" role="button" onclick="post_toast2(this,'/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')"><i class="fas fa-crown"></i>Distinguish</a>
@ -65,7 +65,7 @@
{% endif %} {% endif %}
{% if p.oauth_app %} {% if p.oauth_app %}
<a class="dropdown-item list-inline-item" href="{{p.oauth_app.permalink}}" ><i class="fas fa-code"></i>API App</a> <a class="dropdown-item list-inline-item" href="{{p.oauth_app.permalink}}"><i class="fas fa-code"></i>API App</a>
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -15,22 +15,22 @@
<link rel="icon" type="image/png" href="/static/assets/images/{{SITE_NAME}}/icon.webp?v=1012"> <link rel="icon" type="image/png" href="/static/assets/images/{{SITE_NAME}}/icon.webp?v=1012">
<title>{% block pagetitle %}Settings - {{SITE_NAME}}{% endblock %}</title> <title>{% block pagetitle %}Settings - {{SITE_NAME}}{% endblock %}</title>
<meta property="og:type" content="article" > <meta property="og:type" content="article">
<meta property="og:title" content="{{SITE_NAME}}" > <meta property="og:title" content="{{SITE_NAME}}">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta property="og:url" content="{{request.host}}"> <meta property="og:url" content="{{request.host}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}"> <meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:author" name="author" content="@{{SITE_FULL}}/" > <meta property="og:author" name="author" content="@{{SITE_FULL}}/">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@{{SITE_FULL}}/"> <meta name="twitter:site" content="@{{SITE_FULL}}/">
<meta name="twitter:title" content="{{SITE_NAME}}" > <meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="@{{SITE_FULL}}/"> <meta name="twitter:creator" content="@{{SITE_FULL}}/">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}" > <meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta name="twitter:url" content="{{request.host}}" > <meta name="twitter:url" content="{{request.host}}">
<style>:root{--primary:#{{v.themecolor}}}</style> <style>:root{--primary:#{{v.themecolor}}}</style>

View File

@ -15,22 +15,22 @@
<meta name="thumbnail" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013"> <meta name="thumbnail" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<link rel="icon" type="image/png" href="/static/assets/images/{{SITE_NAME}}/icon.webp?v=1012"> <link rel="icon" type="image/png" href="/static/assets/images/{{SITE_NAME}}/icon.webp?v=1012">
<meta property="og:type" content="article" > <meta property="og:type" content="article">
<meta property="og:title" content="{{SITE_NAME}}" > <meta property="og:title" content="{{SITE_NAME}}">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta property="og:url" content="{{SITE_FULL}}{{request.full_path}}"> <meta property="og:url" content="{{SITE_FULL}}{{request.full_path}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}"> <meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}/" > <meta property="og:author" name="author" content="{{SITE_FULL}}/">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{SITE_FULL}}/"> <meta name="twitter:site" content="{{SITE_FULL}}/">
<meta name="twitter:title" content="{{SITE_NAME}}" > <meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="{{SITE_FULL}}/"> <meta name="twitter:creator" content="{{SITE_FULL}}/">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}" > <meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta name="twitter:url" content="{{SITE_FULL}}{{request.full_path}}" > <meta name="twitter:url" content="{{SITE_FULL}}{{request.full_path}}">

View File

@ -34,7 +34,7 @@
<div class="d-md-flex justify-content-between mb-3"> <div class="d-md-flex justify-content-between mb-3">
<div> <div>
<h2 class="h5" >Users you block</h2> <h2 class="h5">Users you block</h2>
<p class="text-small text-muted mb-md-0">You have blocked the following users. They cannot reply to your content or notify you with a username mention.</p> <p class="text-small text-muted mb-md-0">You have blocked the following users. They cannot reply to your content or notify you with a username mention.</p>
</div> </div>
<div class="mt-auto"> <div class="mt-auto">

View File

@ -397,7 +397,7 @@
<form action="/settings/song_change" method="post"> <form action="/settings/song_change" method="post">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}"> <input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<input autocomplete="off" type="text" name="song" class="form-control" value="{% if v.song %}https://youtu.be/{{v.song}}{% endif %}" placeholder='Enter a youtube video link here' > <input autocomplete="off" type="text" name="song" class="form-control" value="{% if v.song %}https://youtu.be/{{v.song}}{% endif %}" placeholder='Enter a youtube video link here'>
<br><small>In some browsers, users have to click at least once anywhere in the profile page for the anthem to play.</small> <br><small>In some browsers, users have to click at least once anywhere in the profile page for the anthem to play.</small>
<div class="d-flex mt-2"> <div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Change Profile Anthem"> <input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Change Profile Anthem">

View File

@ -24,7 +24,7 @@
<a class="btn btn-primary btn-block mt-5" href="https://ip2.network">STREAM LIST</a> <a class="btn btn-primary btn-block mt-5" href="https://ip2.network">STREAM LIST</a>
<a class="btn btn-primary btn-block" href="/post/4103">BUGS/SUGGESTIONS MEGATHREAD</a> <a class="btn btn-primary btn-block" href="/post/4103">BUGS/SUGGESTIONS MEGATHREAD</a>
<a class="btn btn-primary btn-block" href="/post/9694" >OFFICIAL CONSPIRACY THEORY THREAD</a> <a class="btn btn-primary btn-block" href="/post/9694">OFFICIAL CONSPIRACY THEORY THREAD</a>
<a class="btn btn-primary btn-block" href="/post/10415">OFFICIAL GAMBLING THREAD</a> <a class="btn btn-primary btn-block" href="/post/10415">OFFICIAL GAMBLING THREAD</a>
<a class="btn btn-primary btn-block" href="https://imgur.com/a/UFGJybS">PCM Watermark Collection</a> <a class="btn btn-primary btn-block" href="https://imgur.com/a/UFGJybS">PCM Watermark Collection</a>
<a class="btn btn-primary btn-block" href="https://imgur.com/a/HxBfECG">TRS</a> <a class="btn btn-primary btn-block" href="https://imgur.com/a/HxBfECG">TRS</a>

View File

@ -11,22 +11,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content=""> <meta name="author" content="">
<meta property="og:type" content="article" > <meta property="og:type" content="article">
<meta property="og:title" content="{{SITE_NAME}}" > <meta property="og:title" content="{{SITE_NAME}}">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta property="og:url" content="{{request.host}}"> <meta property="og:url" content="{{request.host}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}"> <meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}/" > <meta property="og:author" name="author" content="{{SITE_FULL}}/">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{SITE_FULL}}/"> <meta name="twitter:site" content="{{SITE_FULL}}/">
<meta name="twitter:title" content="{{SITE_NAME}}" > <meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="{{SITE_FULL}}/"> <meta name="twitter:creator" content="{{SITE_FULL}}/">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}" > <meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta name="twitter:url" content="{{request.host}}" > <meta name="twitter:url" content="{{request.host}}">
<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>
@ -91,7 +91,7 @@
<small class="d-inline-block text-muted ml-1">(optional)</small> <small class="d-inline-block text-muted ml-1">(optional)</small>
<input style="background-color: var(--gray-800)" autocomplete="off" class="form-control" id="email-register" <input style="background-color: var(--gray-800)" autocomplete="off" class="form-control" id="email-register"
aria-describedby="emailHelpRegister" type="email" pattern='([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+' name="email" readonly onfocus="if (this.hasAttribute('readonly')) {this.removeAttribute('readonly');this.blur();this.focus()}" > aria-describedby="emailHelpRegister" type="email" pattern='([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+' name="email" readonly onfocus="if (this.hasAttribute('readonly')) {this.removeAttribute('readonly');this.blur();this.focus()}">
<label for="password-register" class="mt-3">Password</label> <label for="password-register" class="mt-3">Password</label>

View File

@ -12,22 +12,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content=""> <meta name="author" content="">
<meta property="og:type" content="article" > <meta property="og:type" content="article">
<meta property="og:title" content="{{SITE_NAME}}" > <meta property="og:title" content="{{SITE_NAME}}">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta property="og:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta property="og:url" content="{{request.host}}"> <meta property="og:url" content="{{request.host}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}"> <meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}/" > <meta property="og:author" name="author" content="{{SITE_FULL}}/">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{SITE_FULL}}/"> <meta name="twitter:site" content="{{SITE_FULL}}/">
<meta name="twitter:title" content="{{SITE_NAME}}" > <meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="{{SITE_FULL}}/"> <meta name="twitter:creator" content="{{SITE_FULL}}/">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}" > <meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013" > <meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<meta name="twitter:url" content="{{request.host}}" > <meta name="twitter:url" content="{{request.host}}">
<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>

View File

@ -23,7 +23,7 @@
<td> <td>
{% if v.id == user.id or v.mod_date(sub.name) and v.mod_date(sub.name) < mod.created_utc %} {% if v.id == user.id or v.mod_date(sub.name) and v.mod_date(sub.name) < mod.created_utc %}
<form action="/s/{{sub.name}}/remove_mod" method="post"> <form action="/s/{{sub.name}}/remove_mod" method="post">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}" > <input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<input autocomplete="off" type="hidden" name="uid" value="{{user.id}}"> <input autocomplete="off" type="hidden" name="uid" value="{{user.id}}">
<input class="btn btn-primary" style="margin-top:-5px" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="{% if v.id == user.id %}Resign{% else %}Remove Mod{% endif %}"> <input class="btn btn-primary" style="margin-top:-5px" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="{% if v.id == user.id %}Resign{% else %}Remove Mod{% endif %}">
</form> </form>
@ -36,7 +36,7 @@
{% if v.mods(sub.name) %} {% if v.mods(sub.name) %}
<form action="/s/{{sub.name}}/add_mod" method="post"> <form action="/s/{{sub.name}}/add_mod" method="post">
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}" > <input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<input class="form-control" style="display:inline;width:250px" autocomplete="off" type="text" name="user" class="form-control" placeholder="Enter username.."> <input class="form-control" style="display:inline;width:250px" autocomplete="off" type="text" name="user" class="form-control" placeholder="Enter username..">
<input class="btn btn-primary" style="margin-top:-5px" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add Mod"> <input class="btn btn-primary" style="margin-top:-5px" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add Mod">
</form> </form>

View File

@ -14,8 +14,10 @@
<tr> <tr>
<th>#</th> <th>#</th>
<th>Name</th> <th>Name</th>
<th role="button" onclick="sort_table(2)" >Posts</th> <th role="button" onclick="sort_table(2)">Posts</th>
<th role="button" onclick="sort_table(3)" >Subscribers</th> <th role="button" onclick="sort_table(3)">Subscribers</th>
<th role="button" onclick="sort_table(4)">Blockers</th>
</tr> </tr>
</thead> </thead>
{% for sub, count in subs %} {% for sub, count in subs %}
@ -24,6 +26,7 @@
<td><a href="/s/{{sub.name}}" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>{{sub.name}}</a></td> <td><a href="/s/{{sub.name}}" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>{{sub.name}}</a></td>
<td>{{count}}</a> <td>{{count}}</a>
<td>{{sub.subscription_num}}</td> <td>{{sub.subscription_num}}</td>
<td>{{sub.block_num}}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

View File

@ -473,58 +473,58 @@
{% endif %} {% endif %}
<meta charset="utf-8" > <meta charset="utf-8">
<meta property="og:type" content="article" > <meta property="og:type" content="article">
{% if comment_info and not comment_info.is_banned and not comment_info.deleted_utc %} {% if comment_info and not comment_info.is_banned and not comment_info.deleted_utc %}
<title>{{'@'+comment_info.author_name}} comments on "{{p.plaintitle(v)}} - {{SITE_NAME}}"</title> <title>{{'@'+comment_info.author_name}} comments on "{{p.plaintitle(v)}} - {{SITE_NAME}}"</title>
<meta property="og:article:author" content="{{'@'+comment_info.author_name}}" > <meta property="og:article:author" content="{{'@'+comment_info.author_name}}">
<meta property="article:published_time" content="{{comment_info.created_datetime}}" > <meta property="article:published_time" content="{{comment_info.created_datetime}}">
{% if comment_info.edited_utc %}<meta property="article:modified_time" content="{{comment_info.edited_string}}" >{% endif %} {% if comment_info.edited_utc %}<meta property="article:modified_time" content="{{comment_info.edited_string}}">{% endif %}
<meta property="og:description" name="description" content="{{comment_info.plainbody(v)}}" > <meta property="og:description" name="description" content="{{comment_info.plainbody(v)}}">
<meta property="og:author" name="author" content="{{'@'+comment_info.author_name}}" > <meta property="og:author" name="author" content="{{'@'+comment_info.author_name}}">
<meta property="og:title" content="{{'@'+comment_info.author_name}} comments on {{p.plaintitle(v)}} - {{SITE_NAME}}" > <meta property="og:title" content="{{'@'+comment_info.author_name}} comments on {{p.plaintitle(v)}} - {{SITE_NAME}}">
<meta property="og:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{SITE_NAME}}/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013{% endif %}" > <meta property="og:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{SITE_NAME}}/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013{% endif %}">
{% if p.is_video %} {% if p.is_video %}
<meta property="og:video" content="{{p.realurl(v)}}" > <meta property="og:video" content="{{p.realurl(v)}}">
{% endif %} {% endif %}
<meta property="og:url" content="{{comment_info.permalink}}" > <meta property="og:url" content="{{comment_info.permalink}}">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary" > <meta name="twitter:card" content="summary">
<meta name="twitter:site" content="{{SITE_FULL}}/"> <meta name="twitter:site" content="{{SITE_FULL}}/">
<meta name="twitter:title" content="{{'@'+comment_info.author_name}} comments on {{p.plaintitle(v)}} - {{SITE_NAME}}" > <meta name="twitter:title" content="{{'@'+comment_info.author_name}} comments on {{p.plaintitle(v)}} - {{SITE_NAME}}">
<meta name="twitter:creator" content="{{'@'+comment_info.author_name}}"> <meta name="twitter:creator" content="{{'@'+comment_info.author_name}}">
<meta name="twitter:description" content="{{comment_info.plainbody(v)}}" > <meta name="twitter:description" content="{{comment_info.plainbody(v)}}">
<meta name="twitter:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{SITE_NAME}}/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013{% endif %}" > <meta name="twitter:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{SITE_NAME}}/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013{% endif %}">
<meta name="twitter:url" content="{{p.permalink}}" > <meta name="twitter:url" content="{{p.permalink}}">
{% else %} {% else %}
<title>{{p.plaintitle(v)}} - {{SITE_NAME}}</title> <title>{{p.plaintitle(v)}} - {{SITE_NAME}}</title>
{% if p.author %}<meta property="og:article:author" content="{{'@'+p.author_name}}">{% endif %} {% if p.author %}<meta property="og:article:author" content="{{'@'+p.author_name}}">{% endif %}
<meta property="article:published_time" content="{{p.created_datetime}}" > <meta property="article:published_time" content="{{p.created_datetime}}">
{% if p.edited_utc %}<meta property="article:modified_time" content="{{p.edited_string}}" >{% endif %} {% if p.edited_utc %}<meta property="article:modified_time" content="{{p.edited_string}}">{% endif %}
<meta property="og:description" name="description" content="{{p.plainbody(v)}}" > <meta property="og:description" name="description" content="{{p.plainbody(v)}}">
{% if p.author %}<meta property="og:author" name="author" content="{{'@'+p.author_name}}" >{% endif %} {% if p.author %}<meta property="og:author" name="author" content="{{'@'+p.author_name}}">{% endif %}
<meta property="og:title" content="{{p.plaintitle(v)}} - {{SITE_NAME}}" > <meta property="og:title" content="{{p.plaintitle(v)}} - {{SITE_NAME}}">
<meta property="og:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{SITE_NAME}}/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013{% endif %}" > <meta property="og:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{SITE_NAME}}/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013{% endif %}">
{% if p.url and p.is_video %} {% if p.url and p.is_video %}
<meta property="og:video" content="{{p.realurl(v)}}" > <meta property="og:video" content="{{p.realurl(v)}}">
{% endif %} {% endif %}
<meta property="og:url" content="{{p.permalink}}" > <meta property="og:url" content="{{p.permalink}}">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{SITE_FULL}}/"> <meta name="twitter:site" content="{{SITE_FULL}}/">
<meta name="twitter:title" content="{{p.plaintitle(v)}} - {{SITE_NAME}}" > <meta name="twitter:title" content="{{p.plaintitle(v)}} - {{SITE_NAME}}">
{% if p.author %}<meta name="twitter:creator" content="{{'@'+p.author_name}}">{% endif %} {% if p.author %}<meta name="twitter:creator" content="{{'@'+p.author_name}}">{% endif %}
<meta name="twitter:description" content="{{p.plainbody(v)}}" > <meta name="twitter:description" content="{{p.plainbody(v)}}">
<meta name="twitter:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb %}{{p.thumb_url}}{% else %}{{SITE_NAME}}/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013{% endif %}" > <meta name="twitter:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb %}{{p.thumb_url}}{% else %}{{SITE_NAME}}/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013{% endif %}">
<meta name="twitter:url" content="{{p.permalink}}" > <meta name="twitter:url" content="{{p.permalink}}">
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -10,23 +10,23 @@
{% endif %} {% endif %}
<title>{{u.username}}'s profile - {{SITE_NAME}}</title> <title>{{u.username}}'s profile - {{SITE_NAME}}</title>
<meta property="og:article:author" content="@{{u.username}}" > <meta property="og:article:author" content="@{{u.username}}">
<meta property="article:section" content="{{u.username}}'s profile - {{SITE_NAME}}" > <meta property="article:section" content="{{u.username}}'s profile - {{SITE_NAME}}">
<meta property="article:published_time" content="{{u.created_date}}" > <meta property="article:published_time" content="{{u.created_date}}">
<meta property="og:description" name="description" content="{{u.coins}} coins - Joined {{u.created_date}} - {% if u.stored_subscriber_count >=1 and not u.is_private and not u.is_nofollow %}{{u.stored_subscriber_count}} Followers - {% endif %}{% if not u.is_private %} {{0 if u.shadowbanned else u.post_count}} Posts - {{0 if u.shadowbanned else u.comment_count}} Comments - {% endif %}{{u.bio}}"> <meta property="og:description" name="description" content="{{u.coins}} coins - Joined {{u.created_date}} - {% if u.stored_subscriber_count >=1 and not u.is_private and not u.is_nofollow %}{{u.stored_subscriber_count}} Followers - {% endif %}{% if not u.is_private %} {{0 if u.shadowbanned else u.post_count}} Posts - {{0 if u.shadowbanned else u.comment_count}} Comments - {% endif %}{{u.bio}}">
<meta property="og:author" name="author" content="@{{u.username}}" > <meta property="og:author" name="author" content="@{{u.username}}">
<meta property="og:title" content="{{u.username}}" > <meta property="og:title" content="{{u.username}}">
<meta property="og:image" content="{{u.banner_url}}" > <meta property="og:image" content="{{u.banner_url}}">
<meta property="og:url" content="{{u.url}}" > <meta property="og:url" content="{{u.url}}">
<meta property="og:site_name" content="{{request.host}}" > <meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{SITE_FULL}}/"> <meta name="twitter:site" content="{{SITE_FULL}}/">
<meta name="twitter:title" content="{{u.username}}'s profile - {{SITE_NAME}}" > <meta name="twitter:title" content="{{u.username}}'s profile - {{SITE_NAME}}">
<meta name="twitter:creator" content="@{{u.username}}"> <meta name="twitter:creator" content="@{{u.username}}">
<meta name="twitter:description" content="{{u.coins}} coins - Joined {{u.created_date}} - {% if u.stored_subscriber_count >=1 and not u.is_private and not u.is_nofollow %}{{u.stored_subscriber_count}} Followers -{% endif %} {% if not u.is_private %} {{0 if u.shadowbanned else u.post_count}} Posts - {{0 if u.shadowbanned else u.comment_count}} Comments - {% endif %}{{u.bio}}"> <meta name="twitter:description" content="{{u.coins}} coins - Joined {{u.created_date}} - {% if u.stored_subscriber_count >=1 and not u.is_private and not u.is_nofollow %}{{u.stored_subscriber_count}} Followers -{% endif %} {% if not u.is_private %} {{0 if u.shadowbanned else u.post_count}} Posts - {{0 if u.shadowbanned else u.comment_count}} Comments - {% endif %}{{u.bio}}">
<meta name="twitter:image" content="{{u.banner_url}}" > <meta name="twitter:image" content="{{u.banner_url}}">
<meta name="twitter:url" content="{{u.url}}" > <meta name="twitter:url" content="{{u.url}}">
{% endblock %} {% endblock %}
{% block desktopUserBanner %} {% block desktopUserBanner %}
@ -274,8 +274,8 @@
<form id="agendaposter1" class="{% if u.agendaposter %}d-none{% endif %}" action="/agendaposter/{{u.id}}" method="post"> <form id="agendaposter1" class="{% if u.agendaposter %}d-none{% endif %}" action="/agendaposter/{{u.id}}" method="post">
<input autocomplete="off" type="hidden" name="formkey", value="{{v.formkey}}"> <input autocomplete="off" type="hidden" name="formkey", value="{{v.formkey}}">
<input autocomplete="off" type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)" > <input autocomplete="off" type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)">
<input autocomplete="off" type="submit" class="btn btn-danger" value="Lock Chud Theme" > <input autocomplete="off" type="submit" class="btn btn-danger" value="Lock Chud Theme">
</form> </form>
<a id="unagendaposter" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/unagendaposter/{{u.id}}','agendaposter1','unagendaposter')">Disable Chud Theme</a> <a id="unagendaposter" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/unagendaposter/{{u.id}}','agendaposter1','unagendaposter')">Disable Chud Theme</a>
@ -582,8 +582,8 @@
<form id="agendaposter2" class="{% if u.agendaposter %}d-none{% endif %}" action="/agendaposter/{{u.id}}" method="post"> <form id="agendaposter2" class="{% if u.agendaposter %}d-none{% endif %}" action="/agendaposter/{{u.id}}" method="post">
<input autocomplete="off" type="hidden" name="formkey", value="{{v.formkey}}"> <input autocomplete="off" type="hidden" name="formkey", value="{{v.formkey}}">
<input autocomplete="off" type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)" > <input autocomplete="off" type="number" step="any" name="days" class="form-control" placeholder="Days (0 or blank = permanent)">
<input autocomplete="off" type="submit" class="btn btn-danger" value="Lock Chud Theme" > <input autocomplete="off" type="submit" class="btn btn-danger" value="Lock Chud Theme">
</form> </form>
<a id="unagendaposter2" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/unagendaposter/{{u.id}}','agendaposter2','unagendaposter2')">Disable Chud Theme</a> <a id="unagendaposter2" class="{% if not u.agendaposter %}d-none{% endif %} btn btn-success" role="button" onclick="post_toast2(this,'/unagendaposter/{{u.id}}','agendaposter2','unagendaposter2')">Disable Chud Theme</a>