blocks num

remotes/1693045480750635534/spooky-22
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 os import environ
from .sub_subscription import *
from .sub_block import *
SITE_NAME = environ.get("SITE_NAME", '').strip()
SITE = environ.get("DOMAIN", '').strip()
@ -21,6 +22,8 @@ class Sub(Base):
css = Column(String)
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):
return f"<Sub(name={self.name})>"
@ -40,4 +43,9 @@ class Sub(Base):
@property
@lazy
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>
<td><i class="{{a['icon']}} {{a['color']}}" style="font-size: 30px"></i></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>
{% endfor %}
</table>

View File

@ -14,13 +14,13 @@
<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>
<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>
<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">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="alts" name="alts">

View File

@ -769,7 +769,7 @@
{% endif %}
{% 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 %}
</ul>
</div>

View File

@ -63,22 +63,22 @@
{% block title %}
<title>{{SITE_NAME}}</title>
<meta property="og:type" content="article" >
<meta property="og:title" content="{{SITE_NAME}}" >
<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:type" content="article">
<meta property="og:title" content="{{SITE_NAME}}">
<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:url" content="{{SITE_FULL}}{{request.full_path}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:author" name="author" content="@{{SITE_FULL}}/" >
<meta property="og:site_name" content="{{request.host}}" >
<meta property="og:author" name="author" content="@{{SITE_FULL}}/">
<meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image">
<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:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}" >
<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:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<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}}">
{% endblock %}
<meta name="apple-mobile-web-app-capable" content="yes">

View File

@ -20,7 +20,7 @@
<tr>
<td>{{loop.index}}</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><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>
@ -30,7 +30,7 @@
<tr>
<td>{{loop.index}}</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>
</tr>
{% endfor %}

View File

@ -38,7 +38,7 @@
{% endif %}
{% 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">
{% 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>
@ -65,7 +65,7 @@
{% endif %}
{% 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 %}

View File

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

View File

@ -34,7 +34,7 @@
<div class="d-md-flex justify-content-between mb-3">
<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>
</div>
<div class="mt-auto">

View File

@ -397,7 +397,7 @@
<form action="/settings/song_change" method="post">
<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>
<div class="d-flex mt-2">
<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" 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="https://imgur.com/a/UFGJybS">PCM Watermark Collection</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="author" content="">
<meta property="og:type" content="article" >
<meta property="og:title" content="{{SITE_NAME}}" >
<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:type" content="article">
<meta property="og:title" content="{{SITE_NAME}}">
<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:url" content="{{request.host}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}/" >
<meta property="og:site_name" content="{{request.host}}" >
<meta property="og:author" name="author" content="{{SITE_FULL}}/">
<meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image">
<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:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}" >
<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:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:image" content="/static/assets/images/{{SITE_NAME}}/site_preview.webp?v=1013">
<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>
@ -91,7 +91,7 @@
<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"
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>

View File

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

View File

@ -23,7 +23,7 @@
<td>
{% 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">
<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 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>
@ -36,7 +36,7 @@
{% if v.mods(sub.name) %}
<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="btn btn-primary" style="margin-top:-5px" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add Mod">
</form>

View File

@ -14,8 +14,10 @@
<tr>
<th>#</th>
<th>Name</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(2)">Posts</th>
<th role="button" onclick="sort_table(3)">Subscribers</th>
<th role="button" onclick="sort_table(4)">Blockers</th>
</tr>
</thead>
{% 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>{{count}}</a>
<td>{{sub.subscription_num}}</td>
<td>{{sub.block_num}}</td>
</tr>
{% endfor %}
</table>

View File

@ -473,58 +473,58 @@
{% endif %}
<meta charset="utf-8" >
<meta property="og:type" content="article" >
<meta charset="utf-8">
<meta property="og:type" content="article">
{% 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>
<meta property="og:article:author" content="{{'@'+comment_info.author_name}}" >
<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 %}
<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: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:article:author" content="{{'@'+comment_info.author_name}}">
<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 %}
<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: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 %}">
{% if p.is_video %}
<meta property="og:video" content="{{p.realurl(v)}}" >
<meta property="og:video" content="{{p.realurl(v)}}">
{% endif %}
<meta property="og:url" content="{{comment_info.permalink}}" >
<meta property="og:site_name" content="{{request.host}}" >
<meta property="og:url" content="{{comment_info.permalink}}">
<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: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: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:url" content="{{p.permalink}}" >
<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:url" content="{{p.permalink}}">
{% else %}
<title>{{p.plaintitle(v)}} - {{SITE_NAME}}</title>
{% if p.author %}<meta property="og:article:author" content="{{'@'+p.author_name}}">{% endif %}
<meta property="article:published_time" content="{{p.created_datetime}}" >
{% if p.edited_utc %}<meta property="article:modified_time" content="{{p.edited_string}}" >{% endif %}
<meta property="og:description" name="description" content="{{p.plainbody(v)}}" >
{% 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: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="article:published_time" content="{{p.created_datetime}}">
{% if p.edited_utc %}<meta property="article:modified_time" content="{{p.edited_string}}">{% endif %}
<meta property="og:description" name="description" content="{{p.plainbody(v)}}">
{% 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: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 %}
<meta property="og:video" content="{{p.realurl(v)}}" >
<meta property="og:video" content="{{p.realurl(v)}}">
{% endif %}
<meta property="og:url" content="{{p.permalink}}" >
<meta property="og:site_name" content="{{request.host}}" >
<meta property="og:url" content="{{p.permalink}}">
<meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image">
<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 %}
<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:url" content="{{p.permalink}}" >
<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:url" content="{{p.permalink}}">
{% endif %}
{% endblock %}

View File

@ -10,23 +10,23 @@
{% endif %}
<title>{{u.username}}'s profile - {{SITE_NAME}}</title>
<meta property="og:article:author" content="@{{u.username}}" >
<meta property="article:section" content="{{u.username}}'s profile - {{SITE_NAME}}" >
<meta property="article:published_time" content="{{u.created_date}}" >
<meta property="og:article:author" content="@{{u.username}}">
<meta property="article:section" content="{{u.username}}'s profile - {{SITE_NAME}}">
<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:author" name="author" content="@{{u.username}}" >
<meta property="og:title" content="{{u.username}}" >
<meta property="og:image" content="{{u.banner_url}}" >
<meta property="og:url" content="{{u.url}}" >
<meta property="og:site_name" content="{{request.host}}" >
<meta property="og:author" name="author" content="@{{u.username}}">
<meta property="og:title" content="{{u.username}}">
<meta property="og:image" content="{{u.banner_url}}">
<meta property="og:url" content="{{u.url}}">
<meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image">
<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: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:url" content="{{u.url}}" >
<meta name="twitter:image" content="{{u.banner_url}}">
<meta name="twitter:url" content="{{u.url}}">
{% endblock %}
{% block desktopUserBanner %}
@ -274,8 +274,8 @@
<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="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="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">
</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>
@ -582,8 +582,8 @@
<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="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="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">
</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>