fix up tabs

pull/216/head
Aevann 2023-10-29 15:51:00 +03:00
parent aa2c90c893
commit a68dcfd5fe
103 changed files with 5909 additions and 5943 deletions

View File

@ -2,156 +2,155 @@
{% block pagetitle %}Admin Home{% endblock %}
{% block customPadding %}px-3{% endblock %}
{% block content %}
<h3 class="py-2">Admin Tools</h3>
<h3 class="py-2">Admin Tools</h3>
{% if v.admin_level >= PERMS['INSERT_TRANSACTION'] %}
<h4>Transactions</h4>
<ul>
<li><a href="/admin/insert_transaction">Insert Transaction</a></li>
</ul>
{%- endif %}
{% if v.admin_level >= PERMS['INSERT_TRANSACTION'] %}
<h4>Transactions</h4>
<ul>
<li><a href="/admin/insert_transaction">Insert Transaction</a></li>
</ul>
{%- endif %}
{% if v.admin_level >= PERMS['ORGIES'] %}
<h4>Orgies</h4>
<ul>
<li><a href="/admin/orgies">Schedule/Stop Orgy</a></li>
</ul>
{%- endif %}
{% if v.admin_level >= PERMS['ORGIES'] %}
<h4>Orgies</h4>
<ul>
<li><a href="/admin/orgies">Schedule/Stop Orgy</a></li>
</ul>
{%- endif %}
{% if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] and (SITE_NAME == 'rDrama' or SIDEBAR_THREAD or BANNER_THREAD or BADGE_THREAD or SNAPPY_THREAD) %}
<h4>Add Stuff</h4>
{% if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] and (SITE_NAME == 'rDrama' or SIDEBAR_THREAD or BANNER_THREAD or BADGE_THREAD or SNAPPY_THREAD) %}
<h4>Add Stuff</h4>
<ul>
{% if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] %}
{% if SIDEBAR_THREAD %}
<li><a href="/post/{{SIDEBAR_THREAD}}">Add Sidebar Images</a></li>
{% endif %}
{% if BANNER_THREAD %}
<li><a href="/post/{{BANNER_THREAD}}">Add Banners</a></li>
{% endif %}
{% if BADGE_THREAD %}
<li><a href="/post/{{BADGE_THREAD}}">Add Badges</a></li>
{% endif %}
{% if SNAPPY_THREAD %}
<li><a href="/post/{{SNAPPY_THREAD}}">Add Snappy Quotes</a></li>
{% endif %}
{% endif %}
{% if v.admin_level >= PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] %}
{% if FEATURES['EMOJI_SUBMISSIONS'] -%}
<li><a href="/submit/emojis">Approve or Reject Emojis</a></li>
{% endif %}
{% if FEATURES['HAT_SUBMISSIONS'] -%}
<li><a href="/submit/hats">Approve or Reject Hats</a></li>
{% endif %}
{% endif %}
{% if v.admin_level >= PERMS['UPDATE_ASSETS'] %}
<li><a href="/admin/update/emojis">Update Emojis</a></li>
<li><a href="/admin/update/hats">Update Hats</a></li>
{% endif %}
</ul>
{% endif %}
<h4>Content</h4>
<ul>
{% if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] %}
{% if SIDEBAR_THREAD %}
<li><a href="/post/{{SIDEBAR_THREAD}}">Add Sidebar Images</a></li>
{% endif %}
{% if BANNER_THREAD %}
<li><a href="/post/{{BANNER_THREAD}}">Add Banners</a></li>
{% endif %}
{% if BADGE_THREAD %}
<li><a href="/post/{{BADGE_THREAD}}">Add Badges</a></li>
{% endif %}
{% if SNAPPY_THREAD %}
<li><a href="/post/{{SNAPPY_THREAD}}">Add Snappy Quotes</a></li>
{% endif %}
{% if v.admin_level >= PERMS['ENABLE_DM_MEDIA'] %}
<li><a href="/admin/dm_media">DM Media</a></li>
{% endif %}
{% if v.admin_level >= PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] %}
{% if FEATURES['EMOJI_SUBMISSIONS'] -%}
<li><a href="/submit/emojis">Approve or Reject Emojis</a></li>
{% endif %}
{% if FEATURES['HAT_SUBMISSIONS'] -%}
<li><a href="/submit/hats">Approve or Reject Hats</a></li>
{% endif %}
{% endif %}
{% if v.admin_level >= PERMS['UPDATE_ASSETS'] %}
<li><a href="/admin/update/emojis">Update Emojis</a></li>
<li><a href="/admin/update/hats">Update Hats</a></li>
<li><a href="/log">Moderation Log</a></li>
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<li><a href="/admin/image_posts">Image Posts</a></li>
<li><a href="/admin/reported/posts">Reported Posts/Comments</a></li>
<li><a href="/admin/removed/posts">Removed Posts/Comments</a></li>
{% endif %}
</ul>
{% endif %}
<h4>Content</h4>
<ul>
{% if v.admin_level >= PERMS['ENABLE_DM_MEDIA'] %}
<li><a href="/admin/dm_media">DM Media</a></li>
{% endif %}
<li><a href="/log">Moderation Log</a></li>
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<li><a href="/admin/image_posts">Image Posts</a></li>
<li><a href="/admin/reported/posts">Reported Posts/Comments</a></li>
<li><a href="/admin/removed/posts">Removed Posts/Comments</a></li>
{% endif %}
</ul>
<h4>Users</h4>
<ul>
{% if v.can_see_shadowbanned %}
<li><a href="/admin/shadowbanned">Shadowbanned Users</a></li>
{% endif %}
<li><a href="/banned">Banned Users</a></li>
{% if FEATURES['AWARDS'] -%}
<li><a href="/chuds">Chudded Users</a></li>
<li><a href="/grassed">Currently Grassed Users</a></li>
{%- endif %}
{% if FEATURES['MARSEYBUX'] and v.admin_level >= PERMS['VIEW_PATRONS'] -%}
<li><a href="/admin/patrons">Patrons</a></li>
{%- endif %}
{% if v.admin_level >= PERMS['VIEW_ACTIVE_USERS'] %}
<li><a href="/admin/loggedin">Currently Logged-in Users</a></li>
<li><a href="/admin/loggedout">Currently Logged-out Users</a></li>
{% endif %}
</ul>
<h4>Safety</h4>
<ul>
{% if v.admin_level >= PERMS['DELETE_MEDIA'] %}
<li><a href="/admin/delete_media">Delete Media</a></li>
{% endif %}
{% if v.admin_level >= PERMS['DOMAINS_BAN'] %}
<li><a href="/admin/banned_domains">Banned Domains</a></li>
{% endif %}
{% if v.admin_level >= PERMS['USER_LINK'] %}
<li><a href="/admin/alts/">View and Link Alts</a></li>
{% endif %}
{% if v.admin_level >= PERMS['VIEW_ALT_VOTES'] %}
<li><a href="/admin/alt_votes">Alt Vote Analysis</a></li>
{% endif %}
</ul>
{% if FEATURES['BADGES'] and v.admin_level >= PERMS['USER_BADGES'] -%}
<h4>Badges</h4>
<ul>
<li><a href="/admin/badge_grant">Grant Badges</a></li>
<li><a href="/admin/badge_remove">Remove Badges</a></li>
</ul>
{%- endif %}
{% if FEATURES['GAMBLING'] and v.admin_level >= PERMS['LOTTERY_VIEW_PARTICIPANTS'] -%}
<h4>Casino</h4>
<ul>
<li><a href="/admin/lottery/participants">Participants</a></li>
</ul>
{%- endif %}
<h4>Statistics</h4>
<ul>
<li><a href="/stats">Content Stats</a></li>
<li><a href="/weekly_chart">Weekly Stat Chart</a></li>
<li><a href="/daily_chart">Daily Stat Chart</a></li>
</ul>
<h4>Configuration</h4>
<ul class="pb-3">
{% if v.admin_level >= PERMS['EDIT_RULES'] %}
<li><a href="/admin/edit_rules">Edit the Rules</a></li>
{%- endif %}
{% if PERMS['HOLE_CREATE'] and v.admin_level >= PERMS['HOLE_CREATE'] %}
<li><a href="/create_hole">Create Hole</a></li>
{% endif %}
{% if v.admin_level >= PERMS['APPS_MODERATION'] %}
<li><a href="/admin/apps">Apps</a></li>
{% endif %}
</ul>
{% if v.admin_level >= PERMS['SITE_SETTINGS'] %}
{% for setting in SITE_SETTINGS.keys() %}
{% if not (setting == "offline_mode" and v.admin_level < PERMS["SITE_OFFLINE_MODE"]) %}
<div class="custom-control custom-switch{% if loop.index > 1 %} mt-1{% endif %}" id="settings-{{setting}}-container">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="settings-{{setting}}-checkbox" {% if SITE_SETTINGS[setting] %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this, '/admin/site_settings/{{setting}}')" {% if setting == "under_attack" %}disabled{% endif %}>
<label class="custom-control-label" for="settings-{{setting}}-checkbox">{{setting.replace('_', ' ').title()}}</label>
</div>
<h4>Users</h4>
<ul>
{% if v.can_see_shadowbanned %}
<li><a href="/admin/shadowbanned">Shadowbanned Users</a></li>
{% endif %}
{% endfor %}
{% endif %}
<li><a href="/banned">Banned Users</a></li>
{% if FEATURES['AWARDS'] -%}
<li><a href="/chuds">Chudded Users</a></li>
<li><a href="/grassed">Currently Grassed Users</a></li>
{%- endif %}
{% if FEATURES['MARSEYBUX'] and v.admin_level >= PERMS['VIEW_PATRONS'] -%}
<li><a href="/admin/patrons">Patrons</a></li>
{%- endif %}
{% if v.admin_level >= PERMS['VIEW_ACTIVE_USERS'] %}
<li><a href="/admin/loggedin">Currently Logged-in Users</a></li>
<li><a href="/admin/loggedout">Currently Logged-out Users</a></li>
{% endif %}
</ul>
{% if v.admin_level >= PERMS['SITE_CACHE_PURGE_CDN'] %}
<button type="button" class="btn btn-primary" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/admin/clear_cloudflare_cache')" style="margin-bottom: 2em">CLEAR CLOUDFLARE CACHE</button>
{% endif %}
<h4>Safety</h4>
<ul>
{% if v.admin_level >= PERMS['DELETE_MEDIA'] %}
<li><a href="/admin/delete_media">Delete Media</a></li>
{% endif %}
{% if v.admin_level >= PERMS['DOMAINS_BAN'] %}
<li><a href="/admin/banned_domains">Banned Domains</a></li>
{% endif %}
{% if v.admin_level >= PERMS['USER_LINK'] %}
<li><a href="/admin/alts/">View and Link Alts</a></li>
{% endif %}
{% if v.admin_level >= PERMS['VIEW_ALT_VOTES'] %}
<li><a href="/admin/alt_votes">Alt Vote Analysis</a></li>
{% endif %}
</ul>
{% if v.admin_level >= PERMS['CLAIM_REWARDS_ALL_USERS'] %}
<button type="button" class="btn btn-primary d-block" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/admin/claim_rewards_all_users')" style="margin-bottom: 2em">CLAIM {{patron.upper()}} REWARDS FOR ALL USERS</button>
{% endif %}
{% if FEATURES['BADGES'] and v.admin_level >= PERMS['USER_BADGES'] -%}
<h4>Badges</h4>
<ul>
<li><a href="/admin/badge_grant">Grant Badges</a></li>
<li><a href="/admin/badge_remove">Remove Badges</a></li>
</ul>
{%- endif %}
{% if FEATURES['GAMBLING'] and v.admin_level >= PERMS['LOTTERY_VIEW_PARTICIPANTS'] -%}
<h4>Casino</h4>
<ul>
<li><a href="/admin/lottery/participants">Participants</a></li>
</ul>
{%- endif %}
<h4>Statistics</h4>
<ul>
<li><a href="/stats">Content Stats</a></li>
<li><a href="/weekly_chart">Weekly Stat Chart</a></li>
<li><a href="/daily_chart">Daily Stat Chart</a></li>
</ul>
<h4>Configuration</h4>
<ul class="pb-3">
{% if v.admin_level >= PERMS['EDIT_RULES'] %}
<li><a href="/admin/edit_rules">Edit the Rules</a></li>
{%- endif %}
{% if PERMS['HOLE_CREATE'] and v.admin_level >= PERMS['HOLE_CREATE'] %}
<li><a href="/create_hole">Create Hole</a></li>
{% endif %}
{% if v.admin_level >= PERMS['APPS_MODERATION'] %}
<li><a href="/admin/apps">Apps</a></li>
{% endif %}
</ul>
{% if v.admin_level >= PERMS['SITE_SETTINGS'] %}
{% for setting in SITE_SETTINGS.keys() %}
{% if not (setting == "offline_mode" and v.admin_level < PERMS["SITE_OFFLINE_MODE"]) %}
<div class="custom-control custom-switch{% if loop.index > 1 %} mt-1{% endif %}" id="settings-{{setting}}-container">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="settings-{{setting}}-checkbox" {% if SITE_SETTINGS[setting] %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this, '/admin/site_settings/{{setting}}')" {% if setting == "under_attack" %}disabled{% endif %}>
<label class="custom-control-label" for="settings-{{setting}}-checkbox">{{setting.replace('_', ' ').title()}}</label>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% if v.admin_level >= PERMS['SITE_CACHE_PURGE_CDN'] %}
<button type="button" class="btn btn-primary" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/admin/clear_cloudflare_cache')" style="margin-bottom: 2em">CLEAR CLOUDFLARE CACHE</button>
{% endif %}
{% if v.admin_level >= PERMS['CLAIM_REWARDS_ALL_USERS'] %}
<button type="button" class="btn btn-primary d-block" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/admin/claim_rewards_all_users')" style="margin-bottom: 2em">CLAIM {{patron.upper()}} REWARDS FOR ALL USERS</button>
{% endif %}
{% endblock %}

View File

@ -1,62 +1,62 @@
{% extends "default.html" %}
{% block pagetitle %}Alt Vote Analysis{% endblock %}
{% block content %}
<h5 class="mt-3">Vote Info</h5>
<h5 class="mt-3">Vote Info</h5>
<form method="get" class="mb-6">
<label for="link-input">Usernames</label>
<input autocomplete="off" id="link-input" type="text" class="form-control mb-2" name="u1" value="{{u1.username if u1 else ''}}" placeholder="User 1">
<input autocomplete="off" id="link-input" type="text" class="form-control mb-2" name="u2" value="{{u2.username if u2 else ''}}" placeholder="User 2">
<input type="submit" value="Submit" class="btn btn-primary">
</form>
<form method="get" class="mb-6">
<label for="link-input">Usernames</label>
<input autocomplete="off" id="link-input" type="text" class="form-control mb-2" name="u1" value="{{u1.username if u1 else ''}}" placeholder="User 1">
<input autocomplete="off" id="link-input" type="text" class="form-control mb-2" name="u2" value="{{u2.username if u2 else ''}}" placeholder="User 2">
<input type="submit" value="Submit" class="btn btn-primary">
</form>
{% if u1 and u2 %}
<h2>Analysis</h2>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th class="disable-sort-click"></th>
<th class="disable-sort-click">@{{u1.username}} only (% unique)</th>
<th class="disable-sort-click">Both</th>
<th class="disable-sort-click">@{{u2.username}} only (% unique)</th>
</tr>
</thead>
<tr>
<td><b>Post Upvotes</b></td>
<td>{{data['u1_only_post_ups']}} ({{data['u1_post_ups_unique']}}%)</td>
<td>{{data['both_post_ups']}}</td>
<td>{{data['u2_only_post_ups']}} ({{data['u2_post_ups_unique']}}%)</td>
</tr>
<tr>
<td><b>Post Downvotes</b></td>
<td>{{data['u1_only_post_downs']}} ({{data['u1_post_downs_unique']}}%)</td>
<td>{{data['both_post_downs']}}</td>
<td>{{data['u2_only_post_downs']}} ({{data['u2_post_downs_unique']}}%)</td>
</tr>
<tr>
<td><b>Comment Upvotes</b></td>
<td>{{data['u1_only_comment_ups']}} ({{data['u1_comment_ups_unique']}}%)</td>
<td>{{data['both_comment_ups']}}</td>
<td>{{data['u2_only_comment_ups']}} ({{data['u2_comment_ups_unique']}}%)</td>
</tr>
<tr>
<td><b>Comment Downvotes</b></td>
<td>{{data['u1_only_comment_downs']}} ({{data['u1_comment_downs_unique']}}%)</td>
<td>{{data['both_comment_downs']}}</td>
<td>{{data['u2_only_comment_downs']}} ({{data['u2_comment_downs_unique']}}%)</td>
</tr>
</table>
{% if v.admin_level >= PERMS['USER_LINK'] %}
<h2>Link Accounts</h2>
{% if u1 and u2 %}
<h2>Analysis</h2>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th class="disable-sort-click"></th>
<th class="disable-sort-click">@{{u1.username}} only (% unique)</th>
<th class="disable-sort-click">Both</th>
<th class="disable-sort-click">@{{u2.username}} only (% unique)</th>
</tr>
</thead>
<tr>
<td><b>Post Upvotes</b></td>
<td>{{data['u1_only_post_ups']}} ({{data['u1_post_ups_unique']}}%)</td>
<td>{{data['both_post_ups']}}</td>
<td>{{data['u2_only_post_ups']}} ({{data['u2_post_ups_unique']}}%)</td>
</tr>
<tr>
<td><b>Post Downvotes</b></td>
<td>{{data['u1_only_post_downs']}} ({{data['u1_post_downs_unique']}}%)</td>
<td>{{data['both_post_downs']}}</td>
<td>{{data['u2_only_post_downs']}} ({{data['u2_post_downs_unique']}}%)</td>
</tr>
<tr>
<td><b>Comment Upvotes</b></td>
<td>{{data['u1_only_comment_ups']}} ({{data['u1_comment_ups_unique']}}%)</td>
<td>{{data['both_comment_ups']}}</td>
<td>{{data['u2_only_comment_ups']}} ({{data['u2_comment_ups_unique']}}%)</td>
</tr>
<tr>
<td><b>Comment Downvotes</b></td>
<td>{{data['u1_only_comment_downs']}} ({{data['u1_comment_downs_unique']}}%)</td>
<td>{{data['both_comment_downs']}}</td>
<td>{{data['u2_only_comment_downs']}} ({{data['u2_comment_downs_unique']}}%)</td>
</tr>
</table>
{% if v.admin_level >= PERMS['USER_LINK'] %}
<h2>Link Accounts</h2>
{% if u2 in get_alt_graph(u1.id) %}
<p>Accounts are <a href="/@{{u1.username}}/alts">known alts</a> of each other.</p>
{% else %}
<p>Two accounts controlled by different people should have most uniqueness percentages at or above 70-80%</p>
<p>A sockpuppet account will have its uniqueness percentages significantly lower.</p>
{% if u2 in get_alt_graph(u1.id) %}
<p>Accounts are <a href="/@{{u1.username}}/alts">known alts</a> of each other.</p>
{% else %}
<p>Two accounts controlled by different people should have most uniqueness percentages at or above 70-80%</p>
<p>A sockpuppet account will have its uniqueness percentages significantly lower.</p>
<button class="btn btn-danger" data-areyousure="postToastReload(this,'/@{{u1.username}}/alts/?other_username={{u2.username}}')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">Link {{u1.username}} and {{u2.username}}</button>
<button class="btn btn-danger" data-areyousure="postToastReload(this,'/@{{u1.username}}/alts/?other_username={{u2.username}}')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">Link {{u1.username}} and {{u2.username}}</button>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endblock %}

View File

@ -1,60 +1,60 @@
{% extends "settings2.html" %}
{% block pagetitle %}Alts{% if u %} for @{{u.username}}{% endif %}{% endblock %}
{% block content %}
{% if u %}
<h5 class="mt-3">Alts for <a href="/@{{u.username}}">@{{u.username}}</a></h5>
{% else %}
<h5 class="mt-3">Alts</h5>
{% endif %}
<section class="username-input-section mb-3">
<form action="/admin/alts" method="get">
<label for="link-input">Username</label>
<input autocomplete="off" id="link-input" type="text" class="form-control mb-2" name="username" value="{{u.username if u else ''}}" placeholder="Username">
<input type="submit" value="Submit" class="btn btn-primary">
</form>
</section>
{% if u %}
{% set count=alts|length %}
<section class="userinfo-section">
<p><a href="/@{{u.username}}">@{{u.username}}</a> created their account {{u.created_utc|timestamp}} and has {{count}} known alt{{macros.plural(count)}}.<br>
They are {% if not u.is_permabanned %}not {% endif %}permanently banned{% if v.can_see_shadowbanned %} and they are {% if not u.shadowbanned %}not {% endif %}shadowbanned{% endif %}.</p>
</section>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th class="disable-sort-click">Account Created</th>
<th>Manual</th>
<th class="disable-sort-click">Actions</th>
</tr>
</thead>
{% for user in alts %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{user.created_utc|timestamp}}</td>
<td>{{user._is_manual}}</td>
<td>
<button type="button" id="delink-alt-{{u.id}}-{{user.id}}" class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="delink(this,'/@{{u.username}}/alts/{{user.id}}/deleted')">Delink</button>
<a class="btn btn-secondary" href="/@{{user.username}}/alts">Alts</a>
{% if v.admin_level >= PERMS['VIEW_ALT_VOTES'] %}
<a class="btn btn-secondary" href="/admin/alt_votes/?u1={{u.username}}&u2={{user.username}}">Alt Votes</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
<section id="add-alt" class="rounded rounded-section p-3">
<h5>Add Alt</h5>
<p>This tool allows you to link an alt.</p>
<label for="link-input-other">Other Username</label>
<input autocomplete="off" id="link-input-other" type="text" class="form-control mb-2" name="other_username" placeholder="Other Username">
<button id="add-alt-form-link" class="btn btn-danger mr-3" data-areyousure="submitAddAlt(this, '{{u.username}}')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">Add Alt</button>
</section>
{% endif %}
{% if u %}
<h5 class="mt-3">Alts for <a href="/@{{u.username}}">@{{u.username}}</a></h5>
{% else %}
<h5 class="mt-3">Alts</h5>
{% endif %}
<section class="username-input-section mb-3">
<form action="/admin/alts" method="get">
<label for="link-input">Username</label>
<input autocomplete="off" id="link-input" type="text" class="form-control mb-2" name="username" value="{{u.username if u else ''}}" placeholder="Username">
<input type="submit" value="Submit" class="btn btn-primary">
</form>
</section>
{% if u %}
{% set count=alts|length %}
<section class="userinfo-section">
<p><a href="/@{{u.username}}">@{{u.username}}</a> created their account {{u.created_utc|timestamp}} and has {{count}} known alt{{macros.plural(count)}}.<br>
They are {% if not u.is_permabanned %}not {% endif %}permanently banned{% if v.can_see_shadowbanned %} and they are {% if not u.shadowbanned %}not {% endif %}shadowbanned{% endif %}.</p>
</section>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th class="disable-sort-click">Account Created</th>
<th>Manual</th>
<th class="disable-sort-click">Actions</th>
</tr>
</thead>
{% for user in alts %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{user.created_utc|timestamp}}</td>
<td>{{user._is_manual}}</td>
<td>
<button type="button" id="delink-alt-{{u.id}}-{{user.id}}" class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="delink(this,'/@{{u.username}}/alts/{{user.id}}/deleted')">Delink</button>
<a class="btn btn-secondary" href="/@{{user.username}}/alts">Alts</a>
{% if v.admin_level >= PERMS['VIEW_ALT_VOTES'] %}
<a class="btn btn-secondary" href="/admin/alt_votes/?u1={{u.username}}&u2={{user.username}}">Alt Votes</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
<section id="add-alt" class="rounded rounded-section p-3">
<h5>Add Alt</h5>
<p>This tool allows you to link an alt.</p>
<label for="link-input-other">Other Username</label>
<input autocomplete="off" id="link-input-other" type="text" class="form-control mb-2" name="other_username" placeholder="Other Username">
<button id="add-alt-form-link" class="btn btn-danger mr-3" data-areyousure="submitAddAlt(this, '{{u.username}}')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">Add Alt</button>
</section>
{% endif %}
<script defer src="{{'js/admin/alts.js' | asset}}"></script>
<script defer src="{{'js/admin/alts.js' | asset}}"></script>
{% endblock %}

View File

@ -1,50 +1,49 @@
{% extends "default.html" %}
{% block pagetitle %}API App Administration{% endblock %}
{% block content %}
<div class="row">
<div class="col col-lg-8">
<div class="settings">
{% for app in apps %}
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label><a href="{{app.permalink}}/posts" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>{{app.app_name}}</a></label>
<div class="row">
<div class="col col-lg-8">
<div class="settings">
{% for app in apps %}
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label><a href="{{app.permalink}}/posts" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>{{app.app_name}}</a></label>
</div>
<div class="body w-lg-100">
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>
<input autocomplete="off" id="edit-{{app.id}}-author" class="form-control" type="text" name="name" value="{{app.author.username}}" readonly=readonly>
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<input autocomplete="off" id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}" readonly=readonly>
{% if app.client_id %}
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
<input autocomplete="off" id="edit-{{app.id}}-client-id" class="form-control" type="text" name="name" value="{{app.client_id}}" readonly="readonly">
{% endif %}
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<input autocomplete="off" id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}" readonly="readonly">
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<textarea rows="10" autocomplete="off" form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256" readonly="readonly">{{app.description}}</textarea>
</div>
</div>
<div class="body w-lg-100">
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>
<input autocomplete="off" id="edit-{{app.id}}-author" class="form-control" type="text" name="name" value="{{app.author.username}}" readonly=readonly>
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<input autocomplete="off" id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}" readonly=readonly>
{% if app.client_id %}
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
<input autocomplete="off" id="edit-{{app.id}}-client-id" class="form-control" type="text" name="name" value="{{app.client_id}}" readonly="readonly">
{% endif %}
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<input autocomplete="off" id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}" readonly="readonly">
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<textarea rows="10" autocomplete="off" form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256" readonly="readonly">{{app.description}}</textarea>
<div class="footer">
<div class="d-flex">
{% if not app.client_id %}
<button type="button" class="btn btn-primary ml-auto mr-2" data-nonce="{{g.nonce}}" data-onclick="remove_app(this,'/admin/app/approve/{{app.id}}')">Approve</button>
<button type="button" class="btn btn-secondary mr-0" data-nonce="{{g.nonce}}" data-onclick="remove_app(this,'/admin/app/reject/{{app.id}}')">Reject</button>
{% else %}
<button type="button" class="btn btn-primary ml-auto" data-nonce="{{g.nonce}}" data-onclick="remove_app(this,'/admin/app/revoke/{{app.id}}')">Revoke</button>
{% endif %}
</div>
</div>
</div>
<div class="footer">
<div class="d-flex">
{% if not app.client_id %}
<button type="button" class="btn btn-primary ml-auto mr-2" data-nonce="{{g.nonce}}" data-onclick="remove_app(this,'/admin/app/approve/{{app.id}}')">Approve</button>
<button type="button" class="btn btn-secondary mr-0" data-nonce="{{g.nonce}}" data-onclick="remove_app(this,'/admin/app/reject/{{app.id}}')">Reject</button>
{% else %}
<button type="button" class="btn btn-primary ml-auto" data-nonce="{{g.nonce}}" data-onclick="remove_app(this,'/admin/app/revoke/{{app.id}}')">Revoke</button>
{% endif %}
</div>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
</div>
</div>
</div>
<script defer src="{{'js/admin/apps.js' | asset}}"></script>
<script defer src="{{'js/admin/apps.js' | asset}}"></script>
{% endblock %}

View File

@ -2,55 +2,56 @@
{% block pagetitle %}{{"Badge Grant" if grant else "Badge Remove"}}{% endblock %}
{% block pagetype %}message{% endblock %}
{% block content %}
<link rel="stylesheet" href="{{('css/admin/badges.css') | asset}}">
<link rel="stylesheet" href="{{('css/admin/badges.css') | asset}}">
{% set form_action = "/admin/badge_grant" if grant else "/admin/badge_remove" %}
{% set form_action = "/admin/badge_grant" if grant else "/admin/badge_remove" %}
<form action="{{form_action}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<form action="{{form_action}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<div class="overflow-x-auto mt-4"><table class="table table-striped">
<thead class="bg-primary text-white">
<tr>
<th>Select</th>
<th>Image</th>
<th>Name</th>
<th>Default Description</th>
</tr>
</thead>
<tbody>
{% for badge in badge_types %}
<tr>
<td>
<div class="custom-control">
<input autocomplete="off" class="custom-control-input" type="radio" id="{{badge.id}}" name="badge_id" value="{{badge.id}}" required>
<label class="custom-control-label" for="{{badge.id}}"></label>
<div class="overflow-x-auto mt-4">
<table class="table table-striped">
<thead class="bg-primary text-white">
<tr>
<th>Select</th>
<th>Image</th>
<th>Name</th>
<th>Default Description</th>
</tr>
</thead>
<tbody>
{% for badge in badge_types %}
<tr>
<td>
<div class="custom-control">
<input autocomplete="off" class="custom-control-input" type="radio" id="{{badge.id}}" name="badge_id" value="{{badge.id}}" required>
<label class="custom-control-label" for="{{badge.id}}"></label>
</div>
</td>
<td>
<label for="badge-{{badge.id}}">
<img class="contain" alt="{{badge.name}}" loading="lazy" src="{{badge.path}}" width=64.16 height=70>
</label>
</td>
<td>{{badge.name}}</td>
<td>{{badge.description}}</td>
</tr>
{% endfor %}
</table>
</div>
</td>
<td>
<label for="badge-{{badge.id}}">
<img class="contain" alt="{{badge.name}}" loading="lazy" src="{{badge.path}}" width=64.16 height=70>
</label>
</td>
<td>{{badge.name}}</td>
<td>{{badge.description}}</td>
</tr>
{% endfor %}
</table>
<label for="input-usernames">Usernames (separated with a space)</label>
{% set usernames = request.values.get('usernames') %}
<input autocomplete="off" id="input-usernames" class="form-control" type="text" name="usernames" placeholder="Required (separated by space)" {% if usernames %}value="{{usernames}}"{% endif %} required>
{% if grant %}
<label class="mt-2" for="input-url">URL</label>
<input autocomplete="off" id="input-url" class="form-control" type="text" name="url" type="url" placeholder="Optional">
<label for="input-usernames">Usernames (separated with a space)</label>
{% set usernames = request.values.get('usernames') %}
<input autocomplete="off" id="input-usernames" class="form-control" type="text" name="usernames" placeholder="Required (separated by space)" {% if usernames %}value="{{usernames}}"{% endif %} required>
<label class="mt-2" for="input-description">Custom description</label>
<input autocomplete="off" id="input-description" class="form-control" type="text" name="description" placeholder="Optional except for specific badges">
{% endif %}
<input autocomplete="off" class="btn btn-primary mt-3" type="submit">
{% if grant %}
<label class="mt-2" for="input-url">URL</label>
<input autocomplete="off" id="input-url" class="form-control" type="text" name="url" type="url" placeholder="Optional">
</form>
<label class="mt-2" for="input-description">Custom description</label>
<input autocomplete="off" id="input-description" class="form-control" type="text" name="description" placeholder="Optional except for specific badges">
{% endif %}
<input autocomplete="off" class="btn btn-primary mt-3" type="submit">
</form>
{% endblock %}

View File

@ -2,39 +2,37 @@
{% block pagetitle %}Banned Domains{% endblock %}
{% block content %}
<script defer src="{{'js/admin/banned_domains.js' | asset}}"></script>
<script defer src="{{'js/admin/banned_domains.js' | asset}}"></script>
<div class="overflow-x-auto mt-2">
<table class="table table-striped mb-5" id="domains-table">
<thead class="bg-primary text-white">
<tr>
<th>Domain</th>
<th>Ban reason</th>
<th class="disable-sort-click"></th>
</tr>
</thead>
<tbody>
{% for domain in banned_domains %}
<div class="overflow-x-auto mt-2">
<table class="table table-striped mb-5" id="domains-table">
<thead class="bg-primary text-white">
<tr>
<td>{{domain.domain}}</td>
<td>{{domain.reason}}</td>
<td>
<button type="button" class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="unbanDomain(this, '{{domain.domain}}')">Unban</button>
</td>
<th>Domain</th>
<th>Ban reason</th>
<th class="disable-sort-click"></th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for domain in banned_domains %}
<tr>
<td>{{domain.domain}}</td>
<td>{{domain.reason}}</td>
<td>
<button type="button" class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="unbanDomain(this, '{{domain.domain}}')">Unban</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<form action="/admin/ban_domain" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input autocomplete="off" name="domain" placeholder="Enter domain here.." class="form-control" required>
<input autocomplete="off" name="reason" placeholder="Enter ban reason here.." data-nonce="{{g.nonce}}" data-undisable_element="ban-submit" class="form-control mt-2">
<input autocomplete="off" id="ban-submit" type="submit" class="btn btn-primary mt-2" value="Ban domain" disabled>
</form>
</div>
<form action="/admin/ban_domain" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input autocomplete="off" name="domain" placeholder="Enter domain here.." class="form-control" required>
<input autocomplete="off" name="reason" placeholder="Enter ban reason here.." data-nonce="{{g.nonce}}" data-undisable_element="ban-submit" class="form-control mt-2">
<input autocomplete="off" id="ban-submit" type="submit" class="btn btn-primary mt-2" value="Ban domain" disabled>
</form>
</div>
{% endblock %}

View File

@ -3,24 +3,24 @@
{% block pagetitle %}Delete Media{% endblock %}
{% block content %}
<form class="mt-3" action="/admin/delete_media" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="container">
<div class="row justify-content-center mb-4 pb-6">
<div class="col col-md-6 p-3 py-md-0">
<h1 class="d-mob-none">Delete Media</h1>
<h3 class=" d-md-none">Delete Media</h3>
<div class="body">
<input hidden name="formkey" value="{{v|formkey}}">
<label>URL</label>
<input class="form-control" type="url" name="url" required {% if url %}value="{{url}}"{% endif %}>
<div class="footer">
<div class="d-flex">
<button type="submit" class="btn btn-primary ml-auto">Delete</button>
<form class="mt-3" action="/admin/delete_media" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="container">
<div class="row justify-content-center mb-4 pb-6">
<div class="col col-md-6 p-3 py-md-0">
<h1 class="d-mob-none">Delete Media</h1>
<h3 class=" d-md-none">Delete Media</h3>
<div class="body">
<input hidden name="formkey" value="{{v|formkey}}">
<label>URL</label>
<input class="form-control" type="url" name="url" required {% if url %}value="{{url}}"{% endif %}>
<div class="footer">
<div class="d-flex">
<button type="submit" class="btn btn-primary ml-auto">Delete</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</form>
{% endblock %}

View File

@ -1,63 +1,63 @@
{% extends "default.html" %}
{% block pagetitle %}DM Media{% endblock %}
{% block content %}
<h2>DM Media</h2>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Image</th>
<th>Sender</th>
<th>Sent To</th>
<th>At</th>
</tr>
</thead>
<h2>DM Media</h2>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Image</th>
<th>Sender</th>
<th>Sent To</th>
<th>At</th>
</tr>
</thead>
{% for item in items %}
<tr>
<td>
{% set url=item[0] %}
{% if url.endswith('.webp') %}
<img alt="{{url}}" src="{{url}}" loading="lazy" class="dm_img" data-nonce="{{g.nonce}}" data-onclick="expandImage()">
{% elif url.endswith('.mp4') %}
<p class="resizable">
<video controls preload="none" src="{{url}}"></video>
</p>
{% elif url.endswith('.mp3') %}
<audio controls preload="none" src="{{url}}"></audio>
{% else %}
<a href="{{url}}">
{{url}}
</a>
{% endif %}
</td>
<td>
{% if item[1] != "Unknown" %}
<a href="/id/{{item[2]}}">
<img loading="lazy" src="/pp/{{item[2]}}">
@{{item[1]}}
</a>
{% endif %}
</td>
<td>
{% if item[1] != "Unknown" %}
{% if item[3] == "Modmail" %}
Modmail
{% for item in items %}
<tr>
<td>
{% set url=item[0] %}
{% if url.endswith('.webp') %}
<img alt="{{url}}" src="{{url}}" loading="lazy" class="dm_img" data-nonce="{{g.nonce}}" data-onclick="expandImage()">
{% elif url.endswith('.mp4') %}
<p class="resizable">
<video controls preload="none" src="{{url}}"></video>
</p>
{% elif url.endswith('.mp3') %}
<audio controls preload="none" src="{{url}}"></audio>
{% else %}
<a href="/id/{{item[4]}}">
<img loading="lazy" src="/pp/{{item[4]}}">
@{{item[3]}}
<a href="{{url}}">
{{url}}
</a>
{% endif %}
{% endif %}
</td>
<td {% if item[5] %}data-time="{{item[5]}}"{% endif %}></td>
</tr>
{% endfor %}
</table>
</div>
</td>
<td>
{% if item[1] != "Unknown" %}
<a href="/id/{{item[2]}}">
<img loading="lazy" src="/pp/{{item[2]}}">
@{{item[1]}}
</a>
{% endif %}
</td>
<td>
{% if item[1] != "Unknown" %}
{% if item[3] == "Modmail" %}
Modmail
{% else %}
<a href="/id/{{item[4]}}">
<img loading="lazy" src="/pp/{{item[4]}}">
@{{item[3]}}
</a>
{% endif %}
{% endif %}
</td>
<td {% if item[5] %}data-time="{{item[5]}}"{% endif %}></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -3,26 +3,26 @@
{% block pagetitle %}Edit {{SITE_NAME}}'s rules{% endblock %}
{% block content %}
<div class="row my-5">
<div class="col">
<div class="settings mx-3">
<div id="description">
<h2>Edit the Rules</h2>
<br>
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="edit_rules" action="/admin/edit_rules" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" maxlength="10000" class="form-control rounded" placeholder="Enter rules here..." rows="50" name="rules" form="edit_rules">{% if rules %}{{rules}}{% endif %}</textarea>
<div class="row my-5">
<div class="col">
<div class="settings mx-3">
<div id="description">
<h2>Edit the Rules</h2>
<br>
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="edit_rules" action="/admin/edit_rules" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" maxlength="10000" class="form-control rounded" placeholder="Enter rules here..." rows="50" name="rules" form="edit_rules">{% if rules %}{{rules}}{% endif %}</textarea>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -5,17 +5,17 @@
{% block mobileUserBanner %}{% endblock %}
{% block pagetitle %}Image feed{% endblock %}
{% block content %}
<div class="row no-gutters">
<div class="col">
{% block listing %}
<div class="posts">
{% include "post_listing.html" %}
<div class="row no-gutters">
<div class="col">
{% block listing %}
<div class="posts">
{% include "post_listing.html" %}
</div>
{% endblock %}
</div>
{% endblock %}
</div>
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -1,21 +1,22 @@
{% extends "settings2.html" %}
{% block pagetitle %}Logged In Users{% endblock %}
{% block content %}
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Truescore</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{"{:,}".format(user.truescore)}}</td>
</tr>
{% endfor %}
</table>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Truescore</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{"{:,}".format(user.truescore)}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -1,19 +1,20 @@
{% extends "settings2.html" %}
{% block pagetitle %}Logged Out Users{% endblock %}
{% block content %}
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Details</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{{user}}</td>
</tr>
{% endfor %}
</table>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Details</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{{user}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -1,21 +1,23 @@
{% extends "default.html" %}
{% block pagetitle %}Lottery Participants{% endblock %}
{% block content %}
<h5 class="my-1">Admin — Lottery Participants</h5>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Tickets Held</th>
</tr>
</thead>
{% for user in participants %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{user.currently_held_lottery_tickets}}</td>
</tr>
{% endfor %}
</table>
<h5 class="my-1">Admin — Lottery Participants</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Tickets Held</th>
</tr>
</thead>
{% for user in participants %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{user.currently_held_lottery_tickets}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -3,82 +3,82 @@
{% block pagetitle %}Orgy Control Panel{% endblock %}
{% block content %}
<div class="row my-5">
<div class="col">
<div class="settings mx-3">
<div id="description">
<h2>Orgy Control Panel</h2>
<span class="text-lg">Guide <a rel="nofollow noopener" href="https://rdrama.net/@HeyMoonster/wall/comment/5163373#context">here</a></span>
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="orgy" action="/admin/schedule_orgy" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<div class="d-lg-flex border-bottom mt-5">
<div class="title w-lg-25">
<label for="title">Title</label>
<div class="row my-5">
<div class="col">
<div class="settings mx-3">
<div id="description">
<h2>Orgy Control Panel</h2>
<span class="text-lg">Guide <a rel="nofollow noopener" href="https://rdrama.net/@HeyMoonster/wall/comment/5163373#context">here</a></span>
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="orgy" action="/admin/schedule_orgy" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<div class="d-lg-flex border-bottom mt-5">
<div class="title w-lg-25">
<label for="title">Title</label>
</div>
<div class="body w-lg-100">
<input id="title" autocomplete="off" type="text" name="title" class="form-control" placeholder="Required">
</div>
</div>
<div class="body w-lg-100">
<input id="title" autocomplete="off" type="text" name="title" class="form-control" placeholder="Required">
<div class="d-lg-flex border-bottom mt-3">
<div class="title w-lg-25">
<label for="link">Link (youtube, twitch, rumble, mp4 file)</label>
</div>
<div class="body w-lg-100">
<input id="link" autocomplete="off" type="text" name="link" class="form-control" placeholder="Required">
</div>
</div>
</div>
<div class="d-lg-flex border-bottom mt-3">
<div class="title w-lg-25">
<label for="link">Link (youtube, twitch, rumble, mp4 file)</label>
<div class="d-lg-flex border-bottom mt-3">
<div class="title w-lg-25">
<label for="start_utc">Start time (as an <a rel="nofollow noopener" href="https://epochconverter.com">epoch timestamp</a>)</label>
</div>
<div class="body w-lg-100">
<input id="start_utc" autocomplete="off" type="number" step="any" name="start_utc" max="2147483647" class="form-control" placeholder="Optional. Leave blank to start orgy now.">
</div>
</div>
<div class="body w-lg-100">
<input id="link" autocomplete="off" type="text" name="link" class="form-control" placeholder="Required">
<input hidden name="formkey" value="{{v|formkey}}">
<div class="d-flex mt-3">
<input id="start-orgy" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Schedule Orgy">
</div>
</div>
<div class="d-lg-flex border-bottom mt-3">
<div class="title w-lg-25">
<label for="start_utc">Start time (as an <a rel="nofollow noopener" href="https://epochconverter.com">epoch timestamp</a>)</label>
</div>
<div class="body w-lg-100">
<input id="start_utc" autocomplete="off" type="number" step="any" name="start_utc" max="2147483647" class="form-control" placeholder="Optional. Leave blank to start orgy now.">
</div>
</div>
<input hidden name="formkey" value="{{v|formkey}}">
<div class="d-flex mt-3">
<input id="start-orgy" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Schedule Orgy">
</div>
</form>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="overflow-x-auto mt-3">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Type</th>
<th>Title</th>
<th>Link</th>
<th>Starts on</th>
<th>Ends on</th>
<th class="disable-sort-click"></th>
</tr>
</thead>
<div class="overflow-x-auto mt-3">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Type</th>
<th>Title</th>
<th>Link</th>
<th>Starts on</th>
<th>Ends on</th>
<th class="disable-sort-click"></th>
</tr>
</thead>
{% for orgy in orgies %}
<tr>
<td>{{orgy.type}}</td>
<td>{{orgy.title}}</td>
<td>{{orgy.data}}</td>
{% if orgy.started %}
<td>Started</td>
{% else %}
<td data-time="{{orgy.start_utc}}"></td>
{% endif %}
<td {% if orgy.end_utc %}data-time="{{orgy.end_utc}}"{% endif %}></td>
<td>
<button type="button" class="btn btn-danger btn-block" data-nonce="{{g.nonce}}" data-areyousure="remove_orgy(this, {{orgy.created_utc}})" data-onclick="areyousure(this)">Remove</button>
</td>
</tr>
{% endfor %}
</table>
</div>
{% for orgy in orgies %}
<tr>
<td>{{orgy.type}}</td>
<td>{{orgy.title}}</td>
<td>{{orgy.data}}</td>
{% if orgy.started %}
<td>Started</td>
{% else %}
<td data-time="{{orgy.start_utc}}"></td>
{% endif %}
<td {% if orgy.end_utc %}data-time="{{orgy.end_utc}}"{% endif %}></td>
<td>
<button type="button" class="btn btn-danger btn-block" data-nonce="{{g.nonce}}" data-areyousure="remove_orgy(this, {{orgy.created_utc}})" data-onclick="areyousure(this)">Remove</button>
</td>
</tr>
{% endfor %}
</table>
</div>
<script defer src="{{'js/admin/orgies.js' | asset}}"></script>
<script defer src="{{'js/admin/orgies.js' | asset}}"></script>
{% endblock %}

View File

@ -1,29 +1,30 @@
{% extends "settings2.html" %}
{% block pagetitle %}Patrons{% endblock %}
{% block content %}
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Tier</th>
<th>Lifetime Donated</th>
<th>Truescore</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td data-sort-key="{{user.patrons}}">
{% if user.patron > 1 %}
<img class="contain" alt="2{{user.patron}}" loading="lazy" width=29.33 height=32 src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{user.patron}}.webp?b=11" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{user.patron_tooltip}}">
{% endif %}
</td>
<td data-sort-key="{{user.lifetimedonated}}">${{user.lifetimedonated}}</td>
<td>{{user.truescore}}</td>
</tr>
{% endfor %}
</table>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Tier</th>
<th>Lifetime Donated</th>
<th>Truescore</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td data-sort-key="{{user.patrons}}">
{% if user.patron > 1 %}
<img class="contain" alt="2{{user.patron}}" loading="lazy" width=29.33 height=32 src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{user.patron}}.webp?b=11" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{user.patron_tooltip}}">
{% endif %}
</td>
<td data-sort-key="{{user.lifetimedonated}}">${{user.lifetimedonated}}</td>
<td>{{user.truescore}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -5,28 +5,28 @@
{% block mobileUserBanner %}{% endblock %}
{% block pagetitle %}Removed Posts{% endblock %}
{% block content %}
<ul class="nav post-nav py-2">
<li class="nav-item">
<a class="nav-link {% if request.path=="/admin/removed/posts" %} active{% endif %}" href="/admin/removed/posts">
<div>Posts</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.path=="/admin/removed/comments" %} active{% endif %}" href="/admin/removed/comments">
<div>Comments</div>
</a>
</li>
</ul>
<div class="row no-gutters">
<div class="col">
{% block listing %}
<div class="posts">
{% include "post_listing.html" %}
<ul class="nav post-nav py-2">
<li class="nav-item">
<a class="nav-link {% if request.path=="/admin/removed/posts" %} active{% endif %}" href="/admin/removed/posts">
<div>Posts</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.path=="/admin/removed/comments" %} active{% endif %}" href="/admin/removed/comments">
<div>Comments</div>
</a>
</li>
</ul>
<div class="row no-gutters">
<div class="col">
{% block listing %}
<div class="posts">
{% include "post_listing.html" %}
</div>
{% endblock %}
</div>
{% endblock %}
</div>
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -5,30 +5,30 @@
{% block mobileUserBanner %}{% endblock %}
{% block pagetitle %}Reported Posts{% endblock %}
{% block content %}
<ul class="nav post-nav py-2">
<li class="nav-item">
<a class="nav-link {% if request.path=="/admin/reported/posts" %} active{% endif %}" href="/admin/reported/posts">
<div>Posts</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.path=="/admin/reported/comments" %} active{% endif %}" href="/admin/reported/comments">
<div>Comments</div>
</a>
</li>
</ul>
<ul class="nav post-nav py-2">
<li class="nav-item">
<a class="nav-link {% if request.path=="/admin/reported/posts" %} active{% endif %}" href="/admin/reported/posts">
<div>Posts</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.path=="/admin/reported/comments" %} active{% endif %}" href="/admin/reported/comments">
<div>Comments</div>
</a>
</li>
</ul>
<div class="row no-gutters">
<div class="col">
{% block listing %}
<div class="posts">
{% include "post_listing.html" %}
<div class="row no-gutters">
<div class="col">
{% block listing %}
<div class="posts">
{% include "post_listing.html" %}
</div>
{% endblock %}
</div>
{% endblock %}
</div>
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -1,32 +1,29 @@
{% extends "settings2.html" %}
{% block pagetitle %}Shadowbanned Users{% endblock %}
{% block content %}
<h5 class="my-4">Shadowbanned Users</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Last Active</th>
<th>Truescore</th>
<th>Shadowbanned by</th>
<th>Shadowban reason</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td data-sort-key="{{user.username.lower() if user else ''}}">{%- include 'user_in_table.html' -%}</td>
<td {% if user.last_active %}data-time="{{user.last_active}}"{% endif %}></td>
<td>{{user.truescore}}</td>
<td><a href="/@{{user.shadowbanner}}">{{user.shadowbanner}}</a></td>
<td>{{user.ban_reason | safe}}</td>
</tr>
{% endfor %}
</table>
<h5 class="my-4">Shadowbanned Users</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Last Active</th>
<th>Truescore</th>
<th>Shadowbanned by</th>
<th>Shadowban reason</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td data-sort-key="{{user.username.lower() if user else ''}}">{%- include 'user_in_table.html' -%}</td>
<td {% if user.last_active %}data-time="{{user.last_active}}"{% endif %}></td>
<td>{{user.truescore}}</td>
<td><a href="/@{{user.shadowbanner}}">{{user.shadowbanner}}</a></td>
<td>{{user.ban_reason | safe}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -3,32 +3,28 @@
{% block pagetitle %}Admins{% endblock %}
{% block content %}
<h5 class="font-weight-bolder text-center pt-2 pb-3"><span>Admins</span></h5>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Admin Level</th>
<th>Truescore</th>
<th>Mod actions</th>
</tr>
</thead>
<h5 class="font-weight-bolder text-center pt-2 pb-3"><span>Admins</span></h5>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Admin Level</th>
<th>Truescore</th>
<th>Mod actions</th>
</tr>
</thead>
{% for user in admins %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{user.admin_level}}</td>
<td>{{"{:,}".format(user.truescore)}}</td>
<td><a href="/log?admin={{user.username}}">{{"{:,}".format(user.modaction_num)}}</a></td>
</tr>
{% endfor %}
</table>
</div>
{% for user in admins %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{user.admin_level}}</td>
<td>{{"{:,}".format(user.truescore)}}</td>
<td><a href="/log?admin={{user.username}}">{{"{:,}".format(user.modaction_num)}}</a></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -2,97 +2,97 @@
{% block pagetitle %}API{% endblock %}
{% block content %}
<h1 class="my-3">API Guide for Bots</h1>
<p>This page explains how to obtain and use an access token. </p>
<h4>Step 1: Create your Application</h4>
<p>In the <a href="/settings/apps">apps tab of {{SITE_NAME}} settings</a>, fill in and submit the form to request an access token. You will need:</p>
<ul>
<li>an application name</li>
<li>a Redirect URI. May not use HTTP unless using localhost (use HTTPS instead).</li>
<li>a brief description of what your bot is intended to do</li>
</ul>
<p>Don't worry too much about accuracy; you will be able to change all of these later.</p>
<p>{{SITE_NAME}} administrators will review and approve or deny your request for an access token. You'll know when your request has been approved when you get a private message with an access token tied to your account.</p>
<p>DO NOT reveal your Client ID or Access Token. Anyone with these information will be able to pretend to be you. You are responsible for keeping them a secret!</p>
<h4>Step 2: Using the Access Token</h4>
<p>To use the access token, include the following header in subsequent API requests to {{SITE_NAME}}: <code>Authorization: access_token_goes_here</code></p>
<p>Python example:</p>
<pre> import requests
<h1 class="my-3">API Guide for Bots</h1>
<p>This page explains how to obtain and use an access token. </p>
<h4>Step 1: Create your Application</h4>
<p>In the <a href="/settings/apps">apps tab of {{SITE_NAME}} settings</a>, fill in and submit the form to request an access token. You will need:</p>
<ul>
<li>an application name</li>
<li>a Redirect URI. May not use HTTP unless using localhost (use HTTPS instead).</li>
<li>a brief description of what your bot is intended to do</li>
</ul>
<p>Don't worry too much about accuracy; you will be able to change all of these later.</p>
<p>{{SITE_NAME}} administrators will review and approve or deny your request for an access token. You'll know when your request has been approved when you get a private message with an access token tied to your account.</p>
<p>DO NOT reveal your Client ID or Access Token. Anyone with these information will be able to pretend to be you. You are responsible for keeping them a secret!</p>
<h4>Step 2: Using the Access Token</h4>
<p>To use the access token, include the following header in subsequent API requests to {{SITE_NAME}}: <code>Authorization: access_token_goes_here</code></p>
<p>Python example:</p>
<pre> import requests
headers = {"Authorization": "access_token_goes_here"}
headers = {"Authorization": "access_token_goes_here"}
url = "{{SITE_FULL}}/?sort=comments"
url = "{{SITE_FULL}}/?sort=comments"
r = requests.get(url, headers=headers)
r = requests.get(url, headers=headers)
print(r.json())
</pre>
<p>The expected result of this would be a large JSON representation of the posts on the frontpage sorted by the number of comments</p>
print(r.json())
</pre>
<p>The expected result of this would be a large JSON representation of the posts on the frontpage sorted by the number of comments</p>
<br>
<br>
<p>Aother python example:</p>
<pre> import requests
<p>Aother python example:</p>
<pre> import requests
headers = {"Authorization": "access_token_goes_here"}
headers = {"Authorization": "access_token_goes_here"}
url = "{{SITE_FULL}}/unread"
url = "{{SITE_FULL}}/unread"
r = requests.get(url, headers=headers)
r = requests.get(url, headers=headers)
print(r.json())
</pre>
<p>The expected result of this would be a JSON representation of unread notifications for your account</p>
print(r.json())
</pre>
<p>The expected result of this would be a JSON representation of unread notifications for your account</p>
<br>
<hr>
<br>
<br>
<hr>
<br>
<h1 class="my-3">API Guide for Applications</h1>
<p>The OAuth4 authorization flow is used to enable users to authorize third-party applications to access their {{SITE_NAME}} account without having to provide their login information to the application.</p>
<p>This page explains how to obtain API application keys, how to prompt a user for authorization, and how to obtain and use access tokens. </p>
<h4>Step 1: Create your Application</h4>
<p>In the <a href="/settings/apps">apps tab of {{SITE_NAME}} settings</a>, fill in and submit the form to request new API keys. You will need:</p>
<ul>
<li>an application name</li>
<li>a Redirect URI. May not use HTTP unless using localhost (use HTTPS instead).</li>
<li>a brief description of what your application is intended to do</li>
</ul>
<p>Don't worry too much about accuracy; you will be able to change all of these later.</p>
<p>{{SITE_NAME}} administrators will review and approve or deny your request for API keys. You'll know when your request has been approved when you get a private message with an access token tied to your account.</p>
<p>DO NOT reveal your Client ID or Access Token. Anyone with these information will be able to pretend to be you. You are responsible for keeping them a secret!</p>
<h4>Step 2: Prompt Your User for Authorization</h4>
<p>Send your user to <code>{{SITE_FULL}}/authorize/?client_id=YOUR_CLIENT_ID</code></p>
<p>If done correctly, the user will see that your application wants to access their {{SITE_NAME}} account, and be prompted to approve or deny the request.</p>
<h4>Step 3: Catch the redirect</h4>
<p>The user clicks "Authorize". {{SITE_NAME}} will redirect the user's browser to GET the designated redirect URI. The access token URL parameter will be included in the redirect, which your server should process.</p>
<h4>Step 4: Using the Access Token</h4>
<p>To use the access token, include the following header in subsequent API requests to {{SITE_NAME}}: <code>Authorization: access_token_goes_here</code></p>
<p>Python example:</p>
<pre> import requests
<h1 class="my-3">API Guide for Applications</h1>
<p>The OAuth4 authorization flow is used to enable users to authorize third-party applications to access their {{SITE_NAME}} account without having to provide their login information to the application.</p>
<p>This page explains how to obtain API application keys, how to prompt a user for authorization, and how to obtain and use access tokens. </p>
<h4>Step 1: Create your Application</h4>
<p>In the <a href="/settings/apps">apps tab of {{SITE_NAME}} settings</a>, fill in and submit the form to request new API keys. You will need:</p>
<ul>
<li>an application name</li>
<li>a Redirect URI. May not use HTTP unless using localhost (use HTTPS instead).</li>
<li>a brief description of what your application is intended to do</li>
</ul>
<p>Don't worry too much about accuracy; you will be able to change all of these later.</p>
<p>{{SITE_NAME}} administrators will review and approve or deny your request for API keys. You'll know when your request has been approved when you get a private message with an access token tied to your account.</p>
<p>DO NOT reveal your Client ID or Access Token. Anyone with these information will be able to pretend to be you. You are responsible for keeping them a secret!</p>
<h4>Step 2: Prompt Your User for Authorization</h4>
<p>Send your user to <code>{{SITE_FULL}}/authorize/?client_id=YOUR_CLIENT_ID</code></p>
<p>If done correctly, the user will see that your application wants to access their {{SITE_NAME}} account, and be prompted to approve or deny the request.</p>
<h4>Step 3: Catch the redirect</h4>
<p>The user clicks "Authorize". {{SITE_NAME}} will redirect the user's browser to GET the designated redirect URI. The access token URL parameter will be included in the redirect, which your server should process.</p>
<h4>Step 4: Using the Access Token</h4>
<p>To use the access token, include the following header in subsequent API requests to {{SITE_NAME}}: <code>Authorization: access_token_goes_here</code></p>
<p>Python example:</p>
<pre> import requests
headers = {"Authorization": "access_token_goes_here"}
headers = {"Authorization": "access_token_goes_here"}
url = "{{SITE_FULL}}/?sort=comments"
url = "{{SITE_FULL}}/?sort=comments"
r = requests.get(url, headers=headers)
r = requests.get(url, headers=headers)
print(r.json())
</pre>
<p>The expected result of this would be a large JSON representation of the posts on the frontpage sorted by the number of comments</p>
print(r.json())
</pre>
<p>The expected result of this would be a large JSON representation of the posts on the frontpage sorted by the number of comments</p>
<br>
<br>
<p>Aother python example:</p>
<pre> import requests
<p>Aother python example:</p>
<pre> import requests
headers = {"Authorization": "access_token_goes_here"}
headers = {"Authorization": "access_token_goes_here"}
url = "{{SITE_FULL}}/unread"
url = "{{SITE_FULL}}/unread"
r = requests.get(url, headers=headers)
r = requests.get(url, headers=headers)
print(r.json())
</pre>
<p>The expected result of this would be a JSON representation of unread notifications for your account</p>
print(r.json())
</pre>
<p>The expected result of this would be a JSON representation of unread notifications for your account</p>
{% endblock %}

View File

@ -1,29 +1,28 @@
{% extends "default.html" %}
{% block pagetitle %}App{% endblock %}
{% block content %}
<div class="ml-3 mt-4">
<h5>How to install {{SITE_NAME}}'s mobile app</h5>
<div class="ml-3 mt-4">
<h5>How to install {{SITE_NAME}}'s mobile app</h5>
{% if not v and g.browser == 'chromium' %}
{% set type = 'chromium-lo' %}
{% elif g.browser in ('iphone','mac') %}
{% set type = 'apple' %}
{% else %}
{% set type = g.browser %}
{% endif %}
{% if not v and g.browser == 'chromium' %}
{% set type = 'chromium-lo' %}
{% elif g.browser in ('iphone','mac') %}
{% set type = 'apple' %}
{% else %}
{% set type = g.browser %}
{% endif %}
<div class="font-weight-bold mt-4 mb-2">Step 1:</div>
<img loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()" alt="Step 1" style="height:30vh" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/app-{{type}}-1.webp">
<div class="font-weight-bold mt-4 mb-2">Step 2:</div>
<img loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()" alt="Step 2" style="height:30vh" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/app-{{type}}-2.webp">
{% if g.browser == 'iphone' %}
<hr class="mt-5 mb-5">
<h5>How to enable push notifications inside the app:</h5>
<div class="font-weight-bold mt-4 mb-2">Step 1:</div>
<img loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()" alt="Step 1" style="height:30vh" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/enable-push-notifs.webp">
{% endif %}
<img loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()" alt="Step 1" style="height:30vh" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/app-{{type}}-1.webp">
</div>
<div class="font-weight-bold mt-4 mb-2">Step 2:</div>
<img loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()" alt="Step 2" style="height:30vh" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/app-{{type}}-2.webp">
{% if g.browser == 'iphone' %}
<hr class="mt-5 mb-5">
<h5>How to enable push notifications inside the app:</h5>
<div class="font-weight-bold mt-4 mb-2">Step 1:</div>
<img loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage()" alt="Step 1" style="height:30vh" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/enable-push-notifs.webp">
{% endif %}
</div>
{% endblock %}

View File

@ -1,37 +1,34 @@
{% extends "default.html" %}
{% block pagetitle %}User Badges{% endblock %}
{% block content %}
<h1 class="mt-3">User Badges</h1>
<div>This page describes the requirements for obtaining all profile badges.</div>
<div class="overflow-x-auto mt-3">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>ID</th>
<th>Name</th>
<th>Image</th>
<th>Description</th>
<th>#</th>
<th>Rarity</th>
</tr>
</thead>
{% for badge in badges %}
<tr>
<td>{{badge.id}}</td>
<td>{{badge.name}}</td>
<td>
<img class="contain" alt="{{badge.name}}" loading="lazy" src="{{badge.path}}" width=45.83 height=50>
</td>
<td>{{badge.description}}</td>
{%- set ct = counts[badge.id] if badge.id in counts else (0, 0) %}
<td class="badges-rarity-qty"><a href="/badge_owners/{{badge.id}}">{{ct[0]}}</a></td>
<td data-sort-key="{{ct[0]}}" class="badges-rarity-ratio">{{"{:0.3f}".format(ct[1])}}%</td>
</tr>
{% endfor %}
</table>
</div>
<h1 class="mt-3">User Badges</h1>
<div>This page describes the requirements for obtaining all profile badges.</div>
<div class="overflow-x-auto mt-3">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>ID</th>
<th>Name</th>
<th>Image</th>
<th>Description</th>
<th>#</th>
<th>Rarity</th>
</tr>
</thead>
{% for badge in badges %}
<tr>
<td>{{badge.id}}</td>
<td>{{badge.name}}</td>
<td>
<img class="contain" alt="{{badge.name}}" loading="lazy" src="{{badge.path}}" width=45.83 height=50>
</td>
<td>{{badge.description}}</td>
{%- set ct = counts[badge.id] if badge.id in counts else (0, 0) %}
<td class="badges-rarity-qty"><a href="/badge_owners/{{badge.id}}">{{ct[0]}}</a></td>
<td data-sort-key="{{ct[0]}}" class="badges-rarity-ratio">{{"{:0.3f}".format(ct[1])}}%</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -1,37 +1,35 @@
{% extends "settings2.html" %}
{% block pagetitle %}Banned Users{% endblock %}
{% block content %}
<h5 class="font-weight-bolder text-center pt-2 pb-3"><span>Banned Users</span></h5>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<th>Last Active</th>
{%- endif %}
<th>Truescore</th>
<th>Ban reason</th>
<th>Banned by</th>
<th>Unban in</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<td {% if user.last_active %}data-time="{{user.last_active}}"{% endif %}></td>
{%- endif %}
<td>{{user.truescore}}</td>
<td>{{user.ban_reason | safe}}</td>
<td>{{user.banned_by | safe}}</td>
<td {% if user.unban_utc %}data-time="{{user.unban_utc}}"{% endif %}></td>
</tr>
{% endfor %}
</table>
<h5 class="font-weight-bolder text-center pt-2 pb-3"><span>Banned Users</span></h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<th>Last Active</th>
{%- endif %}
<th>Truescore</th>
<th>Ban reason</th>
<th>Banned by</th>
<th>Unban in</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<td {% if user.last_active %}data-time="{{user.last_active}}"{% endif %}></td>
{%- endif %}
<td>{{user.truescore}}</td>
<td>{{user.ban_reason | safe}}</td>
<td>{{user.banned_by | safe}}</td>
<td {% if user.unban_utc %}data-time="{{user.unban_utc}}"{% endif %}></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -1,29 +1,31 @@
{% extends "settings2.html" %}
{% block pagetitle %}Blocks{% endblock %}
{% block content %}
<h5 class="font-weight-bolder text-center pt-2 pb-3"><span>Blocks</span></h5>
<div class="overflow-x-auto mt-3"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>User</th>
<th>Target</th>
<th>Blocked on</th>
</tr>
</thead>
{% for block in blocks %}
<tr>
<td>
{% with user = block.user %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td>
{% with user = block.target %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td data-time="{{block.created_utc}}"></td>
</tr>
{% endfor %}
</table>
<h5 class="font-weight-bolder text-center pt-2 pb-3"><span>Blocks</span></h5>
<div class="overflow-x-auto mt-3">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>User</th>
<th>Target</th>
<th>Blocked on</th>
</tr>
</thead>
{% for block in blocks %}
<tr>
<td>
{% with user = block.user %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td>
{% with user = block.target %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td data-time="{{block.created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -30,16 +30,16 @@ Icon (fa-foo-bar), Color (#ff0000), URL (/casino/roulette) #}
]-%}
{% block content %}
<h2 style="text-transform: uppercase; text-align: center; letter-spacing: 3px; margin-top: 2rem">Casino</h2>
<div id="directory--wrapper">
{% for game in GAME_INDEX %}
<a class="directory--link" href="{{game[4]}}">
<div class="directory--link-content">
<i class="directory--link--icon fas {{game[2]}}" style="color:{{game[3]}}"></i>
<div class="directory--link--title">{{game[0]|safe}}</div>
<div class="directory--link--description">{{game[1]|safe}}</div>
</div>
</a>
{% endfor %}
</div>
<h2 style="text-transform: uppercase; text-align: center; letter-spacing: 3px; margin-top: 2rem">Casino</h2>
<div id="directory--wrapper">
{% for game in GAME_INDEX %}
<a class="directory--link" href="{{game[4]}}">
<div class="directory--link-content">
<i class="directory--link--icon fas {{game[2]}}" style="color:{{game[3]}}"></i>
<div class="directory--link--title">{{game[0]|safe}}</div>
<div class="directory--link--description">{{game[1]|safe}}</div>
</div>
</a>
{% endfor %}
</div>
{% endblock %}

View File

@ -5,41 +5,41 @@
{% endblock %}
{% block screen %}
<div id="blackjack-table-deck"></div>
<div id="blackjack-table" data-state="{{game_state}}" style="position: relative">
</div>
<div id="blackjack-table-deck"></div>
<div id="blackjack-table" data-state="{{game_state}}" style="position: relative">
</div>
{% endblock %}
{% block actions %}
<link rel="stylesheet" href="{{('css/casino/blackjack_screen.css') | asset}}">
<link rel="stylesheet" href="{{('css/casino/blackjack_screen.css') | asset}}">
<div class="btn-group">
<button type="button" id="twentyone-DEAL" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="deal()">Deal</button>
<button type="button" id="twentyone-HIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="hit()" style="display: none">Hit</button>
<button type="button" id="twentyone-STAY" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="stay()"
style="display: none">Stay</button>
<button type="button" id="twentyone-SPLIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="split()"
style="display: none">Split</button>
<button type="button" id="twentyone-DOUBLE_DOWN" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="doubleDown()"
style="display: none">Double Down</button>
<button type="button" id="twentyone-BUY_INSURANCE" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="buyInsurance()"
style="display: none">Buy
Insurance</button>
</div>
<div class="btn-group">
<button type="button" id="twentyone-DEAL" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="deal()">Deal</button>
<button type="button" id="twentyone-HIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="hit()" style="display: none">Hit</button>
<button type="button" id="twentyone-STAY" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="stay()"
style="display: none">Stay</button>
<button type="button" id="twentyone-SPLIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="split()"
style="display: none">Split</button>
<button type="button" id="twentyone-DOUBLE_DOWN" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="doubleDown()"
style="display: none">Double Down</button>
<button type="button" id="twentyone-BUY_INSURANCE" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="buyInsurance()"
style="display: none">Buy
Insurance</button>
</div>
<div id="twentyone-SPLIT_ACTIONS" class="btn-group" style="display: none">
<h5>Split</h5>
<button type="button" id="twentyone-HIT_SPLIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="hitSplit()" style="display: none">Hit</button>
<button type="button" id="twentyone-STAY_SPLIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="staySplit()"
style="display: none">Stay</button>
<div id="twentyone-SPLIT_ACTIONS" class="btn-group" style="display: none">
<h5>Split</h5>
<button type="button" id="twentyone-HIT_SPLIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="hitSplit()" style="display: none">Hit</button>
<button type="button" id="twentyone-STAY_SPLIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="staySplit()"
style="display: none">Stay</button>
</div>
</div>
{% endblock %}
{% block leaders %}
Blackjack
Blackjack
{% endblock %}
{% block feed %}
Blackjack
Blackjack
{% endblock %}

View File

@ -1,108 +1,108 @@
{% extends "default.html" %}
{% block pagetitle %}{{game.capitalize()}}{% endblock %}
{% block content %}
<link rel="stylesheet" href="{{('css/casino/game_screen.css') | asset}}">
<script defer src="{{'js/casino/game_screen.js' | asset}}"></script>
<link rel="stylesheet" href="{{('css/casino/game_screen.css') | asset}}">
<script defer src="{{'js/casino/game_screen.js' | asset}}"></script>
{% block script %}{% endblock %}
{% block script %}{% endblock %}
<div id="casino-game-wrapper" data-game="{{game}}" class="container-fluid" style="max-width: 500px">
<div class="row row-cols-1">
<div class="col game_screen-title">
<h3>{{game}}</h3>
<hr>
</div>
<div class="col">
{% set stats_alert_class = 'success' if v_stats[0] >= v_stats[2] else 'danger' %}
<div id="casinoGameStats" class="alert alert-{{stats_alert_class}}">
{{v_stats[0]}} win{{macros.plural(v_stats[0])}}{% if v_stats[1] %} - {{v_stats[1]}} tie{{macros.plural(v_stats[1])}}{% endif %} - {{v_stats[2]}} loss{{macros.plural(v_stats[2], 'es')}}
<div id="casino-game-wrapper" data-game="{{game}}" class="container-fluid" style="max-width: 500px">
<div class="row row-cols-1">
<div class="col game_screen-title">
<h3>{{game}}</h3>
<hr>
</div>
</div>
<div class="col">
<div id="casinoGameResult" class="alert">
{%- block result -%}{%- endblock -%}
</div>
</div>
<div class="col">{% block screen %} {% endblock %}</div>
<div class="col">
<div class="row row-cols-2">
<div class="col game_screen-col">
<div class="game_screen-title">
<h5>Wager</h5>
<hr>
</div>
<input id="wagerAmount" type="number" min="5" step="1" value="5" class="form-control">
<div class="col">
{% set stats_alert_class = 'success' if v_stats[0] >= v_stats[2] else 'danger' %}
<div id="casinoGameStats" class="alert alert-{{stats_alert_class}}">
{{v_stats[0]}} win{{macros.plural(v_stats[0])}}{% if v_stats[1] %} - {{v_stats[1]}} tie{{macros.plural(v_stats[1])}}{% endif %} - {{v_stats[2]}} loss{{macros.plural(v_stats[2], 'es')}}
</div>
<div class="col">
<div class="game_screen-title">
<h5>Currency</h5>
<hr>
</div>
<div class="col">
<div id="casinoGameResult" class="alert">
{%- block result -%}{%- endblock -%}
</div>
</div>
<div class="col">{% block screen %} {% endblock %}</div>
<div class="col">
<div class="row row-cols-2">
<div class="col game_screen-col">
<div class="game_screen-title">
<h5>Wager</h5>
<hr>
</div>
<input id="wagerAmount" type="number" min="5" step="1" value="5" class="form-control">
</div>
<div class="btn-group">
<span class="unbreakable mr-3">
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerCoins"
value="coin" checked>
<label for="wagerCoins" class="btn btn-primary border-0 px-0">
<img id="wagerCoinsImg" loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/coins.webp?x=6" alt="coin" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Coin">
</label>
<span id="user-coins-amount-casino">{{v.coins}}</span>
</span>
<div class="col">
<div class="game_screen-title">
<h5>Currency</h5>
<hr>
</div>
<div class="btn-group">
<span class="unbreakable mr-3">
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerCoins"
value="coin" checked>
<label for="wagerCoins" class="btn btn-primary border-0 px-0">
<img id="wagerCoinsImg" loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/coins.webp?x=6" alt="coin" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Coin">
</label>
<span id="user-coins-amount-casino">{{v.coins}}</span>
</span>
<span class="unbreakable">
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerMarseybux"
value="marseybux">
<label for="wagerMarseybux" class="btn btn-primary border-0 px-0">
<img id="wagerMarseybuxImg" loading="lazy" src="{{SITE_FULL_IMAGES}}/i/marseybux.webp?x=6" alt="marseybux" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Marseybux">
</label>
<span id="user-bux-amount-casino">{{v.marseybux}}</span>
</span>
<span class="unbreakable">
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerMarseybux"
value="marseybux">
<label for="wagerMarseybux" class="btn btn-primary border-0 px-0">
<img id="wagerMarseybuxImg" loading="lazy" src="{{SITE_FULL_IMAGES}}/i/marseybux.webp?x=6" alt="marseybux" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Marseybux">
</label>
<span id="user-bux-amount-casino">{{v.marseybux}}</span>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="game_screen-title">
<h5>{% block actiontext %}Actions{% endblock %}</h5>
<hr>
</div>
{% block actions %} {% endblock %}
</div>
<div id="casinoGameFeed" data-feed="{{feed}}" class="col">
<div class="game_screen-title">
<h5>Feed</h5>
<hr>
</div>
<ul id="casinoGameFeedList"></ul>
<button type="button" class="btn btn-secondary" style="width: 100%" data-nonce="{{g.nonce}}" data-onclick="reloadFeed()">
Reload Feed
</button>
</div>
<div class="col">
<div class="game_screen-title">
<h5>Leaders</h5>
<hr>
</div>
<div id="gameLeaderboard" data-leaderboard="{{leaderboard}}">
{%- macro leaderboard(text, css_class, marsey, color) -%}
<div class="casino-game-leaderboard">
<div class="leaderboard-marsey-trophy">
<img loading="lazy" class="leaderboard-marsey-trophy__marsey" src="{{SITE_FULL_IMAGES}}/e/{{marsey}}.webp">
<i class="fas fa-trophy leaderboard-marsey-trophy__trophy" style="color: {{color}}"></i>
</div>
<div class="casino-game-leaderboard-info">
<small>{{text}}</small>
<h3 id="{{css_class}}">-</h3>
</div>
<div class="col">
<div class="game_screen-title">
<h5>{% block actiontext %}Actions{% endblock %}</h5>
<hr>
</div>
{% block actions %} {% endblock %}
</div>
<div id="casinoGameFeed" data-feed="{{feed}}" class="col">
<div class="game_screen-title">
<h5>Feed</h5>
<hr>
</div>
<ul id="casinoGameFeedList"></ul>
<button type="button" class="btn btn-secondary" style="width: 100%" data-nonce="{{g.nonce}}" data-onclick="reloadFeed()">
Reload Feed
</button>
</div>
<div class="col">
<div class="game_screen-title">
<h5>Leaders</h5>
<hr>
</div>
<div id="gameLeaderboard" data-leaderboard="{{leaderboard}}">
{%- macro leaderboard(text, css_class, marsey, color) -%}
<div class="casino-game-leaderboard">
<div class="leaderboard-marsey-trophy">
<img loading="lazy" class="leaderboard-marsey-trophy__marsey" src="{{SITE_FULL_IMAGES}}/e/{{marsey}}.webp">
<i class="fas fa-trophy leaderboard-marsey-trophy__trophy" style="color: {{color}}"></i>
</div>
<div class="casino-game-leaderboard-info">
<small>{{text}}</small>
<h3 id="{{css_class}}">-</h3>
</div>
</div>
{%- endmacro -%}
{{leaderboard('Biggest Winner (All Time)', 'biggestWinnerAllTime', 'marseyhappytears', 'gold')}}
{{leaderboard('Biggest Winner (Last 24h)', 'biggestWinner24h', 'marseyexcited', 'gold')}}
{{leaderboard('Biggest Loser (Last 24h)', 'biggestLoser24h', 'marseycry', 'darkred')}}
{{leaderboard('Biggest Loser (All Time)', 'biggestLoserAllTime', 'marseyrain', 'darkred')}}
</div>
{%- endmacro -%}
{{leaderboard('Biggest Winner (All Time)', 'biggestWinnerAllTime', 'marseyhappytears', 'gold')}}
{{leaderboard('Biggest Winner (Last 24h)', 'biggestWinner24h', 'marseyexcited', 'gold')}}
{{leaderboard('Biggest Loser (Last 24h)', 'biggestLoser24h', 'marseycry', 'darkred')}}
{{leaderboard('Biggest Loser (All Time)', 'biggestLoserAllTime', 'marseyrain', 'darkred')}}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -2,13 +2,13 @@
{% block pagetitle %}You're in rehab!{% endblock %}
{% block pagetype %}casino-in-rehab{% endblock %}
{% block content %}
<div style="text-transform: uppercase; letter-spacing: 2px; display: flex; flex-direction: column; align-items: center">
<div style="margin-top: 3rem">
<h2>No one was there for Britney…</h2>
<div style="text-transform: uppercase; letter-spacing: 2px; display: flex; flex-direction: column; align-items: center">
<div style="margin-top: 3rem">
<h2>No one was there for Britney…</h2>
</div>
<div style="text-align: right; margin-bottom: 3rem">
<h2>…but we're here for you. You've been checked into Rehab.</h2>
</div>
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/brit.webp" style="text-align: center">
</div>
<div style="text-align: right; margin-bottom: 3rem">
<h2>…but we're here for you. You've been checked into Rehab.</h2>
</div>
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/brit.webp" style="text-align: center">
</div>
{% endblock %}

View File

@ -11,100 +11,100 @@
{% endblock %}
{% block actiontext %}
Bets
Bets
{% endblock %}
{% block actions %}
<div id="roulette-bets">
<div class="roulette-bet-summary">
<div class="roulette-bet-summary--heading">
<div class="roulette-poker-chip">
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/pokerchip.webp" width="40" height="40">
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseycodecellove.webp" width="40" height="40">
<div id="roulette-bets">
<div class="roulette-bet-summary">
<div class="roulette-bet-summary--heading">
<div class="roulette-poker-chip">
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/pokerchip.webp" width="40" height="40">
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseycodecellove.webp" width="40" height="40">
</div>
<p>111 is betting 4 and 4:
</p>
</div>
<p>111 is betting 4 and 4:
</p>
<ul class="roulette-bet-summary--list">
<li>2 <img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/coins.webp?x=6" alt="coin" width="32" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Coin"> that
the number will be black.</li>
<li>2 <img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/coins.webp?x=6" alt="coin" width="32" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Coin"> that
the number will be even.</li>
</ul>
</div>
<ul class="roulette-bet-summary--list">
<li>2 <img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/coins.webp?x=6" alt="coin" width="32" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Coin"> that
the number will be black.</li>
<li>2 <img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/coins.webp?x=6" alt="coin" width="32" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Coin"> that
the number will be even.</li>
</ul>
</div>
</div>
<div class="game_screen-title">
<h5>How to Bet</h5>
<hr>
</div>
<table class="table">
<thead>
<tr>
<th>Bet</th>
<th>Payout</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Straight Up</td>
<td>35:1</td>
<td>
Click any single number. <br>
You win if the roulette lands on that number.
</td>
</tr>
<tr>
<td>Line</td>
<td>5:1</td>
<td>
Click Line 1, Line 2 ... Line 6. <br>
You win if the roulette lands on any of the six numbers beneath the line.
</td>
</tr>
<tr>
<td>Column</td>
<td>2:1</td>
<td>
Click Col 1, Col 2 or Col 3. <br>
You win if the roulette lands on any of the 12 numbers to the left of the column.
</td>
</tr>
<tr>
<td>Dozen</td>
<td>2:1</td>
<td>
Click 1st12, 2nd12 or 3rd12. <br>
You win if the roulette lands on a number within 1-12, 13-24 or 25-36, respectively.
</td>
</tr>
<tr>
<td>Even/Odd</td>
<td>1:1</td>
<td>
Click EVEN or ODD. <br>
You win if the roulette lands on a number that matches your choice.
</td>
</tr>
<tr>
<td>Red/Black</td>
<td>1:1</td>
<td>
Click RED or BLACK. <br>
You win if the roulette lands on a number that is the same color as your choice.
</td>
</tr>
<tr>
<td>High/Low</td>
<td>1:1</td>
<td>
Click 1:18 or 19:36. <br>
You win if the roulette lands on a number within your selected range.
</td>
</tr>
</tbody>
</table>
<div class="game_screen-title">
<h5>How to Bet</h5>
<hr>
</div>
<table class="table">
<thead>
<tr>
<th>Bet</th>
<th>Payout</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Straight Up</td>
<td>35:1</td>
<td>
Click any single number. <br>
You win if the roulette lands on that number.
</td>
</tr>
<tr>
<td>Line</td>
<td>5:1</td>
<td>
Click Line 1, Line 2 ... Line 6. <br>
You win if the roulette lands on any of the six numbers beneath the line.
</td>
</tr>
<tr>
<td>Column</td>
<td>2:1</td>
<td>
Click Col 1, Col 2 or Col 3. <br>
You win if the roulette lands on any of the 12 numbers to the left of the column.
</td>
</tr>
<tr>
<td>Dozen</td>
<td>2:1</td>
<td>
Click 1st12, 2nd12 or 3rd12. <br>
You win if the roulette lands on a number within 1-12, 13-24 or 25-36, respectively.
</td>
</tr>
<tr>
<td>Even/Odd</td>
<td>1:1</td>
<td>
Click EVEN or ODD. <br>
You win if the roulette lands on a number that matches your choice.
</td>
</tr>
<tr>
<td>Red/Black</td>
<td>1:1</td>
<td>
Click RED or BLACK. <br>
You win if the roulette lands on a number that is the same color as your choice.
</td>
</tr>
<tr>
<td>High/Low</td>
<td>1:1</td>
<td>
Click 1:18 or 19:36. <br>
You win if the roulette lands on a number within your selected range.
</td>
</tr>
</tbody>
</table>
{% endblock %}

View File

@ -1,35 +1,33 @@
{% extends "settings2.html" %}
{% block pagetitle %}Chuds{% endblock %}
{% block content %}
<h5 class="my-4">Chudded Users</h5>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<th>Last Active</th>
{%- endif %}
<th>Truescore</th>
<th>Chudded by</th>
<th>Unchud in</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<td {% if user.last_active %}data-time="{{user.last_active}}"{% endif %}></td>
{%- endif %}
<td>{{user.truescore}}</td>
<td>{{user.chudder | safe}}</td>
<td {% if user.chud != 1 %}data-time="{{user.chud}}"{% endif %}></td>
</tr>
{% endfor %}
</table>
<h5 class="my-4">Chudded Users</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<th>Last Active</th>
{%- endif %}
<th>Truescore</th>
<th>Chudded by</th>
<th>Unchud in</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<td {% if user.last_active %}data-time="{{user.last_active}}"{% endif %}></td>
{%- endif %}
<td>{{user.truescore}}</td>
<td>{{user.chudder | safe}}</td>
<td {% if user.chud != 1 %}data-time="{{user.chud}}"{% endif %}></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -1,23 +1,23 @@
{% extends "default.html" %}
{% block pagetitle %}!commenters{% endblock %}
{% block content %}
<h5 class="my-3">!commenters</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>First commented on</th>
</tr>
</thead>
{% for user, comment_id, comment_created_utc in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td><a href="/comment/{{comment_id}}" data-time="{{comment_created_utc}}"></td>
</tr>
{% endfor %}
</table>
<h5 class="my-3">!commenters</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>First commented on</th>
</tr>
</thead>
{% for user, comment_id, comment_created_utc in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td><a href="/comment/{{comment_id}}" data-time="{{comment_created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

File diff suppressed because it is too large Load Diff

View File

@ -1,146 +1,143 @@
{%- extends 'root.html' -%}
{% block body_attributes %}id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" class="has_header"{% endblock %}
{% block body %}
{% block pulltorefresh %}
<div id="pulltorefresh">
<img id="pulltorefresh-img" src="{{SITE_FULL_IMAGES}}/e/marseyunamused.webp">
</div>
{% endblock %}
{% block banner %}
{% include "modals/expanded_image.html" %}
{% if err or '@' not in request.path %}
{% if IS_FISTMAS() and not (hole and hole.has_banners) %}
{% include 'events/fistmas/banner.html' %}
{% elif IS_HOMOWEEN() and not (hole and hole.has_banners) %}
{% include 'events/homoween/banner.html' %}
{% else %}
{% set path = "files/assets/images/" ~ SITE_NAME %}
{% block pulltorefresh %}
<div id="pulltorefresh">
<img id="pulltorefresh-img" src="{{SITE_FULL_IMAGES}}/e/marseyunamused.webp">
</div>
{% endblock %}
{% block banner %}
{% include "modals/expanded_image.html" %}
{% if err or '@' not in request.path %}
{% if IS_FISTMAS() and not (hole and hole.has_banners) %}
{% include 'events/fistmas/banner.html' %}
{% elif IS_HOMOWEEN() and not (hole and hole.has_banners) %}
{% include 'events/homoween/banner.html' %}
{% else %}
{% set path = "files/assets/images/" ~ SITE_NAME %}
{% if err and SITE_NAME == 'rDrama' %}
{% set src = "banner_error.webp" | asset_siteimg %}
{% elif hole and hole.has_banners %}
{% set src = hole.random_banner() %}
{% set alt = ['/h/', hole, ' banner']|join %}
{% set class = 'site-banner-hole' %}
{% elif get_running_orgy(v) and os_path.exists(path ~ "/orgy_banners") %}
{% set src = macros.random_image("assets/images/" ~ SITE_NAME ~ "/orgy_banners") %}
{% set href = "/chat" %}
{% set expand = false %}
{% elif IS_DKD() or IS_BIRTHGAY() or IS_BIRTHDEAD() %}
{% set src = macros.random_image("assets/events/" ~ IS_EVENT() ~ "/images/banners") %}
{% elif SITE_NAME == "rDrama" %}
{% set href = "https://donate.transequality.org/a/ncte" %}
{% set expand = false %}
{% endif %}
{% if SITE_NAME == "WPD" %}
{% if hole %}
{% set href = "/h/" ~ hole %}
{% if err and SITE_NAME == 'rDrama' %}
{% set src = "banner_error.webp" | asset_siteimg %}
{% elif hole and hole.has_banners %}
{% set src = hole.random_banner() %}
{% set alt = ['/h/', hole, ' banner']|join %}
{% set class = 'site-banner-hole' %}
{% elif get_running_orgy(v) and os_path.exists(path ~ "/orgy_banners") %}
{% set src = macros.random_image("assets/images/" ~ SITE_NAME ~ "/orgy_banners") %}
{% set href = "/chat" %}
{% set expand = false %}
{% else %}
{% set href = "/" %}
{% elif IS_DKD() or IS_BIRTHGAY() or IS_BIRTHDEAD() %}
{% set src = macros.random_image("assets/events/" ~ IS_EVENT() ~ "/images/banners") %}
{% elif SITE_NAME == "rDrama" %}
{% set href = "https://donate.transequality.org/a/ncte" %}
{% set expand = false %}
{% endif %}
{% endif %}
<a id="banner-link" href="{{href|default(src)}}" rel="nofollow noopener">
{% if src %}
{% set banner_url = src %}
{% else %}
{%- if not v and os_path.exists(path ~ "/cached.webp") -%}
{% set banner_url = 'cached.webp' | asset_siteimg %}
{%- elif SITE_NAME == 'rDrama' and v and v.chud %}
{% set banner_url = '/banners/18.webp' | asset_siteimg %}
{%- elif os_path.exists(path ~ "/banners") -%}
{% set banner_url = macros.random_image("assets/images/" ~ SITE_NAME ~ "/banners") %}
{%- else -%}
{% set banner_url = 'banner.webp' | asset_siteimg %}
{%- endif -%}
{% if SITE_NAME == "WPD" %}
{% if hole %}
{% set href = "/h/" ~ hole %}
{% set expand = false %}
{% else %}
{% set href = "/" %}
{% set expand = false %}
{% endif %}
{% endif %}
{% macro img_element() %}
<img data-nonce="{{g.nonce}}" data-onclick="{{expand|default('expandImage()')}}" class="{{class|default('site-banner')}}" alt="{{alt|default('site banner')}}" src="{{banner_url}}">
{% endmacro %}
<a id="banner-link" href="{{href|default(src)}}" rel="nofollow noopener">
{% if src %}
{% set banner_url = src %}
{% else %}
{%- if not v and os_path.exists(path ~ "/cached.webp") -%}
{% set banner_url = 'cached.webp' | asset_siteimg %}
{%- elif SITE_NAME == 'rDrama' and v and v.chud %}
{% set banner_url = '/banners/18.webp' | asset_siteimg %}
{%- elif os_path.exists(path ~ "/banners") -%}
{% set banner_url = macros.random_image("assets/images/" ~ SITE_NAME ~ "/banners") %}
{%- else -%}
{% set banner_url = 'banner.webp' | asset_siteimg %}
{%- endif -%}
{% endif %}
{% if hole and hole.has_banners %}
{{img_element()}}
{% else %}
<div class="banner-wrapper">
<div style="padding: 0 0 12.2%">
<div>
{{img_element()}}
{% macro img_element() %}
<img data-nonce="{{g.nonce}}" data-onclick="{{expand|default('expandImage()')}}" class="{{class|default('site-banner')}}" alt="{{alt|default('site banner')}}" src="{{banner_url}}">
{% endmacro %}
{% if hole and hole.has_banners %}
{{img_element()}}
{% else %}
<div class="banner-wrapper">
<div style="padding: 0 0 12.2%">
<div>
{{img_element()}}
</div>
</div>
</div>
{% endif %}
</a>
{% endif %}
{% endif %}
{% endblock %}
{% include "header.html" %}
{% block mobileUserBanner %}{% endblock %}
{% if IS_HOMOWEEN() %}
{% block hauntBg %}{% endblock %}
{% endif %}
<div class="container">
<div class="row justify-content-around" id="main-content-row">
<div class="order-first col h-100 {% block customPadding %}{% if request.path.startswith('/@') %}user-gutters{% else %}custom-gutters{% endif %}{% endblock %}" id="main-content-col">
{% block desktopUserBanner %}{% endblock %}
{% block desktopBanner %}{% endblock %}
{% block PseudoSubmitForm %}{% endblock %}
{% block searchText %}{% endblock %}
{% block content %}{% endblock %}
{% block pagenav %}{% endblock %}
</div>
{% block sidebar %}
{% if has_sidebar and (home or p) %}
{% set sidebar = "sidebar_" ~ SITE_NAME ~ ".html" %}
<div id="desktop-sidebar">
{% include sidebar %}
</div>
{% endif %}
</a>
{% endblock %}
</div>
</div>
{% block mobilenavbar %}{% include "mobile_navigation_bar.html" %}{% endblock %}
{% block actionsModal %}{% endblock %}
{% block reportCommentModal %}{% endblock %}
{% block GIFtoast %}{% endblock %}
{% block GIFpicker %}{% endblock %}
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
</div>
<script defer src="{{'js/vendor/lozad.js' | asset}}"></script>
<script defer src="{{'js/vendor/lite-youtube.js' | asset}}"></script>
{% if (v and v.spider) or (p and p.award_count("shit", v)) or (p and p.award_count("fireflies", v)) %}
<script defer src="{{'js/vendor/critters.js' | asset}}"></script>
{% if v and v.spider %}
<script defer src="{{'js/spider.js' | asset}}"></script>
{% endif %}
{% if p and p.award_count("shit", v) %}
<input hidden id="shit_num" value="{{p.award_count('shit', v)}}">
<script defer src="{{'js/bugs.js' | asset}}"></script>
{% endif %}
{% if p and p.award_count("fireflies", v) %}
<input hidden id="fireflies_num" value="{{p.award_count('fireflies', v)}}">
<script defer src="{{'js/fireflies.js' | asset}}"></script>
{% endif %}
{% endif %}
{% endblock %}
{% include "header.html" %}
{% block mobileUserBanner %}
{% endblock %}
{% if IS_HOMOWEEN() %}
{% block hauntBg %}
{% endblock %}
{% endif %}
<div class="container">
<div class="row justify-content-around" id="main-content-row">
<div class="order-first col h-100 {% block customPadding %}{% if request.path.startswith('/@') %}user-gutters{% else %}custom-gutters{% endif %}{% endblock %}" id="main-content-col">
{% block desktopUserBanner %}{% endblock %}
{% block desktopBanner %}{% endblock %}
{% block PseudoSubmitForm %}{% endblock %}
{% block searchText %}{% endblock %}
{% block content %}{% endblock %}
{% block pagenav %}{% endblock %}
</div>
{% block sidebar %}
{% if has_sidebar and (home or p) %}
{% set sidebar = "sidebar_" ~ SITE_NAME ~ ".html" %}
<div id="desktop-sidebar">
{% include sidebar %}
</div>
{% endif %}
{% endblock %}
</div>
</div>
{% block mobilenavbar %}{% include "mobile_navigation_bar.html" %}{% endblock %}
{% block actionsModal %}{% endblock %}
{% block reportCommentModal %}{% endblock %}
{% block GIFtoast %}{% endblock %}
{% block GIFpicker %}{% endblock %}
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
</div>
<script defer src="{{'js/vendor/lozad.js' | asset}}"></script>
<script defer src="{{'js/vendor/lite-youtube.js' | asset}}"></script>
{% if (v and v.spider) or (p and p.award_count("shit", v)) or (p and p.award_count("fireflies", v)) %}
<script defer src="{{'js/vendor/critters.js' | asset}}"></script>
{% if v and v.spider %}
<script defer src="{{'js/spider.js' | asset}}"></script>
{% if IS_EVENT() %}
{% include "events/shared/music.html" %}
{% endif %}
{% if p and p.award_count("shit", v) %}
<input hidden id="shit_num" value="{{p.award_count('shit', v)}}">
<script defer src="{{'js/bugs.js' | asset}}"></script>
{% endif %}
{% if p and p.award_count("fireflies", v) %}
<input hidden id="fireflies_num" value="{{p.award_count('fireflies', v)}}">
<script defer src="{{'js/fireflies.js' | asset}}"></script>
{% endif %}
{% endif %}
{% if IS_EVENT() %}
{% include "events/shared/music.html" %}
{% endif %}
{% endblock %}

View File

@ -95,15 +95,15 @@
{%- endif -%}
{% block content %}
<div id="directory--wrapper">
{% for thread in DIRECTORY %}
<a class="directory--link" href="{{thread[4]}}">
<div class="directory--link-content">
<i class="directory--link--icon fas {{thread[2]}}" style="color:{{thread[3]}}"></i>
<div class="directory--link--title">{{thread[0]|safe}}</div>
<div class="directory--link--description">{{thread[1]|safe}}</div>
<div id="directory--wrapper">
{% for thread in DIRECTORY %}
<a class="directory--link" href="{{thread[4]}}">
<div class="directory--link-content">
<i class="directory--link--icon fas {{thread[2]}}" style="color:{{thread[3]}}"></i>
<div class="directory--link--title">{{thread[0]|safe}}</div>
<div class="directory--link--description">{{thread[1]|safe}}</div>
</div>
</a>
{% endfor %}
</div>
</a>
{% endfor %}
</div>
{% endblock %}

View File

@ -386,8 +386,8 @@
<h1>{% block title %}Title Goes Here{% endblock %}</h1>
{% block content %}
{% for entry in data %}
<h3>{{entry[0]}}</h3>
<p>{{entry[1]}}</p>
<h3>{{entry[0]}}</h3>
<p>{{entry[1]}}</p>
{% endfor %}
{% endblock %}
</div>

View File

@ -36,32 +36,32 @@
</thead>
<tbody id="emojis-table">
{% for emoji in emojis %}
<tr>
<td>{{loop.index}}</td>
<td>{{emoji.name}}</td>
<td><img class="emoji" loading="lazy" data-bs-toggle="tooltip" alt=":#{{emoji.name}}:" title=":{{emoji.name}}:" src="{{SITE_FULL_IMAGES}}/e/{{emoji.name}}.webp"></td>
<td>{{emoji.count}}</td>
<td>
{% if emoji.author_id == 2 %}
{% if SITE == 'rdrama.net' %}
a WPD user
{% else %}
an rDrama user
{% endif %}
{% else %}
{% set user = emoji.user %}
{% include "user_in_table.html" %}
{% endif %}
</td>
<td data-sort-key="{{emoji.created_utc}}" {% if emoji.created_utc %}data-time="{{emoji.created_utc}}"{% endif %}></td>
{% if FEATURES['EMOJI_SUBMISSIONS'] %}
<tr>
<td>{{loop.index}}</td>
<td>{{emoji.name}}</td>
<td><img class="emoji" loading="lazy" data-bs-toggle="tooltip" alt=":#{{emoji.name}}:" title=":{{emoji.name}}:" src="{{SITE_FULL_IMAGES}}/e/{{emoji.name}}.webp"></td>
<td>{{emoji.count}}</td>
<td>
{% if emoji.og %}
<a href="{{SITE_FULL_IMAGES}}/asset_submissions/emojis/original/{{emoji.og}}">{{emoji.og}}</a>
{% if emoji.author_id == 2 %}
{% if SITE == 'rdrama.net' %}
a WPD user
{% else %}
an rDrama user
{% endif %}
{% else %}
{% set user = emoji.user %}
{% include "user_in_table.html" %}
{% endif %}
</td>
{% endif %}
</tr>
<td data-sort-key="{{emoji.created_utc}}" {% if emoji.created_utc %}data-time="{{emoji.created_utc}}"{% endif %}></td>
{% if FEATURES['EMOJI_SUBMISSIONS'] %}
<td>
{% if emoji.og %}
<a href="{{SITE_FULL_IMAGES}}/asset_submissions/emojis/original/{{emoji.og}}">{{emoji.og}}</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>

View File

@ -2,19 +2,19 @@
{% block pagetitle %}{{code}} {{title}}{% endblock %}
{% block pagetype %}error-{{code}}{% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-10 col-md-5">
<div class="text-center px-3 my-5">
{% if img -%}
<img alt=":#{{img}}:" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/{{img}}.webp">
{%- endif %}
<h5 class=" mt-1">{{code}} {{title}}</h5>
<p class="text-muted error-description">{{msg|safe}}</p>
{% if details -%}
<blockquote class="error-details mb-4 py-2">{{details|safe}}</blockquote>
{%- endif %}
<div><a href="/" class="btn btn-primary mt-3">Go to frontpage</a></div>
<div class="row justify-content-center">
<div class="col-10 col-md-5">
<div class="text-center px-3 my-5">
{% if img -%}
<img alt=":#{{img}}:" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/{{img}}.webp">
{%- endif %}
<h5 class=" mt-1">{{code}} {{title}}</h5>
<p class="text-muted error-description">{{msg|safe}}</p>
{% if details -%}
<blockquote class="error-details mb-4 py-2">{{details|safe}}</blockquote>
{%- endif %}
<div><a href="/" class="btn btn-primary mt-3">Go to frontpage</a></div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -2,21 +2,21 @@
{% block pagetitle %}NSFW{% endblock %}
{% block pagetype %}error-451{% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col col-md-5">
<div class="text-center px-3 mt-3">
<img alt=":#marseytwerking:" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseytwerking.webp">
<h5>NSFW Warning</h5>
<p class="mb-3">This post is rated NSFW (Not Safe For Work). Are you sure you want to proceed?</p>
<div class="btn-toolbar justify-content-center mb-4">
<form action="/allow_nsfw" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="redir" value="{{request.full_path}}">
<input type="submit" class="btn btn-danger" value="Yes">
</form>
<div class="mt-3"><a href="/" class="btn btn-secondary">No</a></div>
<div class="mt-5"><a href="/settings/advanced#nsfw_toggle" class="btn btn-secondary">Never show me this warning again</a></div>
<div class="row justify-content-center">
<div class="col col-md-5">
<div class="text-center px-3 mt-3">
<img alt=":#marseytwerking:" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseytwerking.webp">
<h5>NSFW Warning</h5>
<p class="mb-3">This post is rated NSFW (Not Safe For Work). Are you sure you want to proceed?</p>
<div class="btn-toolbar justify-content-center mb-4">
<form action="/allow_nsfw" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="redir" value="{{request.full_path}}">
<input type="submit" class="btn btn-danger" value="Yes">
</form>
<div class="mt-3"><a href="/" class="btn btn-secondary">No</a></div>
<div class="mt-5"><a href="/settings/advanced#nsfw_toggle" class="btn btn-secondary">Never show me this warning again</a></div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,472 +1,472 @@
{% extends "default.html" %}
{% block pagetitle %}Formatting{% endblock %}
{% block content %}
<h3 class="ml-2 mt-4">Markdown Formatting</h3>
<h3 class="ml-2 mt-4">Markdown Formatting</h3>
<div class="ml-2">You can use Markdown formatting:</div>
<div class="ml-2">You can use Markdown formatting:</div>
<div class="overflow-x-auto mt-3">
<table id="formatting-table" class="table table-striped generate-copy-buttons">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">What you type</th>
<th class="disable-sort-click">What gets displayed</th>
</tr>
</thead>
<tbody>
<tr>
<td>Italics</td>
<td>*text*</td>
<td><i>text</i></td>
</tr>
<tr>
<td>Bold</td>
<td>**text**</td>
<td><b>text</b></td>
</tr>
<tr>
<td>Code</td>
<td>`text`</td>
<td><code>text</code></td>
</tr>
<tr>
<td>Strikethrough</td>
<td>~~text~~</td>
<td><del>text</del></td>
</tr>
<tr>
<td>Horizontal Rule</td>
<td>
<pre>Text 1
---
Text 2</pre>
</td>
<td>
Text 1
<hr>
Text 2
</td>
</tr>
<tr>
<td>Links</td>
<td>[{{SITE_NAME}}]({{SITE_FULL}}/)</td>
<td><a href="/">{{SITE_NAME}}</a></td>
</tr>
<tr>
<td>
Images
<br>
<span style="font-style: italic; font-weight: normal">
* will embed automatically if from <a href="#approved">approved hosts</a>.
</span>
</td>
<td>https://i.imgur.com/SwVuagI.png</td>
<td>
<a href="https://i.imgur.com/SwVuagI_d.webp?maxwidth=9999&fidelity=grand" rel="nofollow noopener" target="_blank">
<img alt="https://i.imgur.com/SwVuagI.png" class="img" src="https://i.imgur.com/SwVuagI.png" data-user-submitted>
</a>
</td>
</tr>
<tr>
<td>Youtube Videos</td>
<td>https://youtube.com/watch?v=3Hecr51ByE4</td>
<td><lite-youtube videoid="3Hecr51ByE4" params="autoplay=1&modestbranding=1"></lite-youtube></td>
</tr>
<tr>
<td>
Video Files
<br>
<span style="font-style: italic; font-weight: normal">
* will embed automatically if from <a href="#approved">approved hosts</a>.
</span>
</td>
<td>https://files.catbox.moe/v4om92.mp4</td>
<td>
<p class="resizable">
<video controls preload="none" src="https://files.catbox.moe/v4om92.mp4"></video>
</p>
</td>
</tr>
<tr>
<td>
Audio Files
<br>
<span style="font-style: italic; font-weight: normal">
* will embed automatically if from <a href="#approved">approved hosts</a>.
</span>
</td>
<td>https://pomf2.lain.la/f/zlnppx4.mp3</td>
<td>
<audio controls="" preload="none" src="https://pomf2.lain.la/f/zlnppx4.mp3"></audio>
</td>
</tr>
<tr>
<td>Emojis</td>
<td>:marseygasp:</td>
<td>
<img loading="lazy" data-bs-toggle="tooltip" b class="emoji" alt=":marseygasp:" title=":marseygasp:" height="30" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</td>
</tr>
<tr>
<td>Mirrored Emojis</td>
<td>:!marseygasp:</td>
<td>
<img loading="lazy" data-bs-toggle="tooltip" b class="emoji mirrored" alt=":!marseygasp:" title=":!marseygasp:" height="30" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</td>
</tr>
<tr>
<td>Large Emojis</td>
<td>:#marseygasp:</td>
<td>
<img loading="lazy" data-bs-toggle="tooltip" b alt=":#marseygasp:" title=":#marseygasp:" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</td>
</tr>
<tr>
<td>Large Mirrored Emojis</td>
<td>:#!marseygasp:</td>
<td>
<img loading="lazy" data-bs-toggle="tooltip" b alt=":#!marseygasp:" title=":#!marseygasp:" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</td>
</tr>
<tr>
<td>Pat Emojis</td>
<td>:marseygasppat:</td>
<td>
<span alt=":marseygasppat:" data-bs-toggle="tooltip" title=":marseygasppat:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/hand.webp">
<img alt=":marseygasppat:" b loading="lazy" pat src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</span>
</td>
</tr>
<tr>
<td>Talking Emojis</td>
<td>:marseygasptalking:</td>
<td>
<span alt=":marseygasppat:" data-bs-toggle="tooltip" title=":marseygasptalking:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/talking.webp">
<img alt=":marseygasptalking:" b loading="lazy" pat src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</span>
</td>
</tr>
<tr>
<td>Genocide Emojis</td>
<td>:marseygaspgenocide:</td>
<td>
<span alt=":marseygaspgenocide:" cide data-bs-toggle="tooltip" title=":marseygaspgenocide:">
<img alt=":marseygaspgenocide:" b src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</span>
</td>
</tr>
<tr>
<td>Love Emojis</td>
<td>:marseygasplove:</td>
<td>
<span alt=":marseygasplove:" data-bs-toggle="tooltip" title=":marseygasplove:"><img alt=":marseygasplove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/i/love-foreground.webp">
<img alt=":marseygasplove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/i/love-background.webp">
<img alt=":marseygasplove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</span>
</td>
</tr>
<tr>
<td>Pat User</td>
<td>:@snappypat:</td>
<td>
<span alt=":@snappypat:" data-bs-toggle="tooltip" title=":@snappypat:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/hand.webp">
<img alt=":@snappypat:" b loading="lazy" pat src="/pp/{{SNAPPY_ID}}">
</span>
</td>
</tr>
<tr>
<td>Talking User</td>
<td>:@snappytalking:</td>
<td>
<span alt=":@snappypat:" data-bs-toggle="tooltip" title=":@snappytalking:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/talking.webp">
<img alt=":@snappytalking:" b loading="lazy" pat src="/pp/{{SNAPPY_ID}}">
</span>
</td>
</tr>
<tr>
<td>Genocide User</td>
<td>:@snappygenocide:</td>
<td>
<span alt=":@snappygenocide:" cide data-bs-toggle="tooltip" title=":@snappygenocide:">
<img alt=":@snappygenocide:" b src="/pp/2">
</span>
</td>
</tr>
<tr>
<td>Love User</td>
<td>:@snappylove:</td>
<td>
<span alt=":@snappylove:" data-bs-toggle="tooltip" title=":@snappylove:"><img alt=":@snappylove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/i/love-foreground.webp">
<img alt=":@snappylove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/i/love-background.webp">
<img alt=":@snappylove:" b loading="lazy" src="/pp/{{SNAPPY_ID}}">
</span>
</td>
</tr>
<tr>
<td>
Poll — Pick Multiple<br>
</td>
<td>$$bussy$$<br>$$gussy$$</td>
<td>
<div class="custom-control">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="422741">
<label class="custom-control-label" for="422741">bussy - <a href="/votes/t3_422741"><span id="option-422741">0</span> votes</a></label>
</div>
<div class="custom-control">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="422742">
<label class="custom-control-label" for="422742">gussy - <a href="/votes/t3_422742"><span id="option-422742">0</span> votes</a></label>
</div>
</td>
</tr>
<tr>
<td>
Poll — Pick One<br>
</td>
<td>&&bussy&&<br>&&gussy&&</td>
<td>
<div class="custom-control">
<input name="choice" autocomplete="off" type="radio" class="custom-control-input" id="1338113">
<label class="custom-control-label" for="1338113">bussy - <a href="/votes/t3_1338113"><span id="option-1338113">0</span> votes</a></label>
</div>
<div class="custom-control">
<input name="choice" autocomplete="off" type="radio" class="custom-control-input" id="1338114">
<label class="custom-control-label" for="1338114">gussy - <a href="/votes/t3_1338114"><span id="option-1338114">0</span> votes</a></label>
</div>
</td>
</tr>
<tr>
<td>Headers 1-6</td>
<td># Header 1<br>## Header 2<br>### Header 3<br>#### Header 4<br>##### Header 5<br>###### Header 6</td>
<td><h1>Header 1</h1><h2>Header 2</h2><h3>Header 3</h3><h4>Header 4</h4><h5>Header 5</h5><h6>Header 6</h6></td>
</tr>
<tr>
<td>List</td>
<td>* First thing<br>* Second thing</td>
<td><ul><li>First thing</li><li>Second thing</li></ul></td>
</tr>
<tr>
<td>Code Block</td>
<td>```<br>Use three backticks above and below.<br>```</td>
<td>
<pre class="mb-0"><code>Use three backticks above and below.
</code></pre>
</td>
</tr>
<tr>
<td>Spoilers</td>
<td>||bussy > gussy||</td>
<td><p><spoiler>bussy &gt; gussy</spoiler></p></td>
</tr>
<tr>
<td>Username Mention</td>
<td>@Snappy</td>
<td><a class="d-inline-block" href="/@Snappy"><img alt="@Snappy profile picture" loading="lazy" src="/pp/{{SNAPPY_ID}}">@Snappy</a></td>
</tr>
<tr>
<td>Subreddit Mention</td>
<td>r/drama</td>
<td><a class="d-inline-block" rel="nofollow noopener" href="https://old.reddit.com/r/drama">r/drama</a></td>
</tr>
<tr>
<td>Redditor Mention</td>
<td>u/Bardfinn</td>
<td><a class="d-inline-block" rel="nofollow noopener" href="https://old.reddit.com/user/Bardfinn">u/Bardfinn</a></td>
</tr>
<tr>
<td>Ping Group Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions all members of the group.
</span>
</td>
<td>!biofoids</td>
<td><a href="/!biofoids" rel="nofollow">!biofoids</a></td>
</tr>
<tr>
<td>Followers Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions all your followers.
</span>
</td>
<td>!followers</td>
<td><a href="/id/{{v.id}}/followers" rel="nofollow">!followers</a></td>
</tr>
<tr>
<td>Commenters Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions everyone who has commented in the thread it's used in.
</span>
</td>
<td>!commenters</td>
<td><a href="/!commenters/1/1" rel="nofollow">!commenters</a></td>
</tr>
<tr>
<td>Admins Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions all site admins.
</span>
</td>
<td>!jannies</td>
<td><a href="/admins" rel="nofollow">!jannies</a></td>
</tr>
<tr>
<td>Everyone Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions everyone.
</span>
</td>
<td>!everyone</td>
<td><a href="/users" rel="nofollow">!everyone</a></td>
</tr>
<tr>
<td>Random Marsey Emoji</td>
<td>:marseyrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Platy Emoji</td>
<td>:platyrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Wolf Emoji</td>
<td>:wolfrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Donkey Kong Emoji</td>
<td>:donkeykongrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Tay Emoji</td>
<td>:tayrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Capy Emoji</td>
<td>:capyrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Carp Emoji</td>
<td>:carprandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Marsey Flag Emoji</td>
<td>:marseyflagrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Marsey Alphabet Emoji</td>
<td>:marseyalphabetrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Rage Emoji</td>
<td>:ragerandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Wojak Emoji</td>
<td>:wojakrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Misc Emoji</td>
<td>:miscrandom:</td>
<td>???</td>
</tr>
{% if FEATURES['MARKUP_COMMANDS'] -%}
<div class="overflow-x-auto mt-3">
<table id="formatting-table" class="table table-striped generate-copy-buttons">
<thead class="bg-primary text-white">
<tr>
<td>Play slots using coins<br>
<th>Name</th>
<th class="disable-sort-click">What you type</th>
<th class="disable-sort-click">What gets displayed</th>
</tr>
</thead>
<tbody>
<tr>
<td>Italics</td>
<td>*text*</td>
<td><i>text</i></td>
</tr>
<tr>
<td>Bold</td>
<td>**text**</td>
<td><b>text</b></td>
</tr>
<tr>
<td>Code</td>
<td>`text`</td>
<td><code>text</code></td>
</tr>
<tr>
<td>Strikethrough</td>
<td>~~text~~</td>
<td><del>text</del></td>
</tr>
<tr>
<td>Horizontal Rule</td>
<td>
<pre>Text 1
---
Text 2</pre>
</td>
<td>
Text 1
<hr>
Text 2
</td>
</tr>
<tr>
<td>Links</td>
<td>[{{SITE_NAME}}]({{SITE_FULL}}/)</td>
<td><a href="/">{{SITE_NAME}}</a></td>
</tr>
<tr>
<td>
Images
<br>
<span style="font-style: italic; font-weight: normal">
* Minimum 100 coins.
* will embed automatically if from <a href="#approved">approved hosts</a>.
</span>
</td>
<td>!slots 100</td>
<td>???</td>
<td>https://i.imgur.com/SwVuagI.png</td>
<td>
<a href="https://i.imgur.com/SwVuagI_d.webp?maxwidth=9999&fidelity=grand" rel="nofollow noopener" target="_blank">
<img alt="https://i.imgur.com/SwVuagI.png" class="img" src="https://i.imgur.com/SwVuagI.png" data-user-submitted>
</a>
</td>
</tr>
<tr>
<td>Play slots using marseybux<br>
<td>Youtube Videos</td>
<td>https://youtube.com/watch?v=3Hecr51ByE4</td>
<td><lite-youtube videoid="3Hecr51ByE4" params="autoplay=1&modestbranding=1"></lite-youtube></td>
</tr>
<tr>
<td>
Video Files
<br>
<span style="font-style: italic; font-weight: normal">
* Minimum 100 marseybux.
* will embed automatically if from <a href="#approved">approved hosts</a>.
</span>
</td>
<td>!slotsmb 100</td>
<td>https://files.catbox.moe/v4om92.mp4</td>
<td>
<p class="resizable">
<video controls preload="none" src="https://files.catbox.moe/v4om92.mp4"></video>
</p>
</td>
</tr>
<tr>
<td>
Audio Files
<br>
<span style="font-style: italic; font-weight: normal">
* will embed automatically if from <a href="#approved">approved hosts</a>.
</span>
</td>
<td>https://pomf2.lain.la/f/zlnppx4.mp3</td>
<td>
<audio controls="" preload="none" src="https://pomf2.lain.la/f/zlnppx4.mp3"></audio>
</td>
</tr>
<tr>
<td>Emojis</td>
<td>:marseygasp:</td>
<td>
<img loading="lazy" data-bs-toggle="tooltip" b class="emoji" alt=":marseygasp:" title=":marseygasp:" height="30" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</td>
</tr>
<tr>
<td>Mirrored Emojis</td>
<td>:!marseygasp:</td>
<td>
<img loading="lazy" data-bs-toggle="tooltip" b class="emoji mirrored" alt=":!marseygasp:" title=":!marseygasp:" height="30" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</td>
</tr>
<tr>
<td>Large Emojis</td>
<td>:#marseygasp:</td>
<td>
<img loading="lazy" data-bs-toggle="tooltip" b alt=":#marseygasp:" title=":#marseygasp:" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</td>
</tr>
<tr>
<td>Large Mirrored Emojis</td>
<td>:#!marseygasp:</td>
<td>
<img loading="lazy" data-bs-toggle="tooltip" b alt=":#!marseygasp:" title=":#!marseygasp:" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</td>
</tr>
<tr>
<td>Pat Emojis</td>
<td>:marseygasppat:</td>
<td>
<span alt=":marseygasppat:" data-bs-toggle="tooltip" title=":marseygasppat:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/hand.webp">
<img alt=":marseygasppat:" b loading="lazy" pat src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</span>
</td>
</tr>
<tr>
<td>Talking Emojis</td>
<td>:marseygasptalking:</td>
<td>
<span alt=":marseygasppat:" data-bs-toggle="tooltip" title=":marseygasptalking:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/talking.webp">
<img alt=":marseygasptalking:" b loading="lazy" pat src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</span>
</td>
</tr>
<tr>
<td>Genocide Emojis</td>
<td>:marseygaspgenocide:</td>
<td>
<span alt=":marseygaspgenocide:" cide data-bs-toggle="tooltip" title=":marseygaspgenocide:">
<img alt=":marseygaspgenocide:" b src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</span>
</td>
</tr>
<tr>
<td>Love Emojis</td>
<td>:marseygasplove:</td>
<td>
<span alt=":marseygasplove:" data-bs-toggle="tooltip" title=":marseygasplove:"><img alt=":marseygasplove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/i/love-foreground.webp">
<img alt=":marseygasplove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/i/love-background.webp">
<img alt=":marseygasplove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseygasp.webp">
</span>
</td>
</tr>
<tr>
<td>Pat User</td>
<td>:@snappypat:</td>
<td>
<span alt=":@snappypat:" data-bs-toggle="tooltip" title=":@snappypat:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/hand.webp">
<img alt=":@snappypat:" b loading="lazy" pat src="/pp/{{SNAPPY_ID}}">
</span>
</td>
</tr>
<tr>
<td>Talking User</td>
<td>:@snappytalking:</td>
<td>
<span alt=":@snappypat:" data-bs-toggle="tooltip" title=":@snappytalking:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/talking.webp">
<img alt=":@snappytalking:" b loading="lazy" pat src="/pp/{{SNAPPY_ID}}">
</span>
</td>
</tr>
<tr>
<td>Genocide User</td>
<td>:@snappygenocide:</td>
<td>
<span alt=":@snappygenocide:" cide data-bs-toggle="tooltip" title=":@snappygenocide:">
<img alt=":@snappygenocide:" b src="/pp/2">
</span>
</td>
</tr>
<tr>
<td>Love User</td>
<td>:@snappylove:</td>
<td>
<span alt=":@snappylove:" data-bs-toggle="tooltip" title=":@snappylove:"><img alt=":@snappylove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/i/love-foreground.webp">
<img alt=":@snappylove:" b loading="lazy" src="{{SITE_FULL_IMAGES}}/i/love-background.webp">
<img alt=":@snappylove:" b loading="lazy" src="/pp/{{SNAPPY_ID}}">
</span>
</td>
</tr>
<tr>
<td>
Poll — Pick Multiple<br>
</td>
<td>$$bussy$$<br>$$gussy$$</td>
<td>
<div class="custom-control">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="422741">
<label class="custom-control-label" for="422741">bussy - <a href="/votes/t3_422741"><span id="option-422741">0</span> votes</a></label>
</div>
<div class="custom-control">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="422742">
<label class="custom-control-label" for="422742">gussy - <a href="/votes/t3_422742"><span id="option-422742">0</span> votes</a></label>
</div>
</td>
</tr>
<tr>
<td>
Poll — Pick One<br>
</td>
<td>&&bussy&&<br>&&gussy&&</td>
<td>
<div class="custom-control">
<input name="choice" autocomplete="off" type="radio" class="custom-control-input" id="1338113">
<label class="custom-control-label" for="1338113">bussy - <a href="/votes/t3_1338113"><span id="option-1338113">0</span> votes</a></label>
</div>
<div class="custom-control">
<input name="choice" autocomplete="off" type="radio" class="custom-control-input" id="1338114">
<label class="custom-control-label" for="1338114">gussy - <a href="/votes/t3_1338114"><span id="option-1338114">0</span> votes</a></label>
</div>
</td>
</tr>
<tr>
<td>Headers 1-6</td>
<td># Header 1<br>## Header 2<br>### Header 3<br>#### Header 4<br>##### Header 5<br>###### Header 6</td>
<td><h1>Header 1</h1><h2>Header 2</h2><h3>Header 3</h3><h4>Header 4</h4><h5>Header 5</h5><h6>Header 6</h6></td>
</tr>
<tr>
<td>List</td>
<td>* First thing<br>* Second thing</td>
<td><ul><li>First thing</li><li>Second thing</li></ul></td>
</tr>
<tr>
<td>Code Block</td>
<td>```<br>Use three backticks above and below.<br>```</td>
<td>
<pre class="mb-0"><code>Use three backticks above and below.
</code></pre>
</td>
</tr>
<tr>
<td>Spoilers</td>
<td>||bussy > gussy||</td>
<td><p><spoiler>bussy &gt; gussy</spoiler></p></td>
</tr>
<tr>
<td>Username Mention</td>
<td>@Snappy</td>
<td><a class="d-inline-block" href="/@Snappy"><img alt="@Snappy profile picture" loading="lazy" src="/pp/{{SNAPPY_ID}}">@Snappy</a></td>
</tr>
<tr>
<td>Subreddit Mention</td>
<td>r/drama</td>
<td><a class="d-inline-block" rel="nofollow noopener" href="https://old.reddit.com/r/drama">r/drama</a></td>
</tr>
<tr>
<td>Redditor Mention</td>
<td>u/Bardfinn</td>
<td><a class="d-inline-block" rel="nofollow noopener" href="https://old.reddit.com/user/Bardfinn">u/Bardfinn</a></td>
</tr>
<tr>
<td>Ping Group Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions all members of the group.
</span>
</td>
<td>!biofoids</td>
<td><a href="/!biofoids" rel="nofollow">!biofoids</a></td>
</tr>
<tr>
<td>Followers Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions all your followers.
</span>
</td>
<td>!followers</td>
<td><a href="/id/{{v.id}}/followers" rel="nofollow">!followers</a></td>
</tr>
<tr>
<td>Commenters Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions everyone who has commented in the thread it's used in.
</span>
</td>
<td>!commenters</td>
<td><a href="/!commenters/1/1" rel="nofollow">!commenters</a></td>
</tr>
<tr>
<td>Admins Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions all site admins.
</span>
</td>
<td>!jannies</td>
<td><a href="/admins" rel="nofollow">!jannies</a></td>
</tr>
<tr>
<td>Everyone Mention<br>
<span style="font-style: italic; font-weight: normal">
* Mentions everyone.
</span>
</td>
<td>!everyone</td>
<td><a href="/users" rel="nofollow">!everyone</a></td>
</tr>
<tr>
<td>Random Marsey Emoji</td>
<td>:marseyrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Fortune</td>
<td>#fortune</td>
<td>Random Platy Emoji</td>
<td>:platyrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random 8-Ball Answer</td>
<td>#8ball</td>
<td>Random Wolf Emoji</td>
<td>:wolfrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Factcheck</td>
<td>#factcheck</td>
<td>Random Donkey Kong Emoji</td>
<td>:donkeykongrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Roll</td>
<td>#roll</td>
<td>A number 1&ndash;9999.</td>
<td>Random Tay Emoji</td>
<td>:tayrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Coinflip</td>
<td>#coinflip</td>
<td>Heads, Tails, or Edge.</td>
<td>Random Capy Emoji</td>
<td>:capyrandom:</td>
<td>???</td>
</tr>
{%- endif %}
</tbody>
</table>
</div>
<tr>
<td>Random Carp Emoji</td>
<td>:carprandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Marsey Flag Emoji</td>
<td>:marseyflagrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Marsey Alphabet Emoji</td>
<td>:marseyalphabetrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Rage Emoji</td>
<td>:ragerandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Wojak Emoji</td>
<td>:wojakrandom:</td>
<td>???</td>
</tr>
<tr>
<td>Random Misc Emoji</td>
<td>:miscrandom:</td>
<td>???</td>
</tr>
{% if FEATURES['MARKUP_COMMANDS'] -%}
<tr>
<td>Play slots using coins<br>
<span style="font-style: italic; font-weight: normal">
* Minimum 100 coins.
</span>
</td>
<td>!slots 100</td>
<td>???</td>
</tr>
<tr>
<td>Play slots using marseybux<br>
<span style="font-style: italic; font-weight: normal">
* Minimum 100 marseybux.
</span>
</td>
<td>!slotsmb 100</td>
<td>???</td>
</tr>
<tr>
<td>Random Fortune</td>
<td>#fortune</td>
<td>???</td>
</tr>
<tr>
<td>Random 8-Ball Answer</td>
<td>#8ball</td>
<td>???</td>
</tr>
<tr>
<td>Random Factcheck</td>
<td>#factcheck</td>
<td>???</td>
</tr>
<tr>
<td>Roll</td>
<td>#roll</td>
<td>A number 1&ndash;9999.</td>
</tr>
<tr>
<td>Coinflip</td>
<td>#coinflip</td>
<td>Heads, Tails, or Edge.</td>
</tr>
{%- endif %}
</tbody>
</table>
</div>
<hr class="my-6">
<hr class="my-6">
<h1>HTML Formatting</h1>
<h1>HTML Formatting</h1>
And we allow custom HTML in most places:
And we allow custom HTML in most places:
<h4 class="mt-3">Allowed Tags</h4>
<h4 class="mt-3">Allowed Tags</h4>
<ul>
{% for tag in allowed_tags %}
<li>{{tag}}</li>
{% endfor %}
</ul>
<ul>
{% for tag in allowed_tags %}
<li>{{tag}}</li>
{% endfor %}
</ul>
<h5 class="mt-4">Allowed Styles</h5>
<h5 class="mt-4">Allowed Styles</h5>
<ul>
{% for style in allowed_styles %}
<li>{{style}}</li>
{% endfor %}
</ul>
<ul>
{% for style in allowed_styles %}
<li>{{style}}</li>
{% endfor %}
</ul>
<hr class="my-6">
<hr class="my-6">
<h1 id="approved">Approved Media Hosts</h1>
<h1 id="approved">Approved Media Hosts</h1>
Image files, video files, and audio files from these sources will get embedded automatically:
Image files, video files, and audio files from these sources will get embedded automatically:
<ul class="mt-3">
{% for host in approved_embed_hosts %}
<li>{{host}}</li>
{% endfor %}
</ul>
<ul class="mt-3">
{% for host in approved_embed_hosts %}
<li>{{host}}</li>
{% endfor %}
</ul>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Text copied to clipboard
</div>
</div>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Text copied to clipboard
</div>
</div>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
<script defer src="{{'js/formatting.js' | asset}}"></script>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
<script defer src="{{'js/formatting.js' | asset}}"></script>
{% endblock %}

View File

@ -1,22 +1,22 @@
{% extends "settings2.html" %}
{% block pagetitle %}Grassed Users{% endblock %}
{% block content %}
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Grasser</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{user.ban_reason.split('by ')[1] | safe}}</td>
</tr>
{% endfor %}
</table>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Grasser</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{user.ban_reason.split('by ')[1] | safe}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -1,96 +1,94 @@
{% extends "default.html" %}
{% block pagetitle %}!{{group}}{% endblock %}
{% block content %}
{% if v.id != group.owner.id %}
<button id="leave-{{group}}" type="button" class="mt-4 btn btn-danger btn-block {% if v.id not in group.membership_user_ids %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group}}/leave','leave-{{group}}','apply-{{group}}','d-none')">
{%- if v.id in group.member_ids or group.name == 'verifiedrich' -%}
Leave
{%- else -%}
Cancel Application
{%- endif -%}
</button>
{% if v.id != group.owner.id %}
<button id="leave-{{group}}" type="button" class="mt-4 btn btn-danger btn-block {% if v.id not in group.membership_user_ids %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group}}/leave','leave-{{group}}','apply-{{group}}','d-none')">
{%- if v.id in group.member_ids or group.name == 'verifiedrich' -%}
Leave
{%- else -%}
Cancel Application
{%- endif -%}
</button>
<button id="apply-{{group}}" type="button" class="mt-4 {% if v.id in group.membership_user_ids %}d-none{% endif %} btn btn-success btn-block" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group}}/apply','leave-{{group}}','apply-{{group}}','d-none')">{% if group.name != 'verifiedrich' %}Apply to {% endif %}Join</button>
{% endif %}
<button id="apply-{{group}}" type="button" class="mt-4 {% if v.id in group.membership_user_ids %}d-none{% endif %} btn btn-success btn-block" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group}}/apply','leave-{{group}}','apply-{{group}}','d-none')">{% if group.name != 'verifiedrich' %}Apply to {% endif %}Join</button>
{% endif %}
<br>
{% macro process_memberships(memberships, name) %}
<h5 class="my-3">!{{group}} {{name}}</h5>
<br>
{% macro process_memberships(memberships, name) %}
<h5 class="my-3">!{{group}} {{name}}</h5>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5 ping-groups">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
{% if name == 'members' %}
<th>Approved on</th>
{% else %}
<th>Applied on</th>
{% endif %}
{% if v.mods_group(group) %}
<th class="disable-sort-click"></th>
{% endif %}
</tr>
</thead>
<tbody id="{{name}}_tbody">
{% for membership in memberships %}
<tr id="{{membership.user_id}}">
<td id="counter-{{membership.user_id}}">{{loop.index}}</td>
{% set owner = name == 'members' and loop.index == 1 %}
<td {% if owner %}class="unbreakable"{% endif %}>
{% with user=membership.user %}
{% include "user_in_table.html" %}
{% endwith %}
{% if owner %}
<img class="mx-2 group-owner" data-bs-toggle="tooltip" alt="Owner" title="Owner" src="{{SITE_FULL_IMAGES}}/e/marseykingretard.webp">
{% elif membership.is_mod %}
<img class="mx-2 group-mod" data-bs-toggle="tooltip" alt="Mod" title="Mod" src="{{SITE_FULL_IMAGES}}/e/marseyjanny.webp">
{% endif %}
</td>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5 ping-groups">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
{% if name == 'members' %}
<td id="time-{{membership.user_id}}" data-time="{{membership.approved_utc}}"></td>
<th>Approved on</th>
{% else %}
<td id="time-{{membership.user_id}}" data-time="{{membership.created_utc}}"></td>
<th>Applied on</th>
{% endif %}
{% if v.mods_group(group) %}
<td>
{% if v.id == group.owner.id and v.id != membership.user_id %}
<div id="mod-{{membership.user_id}}" class="mb-2 {% if name == 'applications' %}d-none{% endif %}">
<button id="add-mod-{{membership.user_id}}" type="button" class="btn btn-success btn-block {% if membership.is_mod %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group.name}}/{{membership.user_id}}/add_mod','add-mod-{{membership.user_id}}','remove-mod-{{membership.user_id}}','d-none')">Add as Mod</button>
<button id="remove-mod-{{membership.user_id}}" type="button" class="btn btn-danger btn-block {% if not membership.is_mod %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group.name}}/{{membership.user_id}}/remove_mod','add-mod-{{membership.user_id}}','remove-mod-{{membership.user_id}}','d-none')">Remove as Mod</button>
</div>
{% endif %}
<div id="kick-{{membership.user_id}}" {% if name == 'applications' %}class="d-none"{% endif %}>
<button type="button" class="btn btn-danger btn-block" data-nonce="{{g.nonce}}" data-onclick="reject_membership(this,'{{group}}','{{membership.user_id}}')">{% if v.id == membership.user_id %}Leave{% else %}Kick{% endif %}</button>
</div>
<div {% if name == 'members' %}class="d-none"{% endif %}>
<button type="button" class="btn btn-success btn-block" data-nonce="{{g.nonce}}" data-onclick="approve_membership(this,'{{group}}','{{membership.user_id}}')">Approve</button>
<button type="button" class="btn btn-danger btn-block" data-nonce="{{g.nonce}}" data-onclick="reject_membership(this,'{{group}}','{{membership.user_id}}')">Reject</button>
</div>
</td>
<th class="disable-sort-click"></th>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endmacro %}
</thead>
<tbody id="{{name}}_tbody">
{% for membership in memberships %}
<tr id="{{membership.user_id}}">
<td id="counter-{{membership.user_id}}">{{loop.index}}</td>
{% set owner = name == 'members' and loop.index == 1 %}
<td {% if owner %}class="unbreakable"{% endif %}>
{% with user=membership.user %}
{% include "user_in_table.html" %}
{% endwith %}
{% if owner %}
<img class="mx-2 group-owner" data-bs-toggle="tooltip" alt="Owner" title="Owner" src="{{SITE_FULL_IMAGES}}/e/marseykingretard.webp">
{% elif membership.is_mod %}
<img class="mx-2 group-mod" data-bs-toggle="tooltip" alt="Mod" title="Mod" src="{{SITE_FULL_IMAGES}}/e/marseyjanny.webp">
{% endif %}
</td>
{% if v.mods_group(group) %}
{{process_memberships(applications, 'applications')}}
{{process_memberships(members, 'members')}}
<script defer src="{{'js/group_members_owner.js' | asset}}"></script>
{% else %}
{{process_memberships(members, 'members')}}
{{process_memberships(applications, 'applications')}}
{% endif %}
{% if name == 'members' %}
<td id="time-{{membership.user_id}}" data-time="{{membership.approved_utc}}"></td>
{% else %}
<td id="time-{{membership.user_id}}" data-time="{{membership.created_utc}}"></td>
{% endif %}
{% if v.mods_group(group) %}
<td>
{% if v.id == group.owner.id and v.id != membership.user_id %}
<div id="mod-{{membership.user_id}}" class="mb-2 {% if name == 'applications' %}d-none{% endif %}">
<button id="add-mod-{{membership.user_id}}" type="button" class="btn btn-success btn-block {% if membership.is_mod %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group.name}}/{{membership.user_id}}/add_mod','add-mod-{{membership.user_id}}','remove-mod-{{membership.user_id}}','d-none')">Add as Mod</button>
<button id="remove-mod-{{membership.user_id}}" type="button" class="btn btn-danger btn-block {% if not membership.is_mod %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group.name}}/{{membership.user_id}}/remove_mod','add-mod-{{membership.user_id}}','remove-mod-{{membership.user_id}}','d-none')">Remove as Mod</button>
</div>
{% endif %}
<div id="kick-{{membership.user_id}}" {% if name == 'applications' %}class="d-none"{% endif %}>
<button type="button" class="btn btn-danger btn-block" data-nonce="{{g.nonce}}" data-onclick="reject_membership(this,'{{group}}','{{membership.user_id}}')">{% if v.id == membership.user_id %}Leave{% else %}Kick{% endif %}</button>
</div>
<div {% if name == 'members' %}class="d-none"{% endif %}>
<button type="button" class="btn btn-success btn-block" data-nonce="{{g.nonce}}" data-onclick="approve_membership(this,'{{group}}','{{membership.user_id}}')">Approve</button>
<button type="button" class="btn btn-danger btn-block" data-nonce="{{g.nonce}}" data-onclick="reject_membership(this,'{{group}}','{{membership.user_id}}')">Reject</button>
</div>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endmacro %}
{% if v.mods_group(group) %}
{{process_memberships(applications, 'applications')}}
{{process_memberships(members, 'members')}}
<script defer src="{{'js/group_members_owner.js' | asset}}"></script>
{% else %}
{{process_memberships(members, 'members')}}
{{process_memberships(applications, 'applications')}}
{% endif %}
{% endblock %}

View File

@ -1,66 +1,65 @@
{% extends "default.html" %}
{% block pagetitle %}Ping Groups{% endblock %}
{% block content %}
<div class="px-3">
<h3 class="mt-3">Create Ping Group</h3>
<form class="mt-3" action="/create_group" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<div class="container pb-0" style="background-color: transparent !important">
<div class="row">
<div class="col col-md-6 px-0 py-3 py-md-0">
<div class="body">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="title">Group Name</label>
<input minlength="3" maxlength="25" pattern='[a-zA-Z0-9_\-]*' class="form-control" type="text" name="name" required>
<small class="form-text text-muted">3-25 characters, including letters, numbers, _ , and -</small>
<div class="footer">
<div class="d-flex">
<button type="submit" class="btn btn-primary ml-auto" {% if v.marseybux + v.coins < cost %}disabled{% endif %}>Create Group</button>
<div class="px-3">
<h3 class="mt-3">Create Ping Group</h3>
<form class="mt-3" action="/create_group" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<div class="container pb-0" style="background-color: transparent !important">
<div class="row">
<div class="col col-md-6 px-0 py-3 py-md-0">
<div class="body">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="title">Group Name</label>
<input minlength="3" maxlength="25" pattern='[a-zA-Z0-9_\-]*' class="form-control" type="text" name="name" required>
<small class="form-text text-muted">3-25 characters, including letters, numbers, _ , and -</small>
<div class="footer">
<div class="d-flex">
<button type="submit" class="btn btn-primary ml-auto" {% if v.marseybux + v.coins < cost %}disabled{% endif %}>Create Group</button>
</div>
<p class="mt-2 mr-1" style="float: right"><b>Cost</b>: {{cost}} coins or marseybux</p>
</div>
<p class="mt-2 mr-1" style="float: right"><b>Cost</b>: {{cost}} coins or marseybux</p>
</div>
</div>
</div>
</div>
</form>
<h3 class="mb-3">Ping Groups</h3>
<div class="overflow-x-auto">
<table class="ping-groups table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th class="members">Members</th>
<th>Created on</th>
</tr>
</thead>
<tbody>
{% for group in groups %}
<tr>
<td>{{loop.index}}</td>
<td>{{group.name}}</td>
<td class="unbreakable">
<a href="/!{{group}}">{{group.member_ids | length}}</a>
{% if v.id != group.owner.id %}
<button id="leave-{{group}}" type="button" class="ml-3 ml-md-5 btn btn-primary {% if v.id not in group.membership_user_ids %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group}}/leave','leave-{{group}}','apply-{{group}}','d-none')">
{%- if v.id in group.member_ids or group.name == 'verifiedrich' -%}
Leave
{%- else -%}
Cancel Application
{%- endif -%}
</button>
<button id="apply-{{group}}" type="button" class="ml-3 ml-md-5 {% if v.id in group.membership_user_ids %}d-none{% endif %} btn btn-primary" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group}}/apply','leave-{{group}}','apply-{{group}}','d-none')">{% if group.name != 'verifiedrich' %}Apply to {% endif %}Join</button>
{% endif %}
</td>
<td data-time="{{group.created_utc}}"></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</form>
<h3 class="mb-3">Ping Groups</h3>
<div class="overflow-x-auto">
<table class="ping-groups table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th class="members">Members</th>
<th>Created on</th>
</tr>
</thead>
<tbody>
{% for group in groups %}
<tr>
<td>{{loop.index}}</td>
<td>{{group.name}}</td>
<td class="unbreakable">
<a href="/!{{group}}">{{group.member_ids | length}}</a>
{% if v.id != group.owner.id %}
<button id="leave-{{group}}" type="button" class="ml-3 ml-md-5 btn btn-primary {% if v.id not in group.membership_user_ids %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group}}/leave','leave-{{group}}','apply-{{group}}','d-none')">
{%- if v.id in group.member_ids or group.name == 'verifiedrich' -%}
Leave
{%- else -%}
Cancel Application
{%- endif -%}
</button>
<button id="apply-{{group}}" type="button" class="ml-3 ml-md-5 {% if v.id in group.membership_user_ids %}d-none{% endif %} btn btn-primary" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/!{{group}}/apply','leave-{{group}}','apply-{{group}}','d-none')">{% if group.name != 'verifiedrich' %}Apply to {% endif %}Join</button>
{% endif %}
</td>
<td data-time="{{group.created_utc}}"></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View File

@ -101,5 +101,5 @@
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -1,22 +1,23 @@
{% extends "default.html" %}
{% block pagetitle %}Users {{verb}} /h/{{hole}}{% endblock %}
{% block content %}
<h5 class="mt-3">Users {{verb}} /h/{{hole}}</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>{{verb.title()}} since</th>
</tr>
</thead>
{% for user, object in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td {% if object.created_utc %}data-time="{{object.created_utc}}"{% endif %}></td>
</tr>
{% endfor %}
</table>
<h5 class="mt-3">Users {{verb}} /h/{{hole}}</h5>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>{{verb.title()}} since</th>
</tr>
</thead>
{% for user, object in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td {% if object.created_utc %}data-time="{{object.created_utc}}"{% endif %}></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -1,29 +1,29 @@
{% extends "default.html" %}
{% block pagetitle %}Create a hole{% endblock %}
{% block content %}
<form class="mt-3" id="submitform" action="/create_hole" method="post" data-nonce="{{g.nonce}}">
<div class="container">
<div class="row justify-content-center mb-4 pb-6">
<div class="col col-md-6 p-3 py-md-0">
<h1 class="d-mob-none">Create a hole</h1>
<h3 class=" d-md-none">Create a hole</h3>
<div class="body">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="title">Hole Name</label>
<input minlength="3" maxlength="25" pattern='[a-zA-Z0-9_\-]*' class="form-control" id="title-register" type="text" name="name" required>
<small class="form-text text-muted">3-25 characters, including letters, numbers, _ , and -</small>
{% if HOLE_INACTIVITY_DELETION %}
<p class="text-danger mt-2">Warning: holes get automatically deleted if they spend 7 days with no new posts.</p>
{% endif %}
<div class="footer">
<div class="d-flex">
<button type="submit" class="btn btn-primary ml-auto" {% if cost > v.coins + v.marseybux %}disabled{% endif %}>Create Hole</button>
<form class="mt-3" id="submitform" action="/create_hole" method="post" data-nonce="{{g.nonce}}">
<div class="container">
<div class="row justify-content-center mb-4 pb-6">
<div class="col col-md-6 p-3 py-md-0">
<h1 class="d-mob-none">Create a hole</h1>
<h3 class=" d-md-none">Create a hole</h3>
<div class="body">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="title">Hole Name</label>
<input minlength="3" maxlength="25" pattern='[a-zA-Z0-9_\-]*' class="form-control" id="title-register" type="text" name="name" required>
<small class="form-text text-muted">3-25 characters, including letters, numbers, _ , and -</small>
{% if HOLE_INACTIVITY_DELETION %}
<p class="text-danger mt-2">Warning: holes get automatically deleted if they spend 7 days with no new posts.</p>
{% endif %}
<div class="footer">
<div class="d-flex">
<button type="submit" class="btn btn-primary ml-auto" {% if cost > v.coins + v.marseybux %}disabled{% endif %}>Create Hole</button>
</div>
<p class="mt-2 mr-1" style="float: right"><b>Cost</b>: {{cost}} coins or marseybux</p>
</div>
<p class="mt-2 mr-1" style="float: right"><b>Cost</b>: {{cost}} coins or marseybux</p>
</div>
</div>
</div>
</div>
</div>
</form>
</form>
{% endblock %}

View File

@ -1,37 +1,38 @@
{% extends "default.html" %}
{% block pagetitle %}/h/{{hole}} Exiles{% endblock %}
{% block content %}
<h5 class="my-4 ml-2">Users exiled from /h/{{hole}}</h5>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Exiled by</th>
<th>Exiled since</th>
<th class="disable-sort-click"></th>
</tr>
</thead>
{% for user, exile in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>
{% with user=exile.exiler %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td {% if exile.created_utc %}data-time="{{exile.created_utc}}"{% endif %}></td>
<td>
{% if v.mods(hole.name) %}
<form action="/h/{{hole}}/unexile/{{user.id}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Unexile">
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
<h5 class="my-4 ml-2">Users exiled from /h/{{hole}}</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Exiled by</th>
<th>Exiled since</th>
<th class="disable-sort-click"></th>
</tr>
</thead>
{% for user, exile in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>
{% with user=exile.exiler %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td {% if exile.created_utc %}data-time="{{exile.created_utc}}"{% endif %}></td>
<td>
{% if v.mods(hole.name) %}
<form action="/h/{{hole}}/unexile/{{user.id}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Unexile">
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -1,37 +1,34 @@
{% extends "default.html" %}
{% block pagetitle %}Hole List{% endblock %}
{% block content %}
<h5 class="mt-3 mb-1">Hole List</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Posts</th>
<th>Followers</th>
<th>Blockers</th>
<th>Created on</th>
</tr>
</thead>
{% for hole, count in subs %}
<tr>
<td>{{loop.index}}</td>
<td><a href="/h/{{hole}}">{{hole}} {% if hole.name in v.hole_blocks %}<span class="text-danger">[blocked, visit it to unblock it]</span>{% endif %}</a></td>
<td><a href="/h/{{hole}}">{{count}}</a></td>
<td><a href="/h/{{hole}}/followers">{{hole.follow_num}}</a></td>
{% if hole.stealth %}
<td>{{total_users - hole.join_num}}</td>
{% else %}
<td><a href="/h/{{hole}}/blockers">{{hole.block_num}}</a></td>
{% endif %}
<td data-time="{{hole.created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
<h5 class="mt-3 mb-1">Hole List</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Posts</th>
<th>Followers</th>
<th>Blockers</th>
<th>Created on</th>
</tr>
</thead>
{% for hole, count in subs %}
<tr>
<td>{{loop.index}}</td>
<td><a href="/h/{{hole}}">{{hole}} {% if hole.name in v.hole_blocks %}<span class="text-danger">[blocked, visit it to unblock it]</span>{% endif %}</a></td>
<td><a href="/h/{{hole}}">{{count}}</a></td>
<td><a href="/h/{{hole}}/followers">{{hole.follow_num}}</a></td>
{% if hole.stealth %}
<td>{{total_users - hole.join_num}}</td>
{% else %}
<td><a href="/h/{{hole}}/blockers">{{hole.block_num}}</a></td>
{% endif %}
<td data-time="{{hole.created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -1,44 +1,42 @@
{% extends "default.html" %}
{% block pagetitle %}/h/{{hole}} Mods{% endblock %}
{% block content %}
<script defer src="{{'js/remove_mod.js' | asset}}"></script>
<script defer src="{{'js/remove_mod.js' | asset}}"></script>
<h5 class="mt-2">/h/{{hole}} Mods</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Mod since</th>
<th class="disable-sort-click"></th>
</tr>
</thead>
{% for user, mod in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td data-time="{{mod.created_utc}}"></td>
<td>
{% if v.id == user.id or v.mod_date(hole.name) and v.mod_date(hole.name) < mod.created_utc %}
<form action="/h/{{hole}}/remove_mod" method="post" data-nonce="{{g.nonce}}" data-onsubmit="removeMod(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input hidden name="uid" value="{{user.id}}">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="{% if v.id == user.id %}Resign{% else %}Remove Mod{% endif %}">
</form>
{% endif %}
</td>
</tr>
{% endfor %}
<h5 class="mt-2">/h/{{hole}} Mods</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Mod since</th>
<th class="disable-sort-click"></th>
</tr>
</thead>
{% for user, mod in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td data-time="{{mod.created_utc}}"></td>
<td>
{% if v.id == user.id or v.mod_date(hole.name) and v.mod_date(hole.name) < mod.created_utc %}
<form action="/h/{{hole}}/remove_mod" method="post" data-nonce="{{g.nonce}}" data-onsubmit="removeMod(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input hidden name="uid" value="{{user.id}}">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="{% if v.id == user.id %}Resign{% else %}Remove Mod{% endif %}">
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% if v.mods(hole.name) %}
<form action="/h/{{hole}}/add_mod" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input 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 autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add Mod" style="margin-bottom: 5px">
</form>
{% endif %}
</table>
{% if v.mods(hole.name) %}
<form action="/h/{{hole}}/add_mod" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input 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 autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add Mod" style="margin-bottom: 5px">
</form>
{% endif %}
{% endblock %}

View File

@ -2,115 +2,114 @@
{% block pagetitle %}/h/{{hole}} Settings{% endblock %}
{% block content %}
<div class="title mt-5">
<label class="text-lg" for="stealth">Stealth Mode</label>
</div>
<div class="d-inline-block w-lg-100 pt-1 pt-lg-3">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="stealth" name="stealth" {% if hole.stealth %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this,'/h/{{hole}}/stealth')">
<label class="custom-control-label" for="stealth"></label>
<div class="title mt-5">
<label class="text-lg" for="stealth">Stealth Mode</label>
</div>
<span class="text-small text-muted">
Make this hole blocked by default (users can visit it to unblock it).
</span>
</div>
<h5 class="mt-5">Marsey</h5>
<div class="settings-section rounded">
<img loading="lazy" alt="sub marsey picture" src="{{hole.marsey_url}}" style="max-width:100px">
<form class="d-inline-block" action="/h/{{hole}}/marsey_image" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="marsey" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
<div class="text-small text-muted mt-3">
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.
<div class="d-inline-block w-lg-100 pt-1 pt-lg-3">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="stealth" name="stealth" {% if hole.stealth %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this,'/h/{{hole}}/stealth')">
<label class="custom-control-label" for="stealth"></label>
</div>
<span class="text-small text-muted">
Make this hole blocked by default (users can visit it to unblock it).
</span>
</div>
</div>
<h5 class=" mt-5">Sidebar Picture</h5>
<div class="settings-section rounded">
<img class="mr-3" loading="lazy" alt="sub sidebar picture" src="{{hole.sidebar_url}}" style="max-width:min(300px,100%)">
<form class="d-inline-block mt-2" action="/h/{{hole}}/sidebar_image" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="sidebar" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
<div class="text-small text-muted mt-3">
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.
<h5 class="mt-5">Marsey</h5>
<div class="settings-section rounded">
<img loading="lazy" alt="sub marsey picture" src="{{hole.marsey_url}}" style="max-width:100px">
<form class="d-inline-block" action="/h/{{hole}}/marsey_image" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="marsey" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
<div class="text-small text-muted mt-3">
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.
</div>
</div>
</div>
<h5 class="mt-5">Banners</h5>
<div class="settings-section rounded hole-banner-update-section">
{% for banner in hole.banner_urls %}
<section id="hole-banner-update-{{loop.index - 1}}" class="mt-5 d-block hole-settings-subsection">
<img class="mr-3" loading="lazy" alt="/h/{{hole.name}} banner" src="{{banner}}" style="max-height:300px;max-width:100%">
<button class="btn btn-danger hole-banner-delete-button mt-2" id="hole-banner-delete-{{loop.index}}" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-areyousure="postToastReload(this, '/h/{{hole.name}}/settings/banners/delete/{{loop.index - 1}}')">Delete</button>
</section>
{% else %}
<section id="hole-banner-no-banners" class="d-block hole-settings-subsection">
{{macros.ghost_box("No banners uploaded", "", 2, "flex:1")}}
</section>
{% endfor %}
{% if not g.is_tor %}
<section id="hole-banner-upload-new" class="mt-5 hole-settings-subsection">
<form class="d-inline-block" action="/h/{{hole.name}}/settings/banners/" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload New Banner<input autocomplete="off" type="file" accept="image/*" hidden name="banner" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
<button type="button" class="btn btn-danger hole-banner-delete-button" id="hole-banner-delete-all" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-areyousure="postToastReload(this, '/h/{{hole.name}}/settings/banners/delete_all')">Delete All Banners</button>
<div class="text-small text-muted mt-3">
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.
</div>
</section>
{% endif %}
</div>
<h5 class=" mt-5">Sidebar Picture</h5>
<div class="settings-section rounded">
<img class="mr-3" loading="lazy" alt="sub sidebar picture" src="{{hole.sidebar_url}}" style="max-width:min(300px,100%)">
<form class="d-inline-block mt-2" action="/h/{{hole}}/sidebar_image" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="sidebar" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
<div class="text-small text-muted mt-3">
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.
</div>
</div>
<div class="row my-5 pt-5">
<div class="col col-md-8">
<div class="settings">
<div id="description">
<h2>Edit Sidebar</h2><br>
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="sidebar" action="/h/{{hole}}/sidebar" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" maxlength="10000" class="form-control rounded" id="bio-text" placeholder="Enter sidebar here..." rows="10" name="sidebar" form="sidebar">{% if hole.sidebar %}{{hole.sidebar}}{% endif %}</textarea>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
<h5 class="mt-5">Banners</h5>
<div class="settings-section rounded hole-banner-update-section">
{% for banner in hole.banner_urls %}
<section id="hole-banner-update-{{loop.index - 1}}" class="mt-5 d-block hole-settings-subsection">
<img class="mr-3" loading="lazy" alt="/h/{{hole.name}} banner" src="{{banner}}" style="max-height:300px;max-width:100%">
<button class="btn btn-danger hole-banner-delete-button mt-2" id="hole-banner-delete-{{loop.index}}" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-areyousure="postToastReload(this, '/h/{{hole.name}}/settings/banners/delete/{{loop.index - 1}}')">Delete</button>
</section>
{% else %}
<section id="hole-banner-no-banners" class="d-block hole-settings-subsection">
{{macros.ghost_box("No banners uploaded", "", 2, "flex:1")}}
</section>
{% endfor %}
{% if not g.is_tor %}
<section id="hole-banner-upload-new" class="mt-5 hole-settings-subsection">
<form class="d-inline-block" action="/h/{{hole.name}}/settings/banners/" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload New Banner<input autocomplete="off" type="file" accept="image/*" hidden name="banner" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
<button type="button" class="btn btn-danger hole-banner-delete-button" id="hole-banner-delete-all" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-areyousure="postToastReload(this, '/h/{{hole.name}}/settings/banners/delete_all')">Delete All Banners</button>
<div class="text-small text-muted mt-3">
All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.
</div>
</section>
{% endif %}
</div>
<div class="row my-5 pt-5">
<div class="col col-md-8">
<div class="settings">
<div id="description">
<h2>Edit Sidebar</h2><br>
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="sidebar" action="/h/{{hole}}/sidebar" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" maxlength="10000" class="form-control rounded" id="bio-text" placeholder="Enter sidebar here..." rows="10" name="sidebar" form="sidebar">{% if hole.sidebar %}{{hole.sidebar}}{% endif %}</textarea>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col col-md-8">
<div class="settings">
<div id="description">
<h2>Edit CSS</h2><br>
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="css" action="/h/{{hole}}/css" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" maxlength="6000" class="form-control rounded" id="bio-text" placeholder="Enter css here..." rows="10" name="css" form="css">{% if css %}{{css}}{% endif %}</textarea>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
<div class="row">
<div class="col col-md-8">
<div class="settings">
<div id="description">
<h2>Edit CSS</h2><br>
</div>
<div class="body d-lg-flex">
<div class="w-lg-100">
<form id="css" action="/h/{{hole}}/css" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" maxlength="6000" class="form-control rounded" id="bio-text" placeholder="Enter css here..." rows="10" name="css" form="css">{% if css %}{{css}}{% endif %}</textarea>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% extends "default.html" %}
{% block title %}
{% if hole %}
<title>/h/{{hole.name}}</title>
@ -12,119 +13,119 @@
{{super()}}
{% endif %}
{% endblock %}
{% block pagetitle %}{{SITE_NAME if not hole else '/h/' ~ hole.name}}{% endblock %}
{% block head_final %}
{% set preview = hole.siderbarurl if hole and hole.sidebarurl else hole.bannerurl %}
{% if hole %}
<meta property="og:type" content="article">
<meta property="og:title" content="/h/{{hole}}">
<meta property="og:site_name" content="{{SITE}}">
<meta property="og:image" content="{{preview}}">
<meta property="og:url" content="{{request.full_path}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}">
{% set preview = hole.siderbarurl if hole and hole.sidebarurl else hole.bannerurl %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="/h/{{hole.name}}">
<meta name="twitter:creator" content="{{SITE_FULL}}">
<meta name="twitter:image" content="{{preview}}">
<meta name="twitter:url" content="{{request.full_path}}">
{% endif %}
{% if hole.sidebar %}
<meta property="og:description" name="description" content="{{hole.sidebar}}">
<meta name="twitter:description" content="{{hole.sidebar}}">
{% endif %}
{% if hole %}
<meta property="og:type" content="article">
<meta property="og:title" content="/h/{{hole}}">
<meta property="og:site_name" content="{{SITE}}">
<meta property="og:image" content="{{preview}}">
<meta property="og:url" content="{{request.full_path}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="/h/{{hole.name}}">
<meta name="twitter:creator" content="{{SITE_FULL}}">
<meta name="twitter:image" content="{{preview}}">
<meta name="twitter:url" content="{{request.full_path}}">
{% endif %}
{% if hole.sidebar %}
<meta property="og:description" name="description" content="{{hole.sidebar}}">
<meta name="twitter:description" content="{{hole.sidebar}}">
{% endif %}
{% endblock %}
{% block desktopBanner %}
{%- set search_placeholder = "Search" -%}
{%- if hole -%}
{%- set search_placeholder = "Search (try 'hole:" ~ hole.name ~ "')" -%}
{%- endif -%}
<div class="row" style="overflow: visible;padding-top:5px">
<div class="col">
<form id="searchform" class="form-inline d-md-none search flex-nowrap mt-2" action="/search/posts" method="get">
<input autocomplete="off" class="form-control form-control-sm w-100" type="search" placeholder="{{search_placeholder}}" name="q">
<span class="input-group-append">
<span class="input-group-text border-0 bg-transparent" style="margin-left: -2.5rem" data-nonce="{{g.nonce}}" onclick_submit>
<i class="fa fa-search"></i>
{%- set search_placeholder = "Search" -%}
{%- if hole -%}
{%- set search_placeholder = "Search (try 'hole:" ~ hole.name ~ "')" -%}
{%- endif -%}
<div class="row" style="overflow: visible;padding-top:5px">
<div class="col">
<form id="searchform" class="form-inline d-md-none search flex-nowrap mt-2" action="/search/posts" method="get">
<input autocomplete="off" class="form-control form-control-sm w-100" type="search" placeholder="{{search_placeholder}}" name="q">
<span class="input-group-append">
<span class="input-group-text border-0 bg-transparent" style="margin-left: -2.5rem" data-nonce="{{g.nonce}}" onclick_submit>
<i class="fa fa-search"></i>
</span>
</span>
</span>
</form>
</form>
<a class="btn btn-primary btn-block mt-3" href="{% if hole %}/h/{{hole}}{% endif %}/submit"><i class="fas fa-feather-alt mr-2"></i>Create Post {% if hole %}in /h/{{hole}}{% endif %}</a>
<a class="btn btn-primary btn-block mt-3" href="{% if hole %}/h/{{hole}}{% endif %}/submit"><i class="fas fa-feather-alt mr-2"></i>Create Post {% if hole %}in /h/{{hole}}{% endif %}</a>
{% if hole %}
{% if v %}
{% if hole.stealth %}
<button type="button" id="unsubscribe-sub" class="btn btn-primary btn-block {% if not v.subscribes(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/unsubscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block /h/{{hole.name}}</button>
<button type="button" id="subscribe-sub" class="btn btn-primary btn-block {% if v.subscribes(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/subscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock /h/{{hole.name}}</button>
{% if hole %}
{% if v %}
{% if hole.stealth %}
<button type="button" id="unsubscribe-sub" class="btn btn-primary btn-block {% if not v.subscribes(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/unsubscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block /h/{{hole.name}}</button>
<button type="button" id="subscribe-sub" class="btn btn-primary btn-block {% if v.subscribes(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/subscribe','subscribe-sub','unsubscribe-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock /h/{{hole.name}}</button>
{% else %}
<button type="button" id="block-sub" class="btn btn-primary btn-block mt-3 {% if v.blocks(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/block','block-sub','unblock-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block /h/{{hole.name}}</button>
<button type="button" id="unblock-sub" class="btn btn-primary btn-block mt-3 {% if not v.blocks(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/unblock','block-sub','unblock-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock /h/{{hole.name}}</button>
{% endif %}
<button type="button" id="follow-sub" class="btn btn-primary btn-follow {% if v.follows(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/follow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell mr-2"></i>Follow /h/{{hole.name}}</button>
<button type="button" id="unfollow-sub" class="btn btn-primary btn-follow {% if not v.follows(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/unfollow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell-slash mr-2"></i>Unfollow /h/{{hole.name}}</button>
{% else %}
<button type="button" id="block-sub" class="btn btn-primary btn-block mt-3 {% if v.blocks(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/block','block-sub','unblock-sub','d-none')"><i class="fas fa-eye-slash mr-2"></i>Block /h/{{hole.name}}</button>
<button type="button" id="unblock-sub" class="btn btn-primary btn-block mt-3 {% if not v.blocks(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/unblock','block-sub','unblock-sub','d-none')"><i class="fas fa-eye mr-2"></i>Unblock /h/{{hole.name}}</button>
<a class="btn btn-primary btn-block" href="/login?redirect={{request.full_path | urlencode}}"><i class="fas fa-eye-slash mr-2"></i>Block /h/{{hole.name}}</a>
<a class="btn btn-primary btn-block" href="/login?redirect={{request.full_path | urlencode}}"><i class="fas fa-bell mr-2"></i>Follow /h/{{hole.name}}</a>
{% endif %}
<button type="button" id="follow-sub" class="btn btn-primary btn-follow {% if v.follows(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/follow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell mr-2"></i>Follow /h/{{hole.name}}</button>
<button type="button" id="unfollow-sub" class="btn btn-primary btn-follow {% if not v.follows(hole.name) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/h/{{hole.name}}/unfollow','follow-sub','unfollow-sub','d-none')"><i class="fas fa-bell-slash mr-2"></i>Unfollow /h/{{hole.name}}</button>
{% else %}
<a class="btn btn-primary btn-block" href="/login?redirect={{request.full_path | urlencode}}"><i class="fas fa-eye-slash mr-2"></i>Block /h/{{hole.name}}</a>
<a class="btn btn-primary btn-block" href="/login?redirect={{request.full_path | urlencode}}"><i class="fas fa-bell mr-2"></i>Follow /h/{{hole.name}}</a>
{% endif %}
{% endif %}
<div class="d-flex justify-content-between align-items-center pt-3 pb-2 sorting fl-r">
<div class="d-flex justify-content-between align-items-center pt-3 pb-2 sorting fl-r">
{% block navbar %}
<div class="d-flex align-items-center">
{% set pcolor = "primary" if pins else "secondary" %}
<form action="/toggle_pins/{{hole}}/{{sort}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<button type="submit" class="btn btn-{{pcolor}} text-{{pcolor}} mx-2"><i type="submit" class="fas fas fa-thumbtack fa-rotate--45 mr-2"></i>Pins</button>
</form>
{% block navbar %}
<div class="d-flex align-items-center">
{% set pcolor = "primary" if pins else "secondary" %}
<form action="/toggle_pins/{{hole}}/{{sort}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<button type="submit" class="btn btn-{{pcolor}} text-{{pcolor}} mx-2"><i type="submit" class="fas fas fa-thumbtack fa-rotate--45 mr-2"></i>Pins</button>
</form>
{%- import 'util/macros.html' as macros with context -%}
{{- macros.time_filter_buttons() -}}
{{- macros.sorting_buttons(POST_SORTS, True) -}}
</div>
{% endblock %}
{%- import 'util/macros.html' as macros with context -%}
{{- macros.time_filter_buttons() -}}
{{- macros.sorting_buttons(POST_SORTS, True) -}}
</div>
{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block PseudoSubmitForm %}{% endblock %}
{% block content %}
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %}">
<div class="col-12">
<div class="posts">
{% include "post_listing.html" %}
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %}">
<div class="col-12">
<div class="posts">
{% include "post_listing.html" %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block pagenav %}
{% if listing %}
{% include "pagination.html" %}
{% endif %}
{% if listing %}
{% include "pagination.html" %}
{% endif %}
{% if request.path == '/' and v %}
<script defer src="{{'js/register_service_worker.js' | asset}}"></script>
{% endif %}
{% if request.path == '/' and v %}
<script defer src="{{'js/register_service_worker.js' | asset}}"></script>
{% endif %}
{% if request.path == '/' and g.browser != 'webview' and time.time() > session.get('tooltip_dismissed',0)+86400*30 %}
<div id="mobile-prompt-container" class="fixed-top">
<div id="mobile-prompt" data-bs-toggle="tooltip" data-bs-container="#mobile-prompt-container" data-bs-placement="top" data-bs-trigger="click" data-bs-html="true" title="<i class='dismiss-beg fas fa-x'></i>Click me to install the {{SITE_NAME}} mobile app{% if g.browser == 'iphone' %} and be able to enable push notifications{% endif %}"></div>
</div>
{% if request.path == '/' and g.browser != 'webview' and time.time() > session.get('tooltip_dismissed',0)+86400*30 %}
<div id="mobile-prompt-container" class="fixed-top">
<div id="mobile-prompt" data-bs-toggle="tooltip" data-bs-container="#mobile-prompt-container" data-bs-placement="top" data-bs-trigger="click" data-bs-html="true" title="<i class='dismiss-beg fas fa-x'></i>Click me to install the {{SITE_NAME}} mobile app{% if g.browser == 'iphone' %} and be able to enable push notifications{% endif %}"></div>
</div>
<script defer src="{{'js/mobile_prompt.js' | asset}}"></script>
{% endif %}
{% if FP and request.path == '/' and v and not v.fp %}
<script defer src="{{'js/fp.js' | asset}}"></script>
{% endif %}
<script defer src="{{'js/mobile_prompt.js' | asset}}"></script>
{% endif %}
{% if FP and request.path == '/' and v and not v.fp %}
<script defer src="{{'js/fp.js' | asset}}"></script>
{% endif %}
{% endblock %}

View File

@ -29,5 +29,5 @@
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -24,30 +24,30 @@
{% endmacro %}
{% macro leaderboard_table(lb) %}
<h5 class="font-weight-bolder text-center pt-2 pb-3"><span id="leaderboard-{{lb.html_id}}">{% if lb.desc %}Top{% else %}Bottom{% endif %} {{lb.limit}} {% if lb.table_header_name != 'most blocked' %}by{% endif %} {{lb.table_header_name}}</span></h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>{{lb.table_column_name}}</th>
</tr>
</thead>
<tbody>
{% for user in lb.all_users %}
{% set user2 = lb.user_func(user) %}
{% if v.id == user2.id %}
{% set style="class=\"self\"" %}
<h5 class="font-weight-bolder text-center pt-2 pb-3"><span id="leaderboard-{{lb.html_id}}">{% if lb.desc %}Top{% else %}Bottom{% endif %} {{lb.limit}} {% if lb.table_header_name != 'most blocked' %}by{% endif %} {{lb.table_header_name}}</span></h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>{{lb.table_column_name}}</th>
</tr>
</thead>
<tbody>
{% for user in lb.all_users %}
{% set user2 = lb.user_func(user) %}
{% if v.id == user2.id %}
{% set style="class=\"self\"" %}
{% endif %}
{{format_user_in_table(user2, style, loop.index, lb.value_func(user), lb.user_relative_url)}}
{% endfor %}
{% if lb.v_position and not lb.v_appears_in_ranking %}
{{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", lb.v_position, lb.v_value, lb.user_relative_url)}}
{% endif %}
{{format_user_in_table(user2, style, loop.index, lb.value_func(user), lb.user_relative_url)}}
{% endfor %}
{% if lb.v_position and not lb.v_appears_in_ranking %}
{{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", lb.v_position, lb.v_value, lb.user_relative_url)}}
{% endif %}
</tbody>
</table>
</div>
</tbody>
</table>
</div>
{% endmacro %}
{% for lb in leaderboards %}

View File

@ -1,92 +1,92 @@
{% extends "settings2.html" %}
{% block pagetitle %}Moderation Log{% endblock %}
{% block content %}
<div class="row justify-content-around">
<div class="col h-100">
<div class="justify-content-between">
<div>
<h5 class="font-weight-bolder text-center pt-2 pb-3">{% if hole %}<a href="/h/{{hole.name}}">/h/{{hole.name}}</a> {% endif %}<span>Moderation Log</span></h5>
</div>
</div>
<div class="row" style="overflow: visible;padding-top:5px">
<div class="col">
<div class="d-flex justify-content-between align-items-center">
{% block navbar %}
<div class="d-flex align-items-center mb-3 ml-auto">
<div class="dropdown dropdown-actions">
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton" data-bs-toggle="dropdown">
{% if admin %}<img loading="lazy" src="/@{{admin}}/pic" alt="avatar" class="profile-pic-20 mr-2">{{admin}}{% else %}<img loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseyjanny.webp" alt="avatar" class="profile-pic-20 mr-2">All{% endif %}
</button>
<div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px); max-height: 50vh;
overflow: auto">
<a class="dropdown-item" href="{% if hole %}/h/{{hole}}{% endif %}/log{% if type %}?kind={{type}}{% endif %}"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseyjanny.webp" alt="avatar" class="profile-pic-20 mr-2">All</a>
{% for a in admins %}
<a class="dropdown-item" href="{% if hole %}/h/{{hole}}{% endif %}/log?{{single_user_url}}={{a}}{% if type %}&kind={{type}}{% endif %}"><img loading="lazy" src="/@{{a}}/pic" alt="avatar" class="profile-pic-20 mr-2">{{a}}</a>
{% endfor %}
</div>
</div>
<div class="dropdown dropdown-actions ml-3">
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton2" data-bs-toggle="dropdown">
{% if type %}<i class="fas {{types[type]['icon']}} mr-2"></i>{{type}}{% else %}<i class="fas fa-broom mr-2"></i>All{% endif %}
</button>
<div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px); max-height: 50vh;
overflow: auto">
<a class="dropdown-item" href="{% if hole %}/h/{{hole}}{% endif %}/log{% if admin %}?{{single_user_url}}={{admin}}{% endif %}"><i class="fas fa-broom mr-2"></i>All</a>
{% for t, v in types.items() %}
<a class="dropdown-item" href="{% if hole %}/h/{{hole}}{% endif %}/log?{% if admin %}{{single_user_url}}={{admin}}&{% endif %}kind={{t}}"><i class="fas {{v['icon']}} mr-2"></i>{{t}}</a>
{% endfor %}
</div>
</div>
</div>
{% endblock %}
<div class="row justify-content-around">
<div class="col h-100">
<div class="justify-content-between">
<div>
<h5 class="font-weight-bolder text-center pt-2 pb-3">{% if hole %}<a href="/h/{{hole.name}}">/h/{{hole.name}}</a> {% endif %}<span>Moderation Log</span></h5>
</div>
</div>
</div>
<div class="rounded border mx-auto">
{% for ma in actions %}
<div id="action-{{ma.id}}" class="modlog-action{% if ma.unread %} unread{% endif %}">
<div class="d-flex flex-grow-1 align-items-center">
<div class="d-flex align-items-center justify-content-center {{ma.color}} mr-3 rounded-lg flex-shrink-0" style="width: 32px;height: 32px"><i class="fas text-center {{ma.icon}} text-lg text-white fa-fw"></i></div>
<div class="d-flex align-items-center">
<span class="rounded">
<div class="profile-pic-35-wrapper">
<img loading="lazy" src="{{ma.user.profile_url}}" alt="avatar" class="profile-pic-35">
{% if ma.user.hat_active(v)[0] -%}
<img id="profile-pic-35-hat" class="profile-pic-35-hat hat" loading="lazy" src="{{ma.user.hat_active(v)[0]}}?x=6" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ma.user.hat_active(v)[1]}}">
{%- endif %}
<div class="row" style="overflow: visible;padding-top:5px">
<div class="col">
<div class="d-flex justify-content-between align-items-center">
{% block navbar %}
<div class="d-flex align-items-center mb-3 ml-auto">
<div class="dropdown dropdown-actions">
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton" data-bs-toggle="dropdown">
{% if admin %}<img loading="lazy" src="/@{{admin}}/pic" alt="avatar" class="profile-pic-20 mr-2">{{admin}}{% else %}<img loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseyjanny.webp" alt="avatar" class="profile-pic-20 mr-2">All{% endif %}
</button>
<div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px); max-height: 50vh;
overflow: auto">
<a class="dropdown-item" href="{% if hole %}/h/{{hole}}{% endif %}/log{% if type %}?kind={{type}}{% endif %}"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseyjanny.webp" alt="avatar" class="profile-pic-20 mr-2">All</a>
{% for a in admins %}
<a class="dropdown-item" href="{% if hole %}/h/{{hole}}{% endif %}/log?{{single_user_url}}={{a}}{% if type %}&kind={{type}}{% endif %}"><img loading="lazy" src="/@{{a}}/pic" alt="avatar" class="profile-pic-20 mr-2">{{a}}</a>
{% endfor %}
</div>
</div>
<div class="dropdown dropdown-actions ml-3">
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton2" data-bs-toggle="dropdown">
{% if type %}<i class="fas {{types[type]['icon']}} mr-2"></i>{{type}}{% else %}<i class="fas fa-broom mr-2"></i>All{% endif %}
</button>
<div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px); max-height: 50vh;
overflow: auto">
<a class="dropdown-item" href="{% if hole %}/h/{{hole}}{% endif %}/log{% if admin %}?{{single_user_url}}={{admin}}{% endif %}"><i class="fas fa-broom mr-2"></i>All</a>
{% for t, v in types.items() %}
<a class="dropdown-item" href="{% if hole %}/h/{{hole}}{% endif %}/log?{% if admin %}{{single_user_url}}={{admin}}&{% endif %}kind={{t}}"><i class="fas {{v['icon']}} mr-2"></i>{{t}}</a>
{% endfor %}
</div>
</div>
</div>
</span>
<div class="text-muted pl-3">
<div>
<a href="{{ma.user.url}}" class="font-weight-bold text-black" target="_self">@{{ma.user.username}}</a>
<span>{{ma.string | safe}}</span>
</div>
<div class="text-gray-500">
<span class="log--item-age" id="{{ma.id}}-age" data-bs-toggle="tooltip" data-bs-placement="bottom" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{ma.created_utc}}')">{{ma.age_string}}</span>
<a href="{{ma.permalink}}"><i class="fas fa-link ml-3 text-muted"></i></a>
<button type="button" class="copy-link ml-3" data-clipboard-text="{{ma.permalink}}"><i class="fas fa-copy text-muted"></i></button>
{% endblock %}
</div>
</div>
</div>
<div class="rounded border mx-auto">
{% for ma in actions %}
<div id="action-{{ma.id}}" class="modlog-action{% if ma.unread %} unread{% endif %}">
<div class="d-flex flex-grow-1 align-items-center">
<div class="d-flex align-items-center justify-content-center {{ma.color}} mr-3 rounded-lg flex-shrink-0" style="width: 32px;height: 32px"><i class="fas text-center {{ma.icon}} text-lg text-white fa-fw"></i></div>
<div class="d-flex align-items-center">
<span class="rounded">
<div class="profile-pic-35-wrapper">
<img loading="lazy" src="{{ma.user.profile_url}}" alt="avatar" class="profile-pic-35">
{% if ma.user.hat_active(v)[0] -%}
<img id="profile-pic-35-hat" class="profile-pic-35-hat hat" loading="lazy" src="{{ma.user.hat_active(v)[0]}}?x=6" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ma.user.hat_active(v)[1]}}">
{%- endif %}
</div>
</span>
<div class="text-muted pl-3">
<div>
<a href="{{ma.user.url}}" class="font-weight-bold text-black" target="_self">@{{ma.user.username}}</a>
<span>{{ma.string | safe}}</span>
</div>
<div class="text-gray-500">
<span class="log--item-age" id="{{ma.id}}-age" data-bs-toggle="tooltip" data-bs-placement="bottom" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{ma.created_utc}}')">{{ma.age_string}}</span>
<a href="{{ma.permalink}}"><i class="fas fa-link ml-3 text-muted"></i></a>
<button type="button" class="copy-link ml-3" data-clipboard-text="{{ma.permalink}}"><i class="fas fa-copy text-muted"></i></button>
</div>
</div>
</div>
</div>
</div>
{% else %}
<div class="p-3">There's nothing here right now.</div>
{% endfor %}
</div>
{% else %}
<div class="p-3">There's nothing here right now.</div>
{% endfor %}
{% include "pagination.html" %}
</div>
{% include "pagination.html" %}
</div>
</div>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
</div>
</div>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
{% endblock %}

View File

@ -3,13 +3,13 @@
{% block authtitle %}Reset your password.{% endblock %}
{% block authtext %}If there's an email address associated with your account, you can use it to recover your {{SITE_NAME}} account and change your password.{% endblock %}
{% block content %}
<div id="login-form">
<form action="/forgot" method="post" class="mt-3">
<label for="username" class="mt-3">Username</label>
<input autocomplete="off" class="form-control" id="username" type="text" name="username" required>
<label for="email" class="mt-3">Email</label>
<input type="email" autocomplete="off" class="form-control" id="password" name="email" required>
<input autocomplete="off" class="btn btn-primary login w-100 mt-3" type="submit" value="Send recovery link">
</form>
</div>
<div id="login-form">
<form action="/forgot" method="post" class="mt-3">
<label for="username" class="mt-3">Username</label>
<input autocomplete="off" class="form-control" id="username" type="text" name="username" required>
<label for="email" class="mt-3">Email</label>
<input type="email" autocomplete="off" class="form-control" id="password" name="email" required>
<input autocomplete="off" class="btn btn-primary login w-100 mt-3" type="submit" value="Send recovery link">
</form>
</div>
{% endblock %}

View File

@ -8,25 +8,25 @@
{% block authtitle %}Welcome back.{% endblock %}
{% block authtext %}Glad to have you back!{% endblock %}
{% block content %}
<div id="login-form">
{%- set error_text -%}
Incorrect username, email address, or password.<br>
<a href="/forgot" class="alert-link">Forgot password?</a>
{%- endset -%}
{% if failed %}{{macros.alert(error_text, true)}}{% endif %}
<form action="/login" method="post" class="mt-md-3" id="login">
<label for="username" class="mt-3">Username or Email Address</label>
<input autocomplete="off" class="form-control" id="username"
type="text" name="username" required>
<input hidden name="redirect" value="{{redirect}}">
<label for="password" class="mt-3">Password</label>
<input autocomplete="off" class="form-control" id="password"
type="password" name="password" required>
<small class="d-block my-3"><a href="/forgot">Forgot password?</a></small>
<button type="submit" class="btn btn-primary login w-100 mt-3" id="login_button">Sign In</button>
<div class="text-center text-muted text-small mt-3 mb-5 pb-5">
Don't have an account? <a href="/signup{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Sign up</a>
</div>
</form>
</div>
<div id="login-form">
{%- set error_text -%}
Incorrect username, email address, or password.<br>
<a href="/forgot" class="alert-link">Forgot password?</a>
{%- endset -%}
{% if failed %}{{macros.alert(error_text, true)}}{% endif %}
<form action="/login" method="post" class="mt-md-3" id="login">
<label for="username" class="mt-3">Username or Email Address</label>
<input autocomplete="off" class="form-control" id="username"
type="text" name="username" required>
<input hidden name="redirect" value="{{redirect}}">
<label for="password" class="mt-3">Password</label>
<input autocomplete="off" class="form-control" id="password"
type="password" name="password" required>
<small class="d-block my-3"><a href="/forgot">Forgot password?</a></small>
<button type="submit" class="btn btn-primary login w-100 mt-3" id="login_button">Sign In</button>
<div class="text-center text-muted text-small mt-3 mb-5 pb-5">
Don't have an account? <a href="/signup{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Sign up</a>
</div>
</form>
</div>
{% endblock %}

View File

@ -6,20 +6,20 @@
{% set root_scope.include_cf_2fa_verify = false %}
{% endblock %}
{% block content %}
<div id="login-form">
<h2>Two-step login</h2>
<p class="text-muted mb-md-5">To login, please enter the 6-digit verification code generated in your authenticator app.</p>
{% if failed %}{{macros.alert('Invalid verification code. Please try again.', true)}}{% endif %}
</div>
<form action="/login" method="post" class="mt-md-3" id="login">
<input hidden name="username" value="{{v.username}}">
<input hidden name="redirect" value="{{redirect}}">
<input hidden name="time" value="{{time}}">
<input hidden name="hash" value="{{hash}}">
<label for="2fa_token" class="mt-3">Your verification code</label>
<input autocomplete="off" class="form-control" id="2fa_token" name="2fa_token" type="number" pattern="[0-9]" inputmode="numeric" placeholder="6-digit code">
<small><a href="/lost_2fa">Lost your two-factor authentication device?</a></small>
<button type="submit" class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
</form>
<script defer src="{{'js/login_2fa.js' | asset}}"></script>
<div id="login-form">
<h2>Two-step login</h2>
<p class="text-muted mb-md-5">To login, please enter the 6-digit verification code generated in your authenticator app.</p>
{% if failed %}{{macros.alert('Invalid verification code. Please try again.', true)}}{% endif %}
</div>
<form action="/login" method="post" class="mt-md-3" id="login">
<input hidden name="username" value="{{v.username}}">
<input hidden name="redirect" value="{{redirect}}">
<input hidden name="time" value="{{time}}">
<input hidden name="hash" value="{{hash}}">
<label for="2fa_token" class="mt-3">Your verification code</label>
<input autocomplete="off" class="form-control" id="2fa_token" name="2fa_token" type="number" pattern="[0-9]" inputmode="numeric" placeholder="6-digit code">
<small><a href="/lost_2fa">Lost your two-factor authentication device?</a></small>
<button type="submit" class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
</form>
<script defer src="{{'js/login_2fa.js' | asset}}"></script>
{% endblock %}

View File

@ -3,15 +3,15 @@
{% block authtitle %}Remove the two-factor authentication from your account.{% endblock %}
{% block authtext %}If all information is correct, you will be able to remove 2-factor authentication from your account in 24 hours.{% endblock %}
{% block content %}
<div id="login-form">
<form action="/lost_2fa" method="post" class="mt-3">
<label for="username" class="mt-3">Username</label>
<input autocomplete="off" class="form-control" id="username" type="text" name="username" required{% if v %} value="{{v.username}}" disabled{% endif %}>
<label for="email" class="mt-3">Password</label>
<input autocomplete="off" class="form-control" id="password" type="password" name="password" required>
<label for="email" class="mt-3">Email</label>
<input autocomplete="off" class="form-control" id="password" type="email" name="email" required{% if v %} value="{{v.email}}" disabled{% endif %}>
<input autocomplete="off" class="btn btn-primary login w-100 mt-3" type="submit" value="Send recovery link">
</form>
</div>
<div id="login-form">
<form action="/lost_2fa" method="post" class="mt-3">
<label for="username" class="mt-3">Username</label>
<input autocomplete="off" class="form-control" id="username" type="text" name="username" required{% if v %} value="{{v.username}}" disabled{% endif %}>
<label for="email" class="mt-3">Password</label>
<input autocomplete="off" class="form-control" id="password" type="password" name="password" required>
<label for="email" class="mt-3">Email</label>
<input autocomplete="off" class="form-control" id="password" type="email" name="email" required{% if v %} value="{{v.email}}" disabled{% endif %}>
<input autocomplete="off" class="btn btn-primary login w-100 mt-3" type="submit" value="Send recovery link">
</form>
</div>
{% endblock %}

View File

@ -2,16 +2,16 @@
{% block pagetitle %}{{SITE_NAME}} Password Reset{% endblock %}
{% block authtitle %}Change your password.{% endblock %}
{% block content %}
<div id="login-form">
<form action="/reset" method="post" class="mt-3">
<input hidden name="time" value="{{time}}">
<input hidden name="user_id" value="{{v.id}}">
<input hidden name="token" value="{{token}}">
<label for="passentry" class="mt-3">New Password</label>
<input autocomplete="off" class="form-control" id="passentry" type="password" minlength="8" maxlength="100" name="password" required>
<label for="confentry" class="mt-3">Confirm New Password</label>
<input autocomplete="off" class="form-control" id="confentry" type="password" minlength="8" maxlength="100" name="confirm_password" required>
<input autocomplete="off" class="btn btn-primary login w-100 mt-3" type="submit" value="Change password">
</form>
</div>
<div id="login-form">
<form action="/reset" method="post" class="mt-3">
<input hidden name="time" value="{{time}}">
<input hidden name="user_id" value="{{v.id}}">
<input hidden name="token" value="{{token}}">
<label for="passentry" class="mt-3">New Password</label>
<input autocomplete="off" class="form-control" id="passentry" type="password" minlength="8" maxlength="100" name="password" required>
<label for="confentry" class="mt-3">Confirm New Password</label>
<input autocomplete="off" class="form-control" id="confentry" type="password" minlength="8" maxlength="100" name="confirm_password" required>
<input autocomplete="off" class="btn btn-primary login w-100 mt-3" type="submit" value="Change password">
</form>
</div>
{% endblock %}

View File

@ -1,7 +1,8 @@
{%- extends 'login/authforms.html' -%}
{% block pagetitle -%}
{{ref_user.username ~ " invites you to " ~ SITE_NAME if ref_user else "Sign Up"}}
{{ref_user.username ~ " invites you to " ~ SITE_NAME if ref_user else "Sign Up"}}
{%- endblock %}
{% block pagetype %}login{% endblock %}
{% block template_config %}
@ -27,98 +28,99 @@
{% endif %}
{% block content %}
<div id="register-form">
{% if not ref_user and SITE_NAME == 'rDrama' and login_required %}
<img loading="lazy" id="logo" alt="logo" src="{{'logo.webp' | asset_siteimg}}" width=70>
<hr>
<p class="text-muted text-justify mb-3" style="line-height: 1.2em">
Hiiiiii it's your favorite user Carp! We're currently on <span style="font-variant-caps: small-caps">Login Required</span> mode for one of a few reasons:
</p>
<ol style="padding-left: 1.5em">
<li>The site is running really slowly and we think it might be miscreants up to no good, or</li>
<li>It's our monthly 24 hours of login-required-mode to encourage lovely lurkers to become lovely new friends of ours, or</li>
<li>Someone clicked the toggle by mistake lol oops sorry!</li>
</ol>
<p class="text-muted text-justify mb-1" style="line-height: 1.2em">
But that's all fine. Signing up is easy. It takes literally like 4 seconds if you're slow. You don't even need an email! Just pick a username, make up some neat new password where you replace all the e's with 3s or whatever and bam, done, you're in.<br>
Remember to click “Follow” on my profile!
</p>
<p class="text-muted mb-md-2">
I love you.<br>
<em>xoxo carp</em> 💋
</p>
<hr>
{% elif not ref_user and SITE_NAME == 'WPD' and login_required %}
<img loading="lazy" id="logo" alt="logo" src="{{'logo.webp' | asset_siteimg}}" width=70>
<hr>
<p class="text-muted text-justify mb-1" style="line-height: 1.2em">
<strong>Hi you!</strong> &mdash; <span style="font-variant-caps: small-caps">watchpeopledie.tv</span> is currently doing our monthly 24(ish) hours* of "everyone needs to have an account" &mdash; sorry about that! But making an account is actually super easy. <strong>You don't even need an email address!</strong> Literally just pick a username, set a password, and that's that. Bam, done, like 8 seconds, tops.<br>
</p>
<p class="text-muted mb-md-2">
We WANT you with us &#128150;<br>
Please join!
</p>
<hr>
{% endif %}
<form action="/signup" method="post" class="mt-md-3" id="signup">
<div id="register-form">
{% if not ref_user and SITE_NAME == 'rDrama' and login_required %}
<img loading="lazy" id="logo" alt="logo" src="{{'logo.webp' | asset_siteimg}}" width=70>
<hr>
<p class="text-muted text-justify mb-3" style="line-height: 1.2em">
Hiiiiii it's your favorite user Carp! We're currently on <span style="font-variant-caps: small-caps">Login Required</span> mode for one of a few reasons:
</p>
<ol style="padding-left: 1.5em">
<li>The site is running really slowly and we think it might be miscreants up to no good, or</li>
<li>It's our monthly 24 hours of login-required-mode to encourage lovely lurkers to become lovely new friends of ours, or</li>
<li>Someone clicked the toggle by mistake lol oops sorry!</li>
</ol>
<p class="text-muted text-justify mb-1" style="line-height: 1.2em">
But that's all fine. Signing up is easy. It takes literally like 4 seconds if you're slow. You don't even need an email! Just pick a username, make up some neat new password where you replace all the e's with 3s or whatever and bam, done, you're in.<br>
Remember to click “Follow” on my profile!
</p>
<p class="text-muted mb-md-2">
I love you.<br>
<em>xoxo carp</em> 💋
</p>
<hr>
{% elif not ref_user and SITE_NAME == 'WPD' and login_required %}
<img loading="lazy" id="logo" alt="logo" src="{{'logo.webp' | asset_siteimg}}" width=70>
<hr>
<p class="text-muted text-justify mb-1" style="line-height: 1.2em">
<strong>Hi you!</strong> &mdash; <span style="font-variant-caps: small-caps">watchpeopledie.tv</span> is currently doing our monthly 24(ish) hours* of "everyone needs to have an account" &mdash; sorry about that! But making an account is actually super easy. <strong>You don't even need an email address!</strong> Literally just pick a username, set a password, and that's that. Bam, done, like 8 seconds, tops.<br>
</p>
<p class="text-muted mb-md-2">
We WANT you with us &#128150;<br>
Please join!
</p>
<hr>
{% endif %}
<form action="/signup" method="post" class="mt-md-3" id="signup">
<input hidden name="formkey" value="{{formkey}}">
<input hidden name="now" value="{{now}}">
{% if redirect %}<input hidden name="redirect" value="{{redirect}}">{% endif %}
{% if ref_user %}<input hidden name="referred_by" value="{{ref_user.id}}">{% endif %}
<input hidden name="formkey" value="{{formkey}}">
<input hidden name="now" value="{{now}}">
{% if redirect %}<input hidden name="redirect" value="{{redirect}}">{% endif %}
{% if ref_user %}<input hidden name="referred_by" value="{{ref_user.id}}">{% endif %}
<label for="username-register" class="mt-3">Username</label>
<label for="username-register" class="mt-3">Username</label>
<input autocomplete="off" class="form-control" id="username-register" type="text" name="username" pattern="[a-zA-Z0-9_\-]{3,25}" min="3" max="25" required {% if username %}value="{{username}}"{% endif %}>
<small id="usernameHelpRegister"></small>
<input autocomplete="off" class="form-control" id="username-register" type="text" name="username" pattern="[a-zA-Z0-9_\-]{3,25}" min="3" max="25" required {% if username %}value="{{username}}"{% endif %}>
<small id="usernameHelpRegister"></small>
<label for="email-register" class="mt-3 mb-0">Email Address</label>
<label for="email-register" class="mt-3 mb-0">Email Address</label>
<div class="text-small-extra text-muted mb-2">Optional, but you'll need it if you forget your password</div>
<div class="text-small-extra text-muted mb-2">Optional, but you'll need it if you forget your password</div>
<input style="background-color: var(--gray-800)" autocomplete="off" class="form-control" id="email-register" type="email" name="email" readonly data-nonce="{{g.nonce}}" {% if email %}value="{{email}}"{% endif %}>
<input style="background-color: var(--gray-800)" autocomplete="off" class="form-control" id="email-register" type="email" name="email" readonly data-nonce="{{g.nonce}}" {% if email %}value="{{email}}"{% endif %}>
<label for="password-register" class="mt-3">Password</label>
<label for="password-register" class="mt-3">Password</label>
<input autocomplete="off" class="form-control" id="password-register" type="password" minlength="8" maxlength="100" name="password" required>
<small id="passwordHelpRegister" class="form-text font-weight-bold text-muted d-none mt-1">Minimum of 8 characters required.</small>
<small id="passwordHelpSuccess" class="form-text font-weight-bold text-success d-none mt-1">Your password meets the requirements.
</small>
<input autocomplete="off" class="form-control" id="password-register" type="password" minlength="8" maxlength="100" name="password" required>
<small id="passwordHelpRegister" class="form-text font-weight-bold text-muted d-none mt-1">Minimum of 8 characters required.</small>
<small id="passwordHelpSuccess" class="form-text font-weight-bold text-success d-none mt-1">Your password meets the requirements.
</small>
<label for="password_confirm" class="mt-3">Confirm Password</label>
<label for="password_confirm" class="mt-3">Confirm Password</label>
<input autocomplete="off" class="form-control" id="password_confirm" type="password" minlength="8" maxlength="100" name="password_confirm" required>
<div class="custom-control custom-checkbox mt-4">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="termsCheck" required>
<label class="custom-control-label terms" for="termsCheck">
{%- if SITE_NAME == 'rDrama' -%}
I swear lifelong allegiance to the state of Israel.
{%- else -%}
I accept the <a href="/sidebar">rules</a> and I'm 18 or older.
{%- endif -%}
</label>
<input autocomplete="off" class="form-control" id="password_confirm" type="password" minlength="8" maxlength="100" name="password_confirm" required>
<div class="custom-control custom-checkbox mt-4">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="termsCheck" required>
<label class="custom-control-label terms" for="termsCheck">
{%- if SITE_NAME == 'rDrama' -%}
I swear lifelong allegiance to the state of Israel.
{%- else -%}
I accept the <a href="/sidebar">rules</a> and I'm 18 or older.
{%- endif -%}
</label>
</div>
{% if turnstile != DEFAULT_CONFIG_VALUE %}
<div class="cf-turnstile mt-4 mb-2" data-sitekey="{{turnstile}}" data-theme="dark"></div>
{% endif %}
<button type="submit" class="btn btn-primary login w-100 mt-3" id="register_button">Register</button>
<div class="text-center text-muted text-small mt-3 mb-5 pb-5">
Already have an account? <a href="/login{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Log in</a>
</div>
</form>
{% if not ref_user and SITE_NAME == 'WPD' and login_required %}
<p class="text-muted text-justify mb-6" style="line-height: 1.2em; font-size: 10px">
* okay so it's actually whenever I feel like hitting that Login Required button. I'm really sorry, but you have to understand: WE WANT TO BE YOUR FRIEND. And we can't do that unless you join. There's really no reason not to. Like I said, 8 seconds <em>at most</em> to register. What are you worried about? Your email being sold? I don't even know what that means and you don't either. Go ahead, tell me what you'd do if someone said like, "alright bud, go sell your email address to someone." WHAT DOES THAT MEAN? And, again, you really don't even need an email. Just a username and some stupid password. That's <strong>all</strong>. Come on. Peer pressure.
</p>
{% endif %}
</div>
{% if turnstile != DEFAULT_CONFIG_VALUE %}
<div class="cf-turnstile mt-4 mb-2" data-sitekey="{{turnstile}}" data-theme="dark"></div>
{% endif %}
<button type="submit" class="btn btn-primary login w-100 mt-3" id="register_button">Register</button>
<div class="text-center text-muted text-small mt-3 mb-5 pb-5">
Already have an account? <a href="/login{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Log in</a>
</div>
</form>
{% if not ref_user and SITE_NAME == 'WPD' and login_required %}
<p class="text-muted text-justify mb-6" style="line-height: 1.2em; font-size: 10px">
* okay so it's actually whenever I feel like hitting that Login Required button. I'm really sorry, but you have to understand: WE WANT TO BE YOUR FRIEND. And we can't do that unless you join. There's really no reason not to. Like I said, 8 seconds <em>at most</em> to register. What are you worried about? Your email being sold? I don't even know what that means and you don't either. Go ahead, tell me what you'd do if someone said like, "alright bud, go sell your email address to someone." WHAT DOES THAT MEAN? And, again, you really don't even need an email. Just a username and some stupid password. That's <strong>all</strong>. Come on. Peer pressure.
</p>
{% endif %}
</div>
{% endblock %}
{% block scripts %}
<script defer src="{{'js/signup.js' | asset}}"></script>
{% if turnstile != DEFAULT_CONFIG_VALUE %}
<script defer src="https://challenges.cloudflare.com/turnstile/v0/api.js"></script>
{% endif %}
<script defer src="{{'js/signup.js' | asset}}"></script>
{% if turnstile != DEFAULT_CONFIG_VALUE %}
<script defer src="https://challenges.cloudflare.com/turnstile/v0/api.js"></script>
{% endif %}
{% endblock %}

View File

@ -7,17 +7,19 @@
{% endblock %}
{% block authtitle %}Whoops! You can't refer yourself!{% endblock %}
{% block authtext %}Send this link to a friend instead :){% endblock %}
{% block content %}
<label>Referral code</label>
{% set link = SITE_FULL ~ "/signup?ref=" ~ request.values.get('ref') %}
<input autocomplete="off" type="text" class="form-control copy-link" readonly value="{{link}}" data-clipboard-text="{{link}}">
<div class="text-center text-muted text-small mt-3 mb-5 pb-5">
Already have an account? <a href="/login{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Log in</a>
</div>
<label>Referral code</label>
{% set link = SITE_FULL ~ "/signup?ref=" ~ request.values.get('ref') %}
<input autocomplete="off" type="text" class="form-control copy-link" readonly value="{{link}}" data-clipboard-text="{{link}}">
<div class="text-center text-muted text-small mt-3 mb-5 pb-5">
Already have an account? <a href="/login{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Log in</a>
</div>
{% endblock %}
{% block scripts %}
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
{% endblock %}

View File

@ -2,28 +2,92 @@
{% block pagetype %}lottery{% endblock %}
{% block pagetitle %}Lottershe{% endblock %}
{% block content %}
<div>
<div class="lottery-page--wrapper">
<div class="lottery-page--image">
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/lottery.webp?x=6">
<img
id="lotteryTicketPulled"
src="{{SITE_FULL_IMAGES}}/i/lottery_active.webp?x=6"
style="display: none"
>
</div>
<div class="lottery-page--stats">
<div class="lottery-page--stat">
<div class="lottery-page--stat-keys">
<div>Prize</div>
<div>Time Left</div>
<div>Tickets Sold</div>
<div>Participants</div>
</div>
<div class="lottery-page--stat-values">
<div>
<div class="lottery-page--image">
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/lottery.webp?x=6">
<img
id="lotteryTicketPulled"
src="{{SITE_FULL_IMAGES}}/i/lottery_active.webp?x=6"
style="display: none"
>
</div>
<div class="lottery-page--stats">
<div class="lottery-page--stat">
<div class="lottery-page--stat-keys">
<div>Prize</div>
<div>Time Left</div>
<div>Tickets Sold</div>
<div>Participants</div>
</div>
<div class="lottery-page--stat-values">
<div>
<img
id="prize-image"
alt="coins"
class="mr-1 ml-1"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
height="13"
src="{{'coins.webp' | asset_siteimg}}"
title="Coins"
style="display: none; position: relative; top: -2px"
>
<span id="prize">-</span>
</div>
<div id="timeLeft">-</div>
<div id="ticketsSoldThisSession">-</div>
{% if v.admin_level >= PERMS['LOTTERY_VIEW_PARTICIPANTS'] %}
<a href="/admin/lottery/participants">
<div id="participantsThisSession">-</div>
</a>
{% else %}
<div id="participantsThisSession">-</div>
{% endif %}
</div>
</div>
<div class="lottery-page--stat">
<div class="lottery-page--stat-keys">
<div>Your Held Tickets</div>
<div>Lifetime Held Tickets</div>
<div>Lifetime Winnings</div>
</div>
<div class="lottery-page--stat-values">
<div id="ticketsHeldCurrent">-</div>
<div id="ticketsHeldTotal">-</div>
<div id="winnings">-</div>
</div>
</div>
<div class="lottery-page--stat">
<div class="lottery-page--stat-keys">
<div>Purchase Quantity</div>
</div>
<div class="lottery-page--stat-values">
<div>
<input
id="ticketPurchaseQuantity"
class="form-control"
autocomplete="off"
value="1"
min="1"
step="1"
name="ticketPurchaseQuantity"
type="number"
style="flex: 1; max-width: 100px; text-align: center"
>
</div>
</div>
</div>
<button
type="button"
class="btn btn-success lottery-page--action"
id="purchaseTicket"
data-nonce="{{g.nonce}}"
data-onclick="purchaseLotteryTicket()"
>
Purchase <span id="totalQuantityOfTickets">1</span> for
<img
id="prize-image"
alt="coins"
class="mr-1 ml-1"
data-bs-toggle="tooltip"
@ -31,127 +95,61 @@
height="13"
src="{{'coins.webp' | asset_siteimg}}"
title="Coins"
style="display: none; position: relative; top: -2px"
>
<span id="prize">-</span>
</div>
<div id="timeLeft">-</div>
<div id="ticketsSoldThisSession">-</div>
{% if v.admin_level >= PERMS['LOTTERY_VIEW_PARTICIPANTS'] %}
<a href="/admin/lottery/participants">
<div id="participantsThisSession">-</div>
</a>
{% else %}
<div id="participantsThisSession">-</div>
{% endif %}
</div>
</div>
<div class="lottery-page--stat">
<div class="lottery-page--stat-keys">
<div>Your Held Tickets</div>
<div>Lifetime Held Tickets</div>
<div>Lifetime Winnings</div>
</div>
<div class="lottery-page--stat-values">
<div id="ticketsHeldCurrent">-</div>
<div id="ticketsHeldTotal">-</div>
<div id="winnings">-</div>
</div>
<span id="totalCostOfTickets">12</span>
</button>
</div>
<div class="lottery-page--stat">
<div class="lottery-page--stat-keys">
<div>Purchase Quantity</div>
</div>
<div class="lottery-page--stat-values">
<div>
<input
id="ticketPurchaseQuantity"
class="form-control"
autocomplete="off"
value="1"
min="1"
step="1"
name="ticketPurchaseQuantity"
type="number"
style="flex: 1; max-width: 100px; text-align: center"
>
{# Success #}
<div
class="toast"
id="lottery-post-success"
style="
position: fixed;
bottom: 1.5rem;
margin: 0 auto;
left: 0;
right: 0;
width: unset;
z-index: 1000;
height: auto !important;
"
role="alert"
data-bs-animation="true"
data-bs-autohide="true"
data-bs-delay="5000"
>
<div class="toast-body bg-success text-center text-white">
<i class="fas fa-comment-alt-smile mr-2"></i
><span id="lottery-post-success-text"></span>
</div>
</div>
</div>
<button
type="button"
class="btn btn-success lottery-page--action"
id="purchaseTicket"
data-nonce="{{g.nonce}}"
data-onclick="purchaseLotteryTicket()"
{# Error #}
<div
class="toast"
id="lottery-post-error"
style="
position: fixed;
bottom: 1.5rem;
margin: 0 auto;
left: 0;
right: 0;
width: unset;
z-index: 1000;
height: auto !important;
"
role="alert"
data-bs-animation="true"
data-bs-autohide="true"
data-bs-delay="5000"
>
Purchase <span id="totalQuantityOfTickets">1</span> for
<img
alt="coins"
class="mr-1 ml-1"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
height="13"
src="{{'coins.webp' | asset_siteimg}}"
title="Coins"
>
<span id="totalCostOfTickets">12</span>
</button>
</div>
{# Success #}
<div
class="toast"
id="lottery-post-success"
style="
position: fixed;
bottom: 1.5rem;
margin: 0 auto;
left: 0;
right: 0;
width: unset;
z-index: 1000;
height: auto !important;
"
role="alert"
data-bs-animation="true"
data-bs-autohide="true"
data-bs-delay="5000"
>
<div class="toast-body bg-success text-center text-white">
<i class="fas fa-comment-alt-smile mr-2"></i
><span id="lottery-post-success-text"></span>
<div class="toast-body bg-danger text-center text-white">
<i class="fas fa-exclamation-circle mr-2"></i
><span id="lottery-post-error-text"></span>
</div>
</div>
</div>
{# Error #}
<div
class="toast"
id="lottery-post-error"
style="
position: fixed;
bottom: 1.5rem;
margin: 0 auto;
left: 0;
right: 0;
width: unset;
z-index: 1000;
height: auto !important;
"
role="alert"
data-bs-animation="true"
data-bs-autohide="true"
data-bs-delay="5000"
>
<div class="toast-body bg-danger text-center text-white">
<i class="fas fa-exclamation-circle mr-2"></i
><span id="lottery-post-error-text"></span>
</div>
</div>
</div>
<script defer src="{{'js/lottery.js' | asset}}"></script>
</div>
{% endblock %}

View File

@ -3,19 +3,19 @@
{% block pagetype %}message{% endblock %}
{% block customPadding %}{% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-10 col-md-5">
<div class="text-center py-6 py-md-8">
<div class="row justify-content-center">
<div class="col-10 col-md-5">
<div class="text-center py-6 py-md-8">
<span class="fa-stack fa-2x text-muted mb-4">
<i class="fas fa-square text-gray-400 fa-stack-2x"></i>
<i class="fas text-gray-600 {% if message %}fa-envelope-open-text{% elif error %}fa-exclamation-triangle{% endif %} fa-stack-1x text-lg"></i>
</span>
<span class="fa-stack fa-2x text-muted mb-4">
<i class="fas fa-square text-gray-400 fa-stack-2x"></i>
<i class="fas text-gray-600 {% if message %}fa-envelope-open-text{% elif error %}fa-exclamation-triangle{% endif %} fa-stack-1x text-lg"></i>
</span>
<h5>{{title}}</h1>
<div class="text-small text-muted mb-3">{{message if message else error}}</div>
<a href="/" class="btn btn-primary ">Go to homepage</a>
<h5>{{title}}</h1>
<div class="text-small text-muted mb-3">{{message if message else error}}</div>
<a href="/" class="btn btn-primary ">Go to homepage</a>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -2,9 +2,9 @@
{% block pagetitle %}{{title}}{% endblock %}
{% block pagetype %}message-success{% endblock %}
{% block content %}
<div class="text-center py-6 py-md-8">
<img class="mb-3" alt=":#marseyparty:" src="{{SITE_FULL_IMAGES}}/e/marseyparty.webp">
<div class="font-weight-bold text-muted mb-4">{{title}}</div>
<p class="text-muted">{{message}}</p>
</div>
<div class="text-center py-6 py-md-8">
<img class="mb-3" alt=":#marseyparty:" src="{{SITE_FULL_IMAGES}}/e/marseyparty.webp">
<div class="font-weight-bold text-muted mb-4">{{title}}</div>
<p class="text-muted">{{message}}</p>
</div>
{% endblock %}

View File

@ -1,29 +1,33 @@
{% extends "default.html" %}
{% block pagetitle %}Notification Mutes{% endblock %}
{% block content %}
<h5 class="font-weight-bolder text-center pt-2 pb-3"><span>Notification Mutes</span></h5>
<div class="overflow-x-auto mt-3"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>User</th>
<th>Target</th>
<th>Muted on</th>
</tr>
</thead>
{% for mute in mutes %}
<tr>
<td>
{% with user = mute.user %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td>
{% with user = mute.target %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td data-time="{{mute.created_utc}}"></td>
</tr>
{% endfor %}
</table>
<h5 class="font-weight-bolder text-center pt-2 pb-3">
<span>Notification Mutes</span>
</h5>
<div class="overflow-x-auto mt-3">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>User</th>
<th>Target</th>
<th>Muted on</th>
</tr>
</thead>
{% for mute in mutes %}
<tr>
<td>
{% with user = mute.user %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td>
{% with user = mute.target %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td data-time="{{mute.created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -3,149 +3,143 @@
{% block pagetype %}notifications{% endblock %}
{% block PseudoSubmitForm %}{% endblock %}
{% block navbar %}
<div class="font-weight-bold py-3"></div>
<div class="font-weight-bold py-3"></div>
{% endblock %}
{% block content %}
<div class="row border-bottom w-200 pr-0" style="overflow: visible">
<div class="col p-0 w-100">
<ul class="nav settings-nav" style="padding:0 0 0 20px" id="notifications--nav-list">
<li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications' or request.path.startswith('/notification/') %} active{% endif %}" href="/notifications">
All {% if v.normal_notifications_count %}<span class="font-weight-bold" style="color:#dc3545">({{v.normal_notifications_count}})</span>{% endif %}
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/messages' %} active{% endif %}" href="/notifications/messages">
Messages {% if v.message_notifications_count %}<span class="font-weight-bold" style="color:#d8910d">({{v.message_notifications_count}})</span>{% endif %}
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/posts' %} active{% endif %}" href="/notifications/posts">
Posts {% if v.post_notifications_count %}<span class="font-weight-bold" style="color:#0000ff">({{v.post_notifications_count}})</span>{% endif %}
</a>
</li>
{% if v.admin_level >= PERMS['NOTIFICATIONS_MODERATOR_ACTIONS'] or v.moderated_holes %}
<div class="row border-bottom w-200 pr-0" style="overflow: visible">
<div class="col p-0 w-100">
<ul class="nav settings-nav" style="padding:0 0 0 20px" id="notifications--nav-list">
<li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/modactions' %} active{% endif %}" href="/notifications/modactions">
Modactions {% if v.modaction_notifications_count %}<span class="font-weight-bold" style="color:#1ad80d">({{v.modaction_notifications_count}})</span>{% endif %}
<a class="nav-link py-3{% if request.path == '/notifications' or request.path.startswith('/notification/') %} active{% endif %}" href="/notifications">
All {% if v.normal_notifications_count %}<span class="font-weight-bold" style="color:#dc3545">({{v.normal_notifications_count}})</span>{% endif %}
</a>
</li>
{% endif %}
{% if v.admin_level >= PERMS['VIEW_MODMAIL'] %}
<li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/modmail' %} active{% endif %}" href="/notifications/modmail">
Modmail
<a class="nav-link py-3{% if request.path == '/notifications/messages' %} active{% endif %}" href="/notifications/messages">
Messages {% if v.message_notifications_count %}<span class="font-weight-bold" style="color:#d8910d">({{v.message_notifications_count}})</span>{% endif %}
</a>
</li>
{% endif %}
{% if v.can_view_offsitementions %}
<li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/reddit' %} active{% endif %}" href="/notifications/reddit">
Reddit {% if v.reddit_notifications_count %}<span class="font-weight-bold" style="color:#805ad5">({{v.reddit_notifications_count}})</span>{% endif %}
<a class="nav-link py-3{% if request.path == '/notifications/posts' %} active{% endif %}" href="/notifications/posts">
Posts {% if v.post_notifications_count %}<span class="font-weight-bold" style="color:#0000ff">({{v.post_notifications_count}})</span>{% endif %}
</a>
</li>
{% endif %}
</ul>
{% if v.admin_level >= PERMS['NOTIFICATIONS_MODERATOR_ACTIONS'] or v.moderated_holes %}
<li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/modactions' %} active{% endif %}" href="/notifications/modactions">
Modactions {% if v.modaction_notifications_count %}<span class="font-weight-bold" style="color:#1ad80d">({{v.modaction_notifications_count}})</span>{% endif %}
</a>
</li>
{% endif %}
{% if v.admin_level >= PERMS['VIEW_MODMAIL'] %}
<li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/modmail' %} active{% endif %}" href="/notifications/modmail">
Modmail
</a>
</li>
{% endif %}
{% if v.can_view_offsitementions %}
<li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/reddit' %} active{% endif %}" href="/notifications/reddit">
Reddit {% if v.reddit_notifications_count %}<span class="font-weight-bold" style="color:#805ad5">({{v.reddit_notifications_count}})</span>{% endif %}
</a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
{% if request.path.startswith('/notification/') %}
<div class="mt-4 mb-5 ml-3 text-lg"><a href="/notifications">View all notifications <i class="fas fa-long-arrow-right ml-1"></i></a></div>
{% else %}
<button type="button" class="btn btn-primary btn-rainbow ml-3 mt-4" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/clear')">Mark all notifications as read</button>
{% endif %}
{% if request.path.startswith('/notification/') %}
<div class="mt-4 mb-5 ml-3 text-lg"><a href="/notifications">View all notifications <i class="fas fa-long-arrow-right ml-1"></i></a></div>
{% else %}
<button type="button" class="btn btn-primary btn-rainbow ml-3 mt-4" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/clear')">Mark all notifications as read</button>
{% endif %}
<div class="notifs px-3 p-md-0">
<div class="notifs px-3 p-md-0">
{% if request.path == '/notifications/posts' %}
{% with listing=notifications %}
<div class="mt-4 posts">
{% include "post_listing.html" %}
</div>
{% endwith %}
{% elif request.path == '/notifications/modactions' %}
<div class="rounded border mx-auto mt-4">
{% for ma in notifications %}
<div id="action-{{ma.id}}" class="{% if ma.unread %}unread{% endif %} position-relative d-flex justify-content-between flex-wrap align-items-center h-min-16 px-3 py-3 {% if loop.index > 1 %} border-top{% endif %}">
{% if request.path == '/notifications/posts' %}
{% with listing=notifications %}
<div class="mt-4 posts">
{% include "post_listing.html" %}
</div>
{% endwith %}
{% elif request.path == '/notifications/modactions' %}
<div class="rounded border mx-auto mt-4">
{% for ma in notifications %}
<div id="action-{{ma.id}}" class="{% if ma.unread %}unread{% endif %} position-relative d-flex justify-content-between flex-wrap align-items-center h-min-16 px-3 py-3 {% if loop.index > 1 %} border-top{% endif %}">
<div class="d-flex flex-grow-1 align-items-center">
<div class="d-flex align-items-center justify-content-center {{ma.color}} mr-3 rounded-lg flex-shrink-0" style="width: 32px;height: 32px"><i class="far text-center {{ma.icon}} text-lg text-white fa-fw"></i></div>
<div class="d-flex align-items-center">
<span class="rounded">
<div class="profile-pic-35-wrapper">
<img loading="lazy" src="{{ma.user.profile_url}}" alt="avatar" class="profile-pic-35">
{% if ma.user.hat_active(v)[0] -%}
<img id="profile-pic-35-hat" class="profile-pic-35-hat hat" loading="lazy" src="{{ma.user.hat_active(v)[0]}}?x=6" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ma.user.hat_active(v)[1]}}">
{%- endif %}
</div>
</span>
<div class="text-muted pl-3">
<div>
{% if ma.hole %}
<a href="/h/{{ma.hole}}">/h/{{ma.hole}}</a>
-
{% endif %}
<a href="{{ma.user.url}}" class="font-weight-bold text-black" target="_self">@{{ma.user.username}}</a>
<span>{{ma.string | safe}}</span>
</div>
<div class="text-gray-500">
<span class="log--item-age" id="{{ma.id}}-age" data-bs-toggle="tooltip" data-bs-placement="bottom" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{ma.created_utc}}')">{{ma.age_string}}</span>
<a href="{{ma.permalink}}"><i class="fas fa-link ml-3 text-muted"></i></a>
<button type="button" class="copy-link ml-3" data-clipboard-text="{{ma.permalink}}"><i class="fas fa-copy text-muted"></i></button>
<div class="d-flex flex-grow-1 align-items-center">
<div class="d-flex align-items-center justify-content-center {{ma.color}} mr-3 rounded-lg flex-shrink-0" style="width: 32px;height: 32px"><i class="far text-center {{ma.icon}} text-lg text-white fa-fw"></i></div>
<div class="d-flex align-items-center">
<span class="rounded">
<div class="profile-pic-35-wrapper">
<img loading="lazy" src="{{ma.user.profile_url}}" alt="avatar" class="profile-pic-35">
{% if ma.user.hat_active(v)[0] -%}
<img id="profile-pic-35-hat" class="profile-pic-35-hat hat" loading="lazy" src="{{ma.user.hat_active(v)[0]}}?x=6" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ma.user.hat_active(v)[1]}}">
{%- endif %}
</div>
</span>
<div class="text-muted pl-3">
<div>
{% if ma.hole %}
<a href="/h/{{ma.hole}}">/h/{{ma.hole}}</a>
-
{% endif %}
<a href="{{ma.user.url}}" class="font-weight-bold text-black" target="_self">@{{ma.user.username}}</a>
<span>{{ma.string | safe}}</span>
</div>
<div class="text-gray-500">
<span class="log--item-age" id="{{ma.id}}-age" data-bs-toggle="tooltip" data-bs-placement="bottom" data-nonce="{{g.nonce}}" data-onmouseover="timestamp(this, '{{ma.created_utc}}')">{{ma.age_string}}</span>
<a href="{{ma.permalink}}"><i class="fas fa-link ml-3 text-muted"></i></a>
<button type="button" class="copy-link ml-3" data-clipboard-text="{{ma.permalink}}"><i class="fas fa-copy text-muted"></i></button>
</div>
</div>
</div>
</div>
</div>
{% else %}
<div class="p-3">There's nothing here right now.</div>
{% endfor %}
</div>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
</div>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
{% else %}
{% with comments=notifications %}
{% include "comments.html" %}
{% endwith %}
{% endif %}
{% else %}
<div class="p-3">There's nothing here right now.</div>
{% endfor %}
</div>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
{% if not notifications %}
<div class="text-center py-6 py-md-8">
<span class="fa-stack fa-2x text-muted mb-4">
<i class="fas fa-square text-gray-400 fa-stack-2x"></i>
<i class="fas text-gray-600 fa-envelope fa-stack-1x text-lg"></i>
</span>
<h5>No notifications</h5>
</div>
</div>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
{% else %}
{% with comments=notifications %}
{% include "comments.html" %}
{% endwith %}
{% endif %}
{% if not notifications %}
<div class="text-center py-6 py-md-8">
<span class="fa-stack fa-2x text-muted mb-4">
<i class="fas fa-square text-gray-400 fa-stack-2x"></i>
<i class="fas text-gray-600 fa-envelope fa-stack-1x text-lg"></i>
</span>
<h5>No notifications</h5>
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endblock %}
{% block pagenav %}
{% if notifications %}
{% include "pagination.html" %}
{% endif %}
{% if notifications %}
{% include "pagination.html" %}
{% endif %}
<link rel="stylesheet" href="{{('css/notifications.css') | asset}}">
{% if request.path == '/notifications/messages' %}
<script defer src="{{'js/vendor/socketio.js' | asset}}"></script>
<script defer src="{{'js/flash.js' | asset}}"></script>
<script defer src="{{'js/messages.js' | asset}}"></script>
{% endif %}
<link rel="stylesheet" href="{{('css/notifications.css') | asset}}">
{% if request.path == '/notifications/messages' %}
<script defer src="{{'js/vendor/socketio.js' | asset}}"></script>
<script defer src="{{'js/flash.js' | asset}}"></script>
<script defer src="{{'js/messages.js' | asset}}"></script>
{% endif %}
{% endblock %}
{% block GIFpicker %}{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "login.html" %}
{% block pagetitle %}Application Request for Access{% endblock %}
{% block content %}
<div id="auth-form">
<div id="auth-form">
<h2>{{application.app_name}}</h2>
<p class="mb-md-5">wants to access your @{{v.username}} account.</p>
<p class="mb-md-5">It will not be able to see your password, or change your account settings.</p>
@ -15,5 +15,5 @@
<input type="submit" class="btn btn-primary" id="auth_button" value="Authorize {{application.app_name}}">
<a href="/" class="btn btn-secondary">No, back to {{SITE_NAME}}</a>
</form>
</div>
</div>
{% endblock %}

View File

@ -1,26 +1,27 @@
{% extends "default.html" %}
{% block pagetitle %}{{kind}} Owners{% endblock %}
{% block content %}
<h5 class="my-3">{{kind}} Owners</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Owned since</td>
</tr>
</thead>
<tbody id="owners-table">
{% for user, created_utc in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if created_utc %}data-time="{{created_utc}}"{% endif %}></td>
</tr>
{% endfor %}
</tbody>
</table>
<h5 class="my-3">{{kind}} Owners</h5>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Owned since</td>
</tr>
</thead>
<tbody id="owners-table">
{% for user, created_utc in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if created_utc %}data-time="{{created_utc}}"{% endif %}></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -1,44 +1,43 @@
{% extends "default.html" %}
{% block pagetitle %}Poll Votes{% endblock %}
{% block content %}
{% if option %}
{% if option %}
<h3 class="mt-5">{{option.body_html | safe}} - {{ups | length}} {% if option.exclusive == 2 %}bets{% else %}votes{% endif %}</h3>
<h3 class="mt-5">{{option.body_html | safe}} - {{ups | length}} {% if option.exclusive == 2 %}bets{% else %}votes{% endif %}</h3>
<p><b>Link:</b> <a href="{{option.parent.permalink}}">{{option.parent.permalink}}</a></p>
<p><b>Author:</b> <a href="{{option.parent.author.url}}">@{{option.parent.author_name}}</a></p>
<p><b>Author Created At:</b> <span data-time="{{option.parent.author.created_utc}}"></span></p>
<p><b>Author Truescore:</b> {{"{:,}".format(option.parent.author.truescore)}}</p>
<p><b>Total voter truescore: </b>{{total_ts}}</p>
{% if total_patrons != None %}
<p><b>Total {{patron}}s: </b>{{total_patrons}} | ${{total_money}}</p>
{% endif %}
<p><b>Link:</b> <a href="{{option.parent.permalink}}">{{option.parent.permalink}}</a></p>
<p><b>Author:</b> <a href="{{option.parent.author.url}}">@{{option.parent.author_name}}</a></p>
<p><b>Author Created At:</b> <span data-time="{{option.parent.author.created_utc}}"></span></p>
<p><b>Author Truescore:</b> {{"{:,}".format(option.parent.author.truescore)}}</p>
<p><b>Total voter truescore: </b>{{total_ts}}</p>
{% if total_patrons != None %}
<p><b>Total {{patron}}s: </b>{{total_patrons}} | ${{total_money}}</p>
{% endif %}
<div class="overflow-x-auto mt-5">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>User</th>
<th>User Truescore</th>
<th>Vote Time</th>
</tr>
</thead>
<div class="overflow-x-auto mt-5">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>User</th>
<th>User Truescore</th>
<th>Vote Time</th>
</tr>
</thead>
{% for vote in ups %}
<tr>
<td>{{loop.index}}</td>
<td>
{% with user=vote.user %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td>{{"{:,}".format(vote.user.truescore)}}</td>
<td data-time="{{vote.created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% for vote in ups %}
<tr>
<td>{{loop.index}}</td>
<td>
{% with user=vote.user %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td>{{"{:,}".format(vote.user.truescore)}}</td>
<td data-time="{{vote.created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% endblock %}

View File

@ -1,10 +1,10 @@
{% extends "default.html" %}
{% block pagetitle %}
{%- if comment_info -%}
@{{comment_info.author_name}} comments on '{{p.plaintitle(v)}}'
{%- else -%}
{{p.plaintitle(v)}}
{%- endif -%}
{%- if comment_info -%}
@{{comment_info.author_name}} comments on '{{p.plaintitle(v)}}'
{%- else -%}
{{p.plaintitle(v)}}
{%- endif -%}
{% endblock %}
{% block pagetype %}thread{% endblock %}
@ -36,326 +36,323 @@
{% endif %}
{% set v_forbid_deleted = (p.deleted_utc != 0) and not (v and v.admin_level >= PERMS['POST_COMMENT_MODERATION']) and not (v and v.id == p.author_id) %}
{% block actionsModal %}
{% if v %}
<div class="modal fade d-md-none" id="actionsModal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header p-3">
<h6 class="col modal-title text-center">More options</h6>
<button type="button" class="close position-absolute py-3" style="right: 1rem" data-bs-dismiss="modal">
<span><i class="fas fa-times-circle text-gray-500"></i></span>
</button>
</div>
<div class="modal-body">
<ul class="list-group post-actions">
{% if v.id==p.author_id %}
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" data-nonce="{{g.nonce}}" data-onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit text-center text-muted mr-2"></i>Edit</button>
{% elif p.body and v.admin_level < PERMS['POST_COMMENT_EDITING'] %}
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" data-nonce="{{g.nonce}}" data-onclick="expandMarkdown('{{p.fullname}}')"><i class="fas text-expand-icon-{{p.fullname}} fa-expand-alt text-center mr-2"></i><span class="expand-text-{{p.fullname}}">View source</span></button>
{% endif %}
{% if v %}
<div class="modal fade d-md-none" id="actionsModal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header p-3">
<h6 class="col modal-title text-center">More options</h6>
<button type="button" class="close position-absolute py-3" style="right: 1rem" data-bs-dismiss="modal">
<span><i class="fas fa-times-circle text-gray-500"></i></span>
</button>
</div>
<div class="modal-body">
<ul class="list-group post-actions">
{% if v.id==p.author_id %}
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" data-nonce="{{g.nonce}}" data-onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit text-center text-muted mr-2"></i>Edit</button>
{% elif p.body and v.admin_level < PERMS['POST_COMMENT_EDITING'] %}
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" data-nonce="{{g.nonce}}" data-onclick="expandMarkdown('{{p.fullname}}')"><i class="fas text-expand-icon-{{p.fullname}} fa-expand-alt text-center mr-2"></i><span class="expand-text-{{p.fullname}}">View source</span></button>
{% endif %}
{% include "post_actions_mobile.html" %}
</ul>
{% include "post_actions_mobile.html" %}
</ul>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% include "post_admin_actions_mobile.html" %}
{% endif %}
{% endif %}
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% include "post_admin_actions_mobile.html" %}
{% endif %}
{% endblock %}
{% block content %}
<div class="row mb-3">
<div class="row mb-3">
<div id="post-root" class="col-12">
<div id="post-root" class="col-12">
<div class="card border-0 mt-3 {% if p.stickied %}stickied{% endif %} {% if voted==1 %}upvoted{% elif voted==-1 %} downvoted{% endif %}">
<div id="post-{{p.id}}" class="actual-post {% if p.ghost %}ghost-post{% endif %} {% if p.is_banned %}banned{% endif %} {% if p.deleted_utc %}deleted {% endif %} d-flex flex-row-reverse flex-nowrap justify-content-end">
<div class="card border-0 mt-3 {% if p.stickied %}stickied{% endif %} {% if voted==1 %}upvoted{% elif voted==-1 %} downvoted{% endif %}">
<div id="post-{{p.id}}" class="actual-post {% if p.ghost %}ghost-post{% endif %} {% if p.is_banned %}banned{% endif %} {% if p.deleted_utc %}deleted {% endif %} d-flex flex-row-reverse flex-nowrap justify-content-end">
{% if p.thumb_url and not p.deleted_utc and not p.is_image and not p.is_video and not p.is_audio and not p.embed %}
<div class="card-header bg-transparent border-0 d-none d-md-flex flex-row flex-nowrap pl-3 p-0">
<a rel="nofollow noopener" href="{{p.realurl(v)}}" style="height: fit-content"{% if not v or v.newtabexternal %}target="_blank"{% endif %}><img loading="lazy" src="{{p.thumb_url}}" class="post-img d-mob-none" alt="Unable to load image"></a>
</div>
{% endif %}
{% if p.thumb_url and not p.deleted_utc and not p.is_image and not p.is_video and not p.is_audio and not p.embed %}
<div class="card-header bg-transparent border-0 d-none d-md-flex flex-row flex-nowrap pl-3 p-0">
<a rel="nofollow noopener" href="{{p.realurl(v)}}" style="height: fit-content"{% if not v or v.newtabexternal %}target="_blank"{% endif %}><img loading="lazy" src="{{p.thumb_url}}" class="post-img d-mob-none" alt="Unable to load image"></a>
</div>
{% endif %}
<div id="post-content" class="card-block w-100 my-md-auto">
<div id="post-content" class="card-block w-100 my-md-auto">
<div class="post-meta text-left mb-2">
{{macros.post_meta(p)}}
</div>
<div class="post-meta text-left mb-2">
{{macros.post_meta(p)}}
</div>
{{macros.reports(p, 'post')}}
{{macros.reports(p, 'post')}}
<h1 id="post-title" class="{{p.award_classes(v, True)}} card-title post-title text-left mb-md-3">
{% if p.realurl(v) and not v_forbid_deleted %}
<a class="no-visited" {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<h1 id="post-title" class="{{p.award_classes(v, True)}} card-title post-title text-left mb-md-3">
{% if p.realurl(v) and not v_forbid_deleted %}
<a class="no-visited" {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
{% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}}
</a>
{% else %}
{% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}}
</a>
{% else %}
{% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}}
{% endif %}
</h1>
{% if not v_forbid_deleted %}
<div id="post-body" class="post-body mt-3 {% if p.award_count('tilt', v) %}tilt-post{% endif %}">
{% if p.realurl(v) and not p.is_image and not p.is_video and not p.is_audio %}
<a rel="nofollow noopener" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
<div class="d-flex justify-content-between align-items-center border rounded p-2 mb-3">
<span>{{p.realurl(v)}}</span>
<i class="fas fa-external-link-alt text-small"></i>
</div>
</a>
{% endif %}
</h1>
{% if p.embed %}
{% if p.domain == "twitter.com" %}
{{p.embed | safe}}
{% if v and v.theme in LIGHT_THEMES %}
<script defer src="{{'js/vendor/twitterlight.js' | asset}}"></script>
{% else %}
<script defer src="{{'js/vendor/twitter.js' | asset}}"></script>
{% endif %}
{% elif p.domain in ['youtu.be','youtube.com'] and p.embed and p.embed.startswith('<lite-youtube') %}
<p class="resizable yt" style="width:100%">
{% if not v_forbid_deleted %}
<div id="post-body" class="post-body mt-3 {% if p.award_count('tilt', v) %}tilt-post{% endif %}">
{% if p.realurl(v) and not p.is_image and not p.is_video and not p.is_audio %}
<a rel="nofollow noopener" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
<div class="d-flex justify-content-between align-items-center border rounded p-2 mb-3">
<span>{{p.realurl(v)}}</span>
<i class="fas fa-external-link-alt text-small"></i>
</div>
</a>
{% endif %}
{% if p.embed %}
{% if p.domain == "twitter.com" %}
{{p.embed | safe}}
</p>
{% else %}
<div id="crosspost-embed" class="mb-3">
<div class="row no-gutters">
<div id="frontpage" class="col-12 pt-0">
<div class="posts">
{{p.embed | post_embed(v) | safe}}
{% if v and v.theme in LIGHT_THEMES %}
<script defer src="{{'js/vendor/twitterlight.js' | asset}}"></script>
{% else %}
<script defer src="{{'js/vendor/twitter.js' | asset}}"></script>
{% endif %}
{% elif p.domain in ['youtu.be','youtube.com'] and p.embed and p.embed.startswith('<lite-youtube') %}
<p class="resizable yt" style="width:100%">
{{p.embed | safe}}
</p>
{% else %}
<div id="crosspost-embed" class="mb-3">
<div class="row no-gutters">
<div id="frontpage" class="col-12 pt-0">
<div class="posts">
{{p.embed | post_embed(v) | safe}}
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endif %}
<div id="post-text" class="{{p.award_classes(v)}}">
{% if p.is_image %}
<div class="row no-gutters mb-4">
<div class="col">
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img data-nonce="{{g.nonce}}" data-onclick="expandImage()" src="{{p.realurl(v)}}" class="post-linked-img" alt="Unable to load image">
</a>
<div id="post-text" class="{{p.award_classes(v)}}">
{% if p.is_image %}
<div class="row no-gutters mb-4">
<div class="col">
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img data-nonce="{{g.nonce}}" data-onclick="expandImage()" src="{{p.realurl(v)}}" class="post-linked-img" alt="Unable to load image">
</a>
</div>
</div>
</div>
{% elif p.is_video %}
<div class="row no-gutters mb-4">
<div class="col">
<p class="resizable">
<video {% if p.poster_url %}poster="{{p.poster_url}}"{% endif %} controls preload="none" src="{{p.realurl(v)}}"></video>
</p>
{% elif p.is_video %}
<div class="row no-gutters mb-4">
<div class="col">
<p class="resizable">
<video {% if p.poster_url %}poster="{{p.poster_url}}"{% endif %} controls preload="none" src="{{p.realurl(v)}}"></video>
</p>
</div>
</div>
</div>
{% elif p.is_audio %}
<div class="row no-gutters mb-4">
<div class="col">
<audio controls preload="none" src="{{p.realurl(v)}}"></audio>
{% elif p.is_audio %}
<div class="row no-gutters mb-4">
<div class="col">
<audio controls preload="none" src="{{p.realurl(v)}}"></audio>
</div>
</div>
</div>
{% endif %}
{{p.realbody(v) | safe}}
{% endif %}
{{p.realbody(v) | safe}}
{% if p.is_banned %}
<div class="text-removed mb-0">Removed by @{{p.ban_reason}} (Site Admin)</div>
{% if p.is_banned %}
<div class="text-removed mb-0">Removed by @{{p.ban_reason}} (Site Admin)</div>
{% endif %}
</div>
{% if not p.ghost %}
{{p.author.rendered_sig(v) | safe}}
{% endif %}
</div>
{% if not p.ghost %}
{{p.author.rendered_sig(v) | safe}}
{% endif %}
{% else %}
<div id="post-body" class="post-body mt-3">
<div id="post-text"><code>[Deleted by author.]</code></div>
</div>
{% endif %}
{% if v and v.can_edit(p) and not v.is_suspended %}
<div id="edit-post-body-{{p.id}}" class="d-none comment-write collapsed child">
<form id="post-edit-form-{{p.id}}" action="/edit_post/{{p.id}}" method="post" enctype="multipart/form-data" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input hidden name="current_page" value="{{request.path}}">
<textarea id="post-edit-title" autocomplete="off" maxlength="500" name="title" class="comment-box form-control rounded" required placeholder="title">{{p.title}}</textarea>
<textarea autocomplete="off" name="body" {% if v.longpost %}minlength="280"{% endif %} maxlength="{% if v.bird %}140{% else %}{{POST_BODY_LENGTH_LIMIT(v)}}{% endif %}" data-preview="post-edit-{{p.id}}" data-nonce="{{g.nonce}}" data-oninput="markdown(this);charLimit('post-edit-box-{{p.id}}','charcount-post-edit')" id="post-edit-box-{{p.id}}" form="post-edit-form-{{p.id}}" class="file-ta comment-box form-control rounded" placeholder="Add text to your post..." rows="10" data-id="{{p.id}}">{{p.body}}</textarea>
<div class="text-small font-weight-bold mt-1" id="charcount-post-edit" style="right: 1rem; bottom: 0.5rem; z-index: 3"></div>
<div class="format-btns">
{{macros.emoji_btn('post-edit-box-' ~ p.id)}}
{{macros.gif_btn('post-edit-box-' ~ p.id)}}
{{macros.file_btn('file-upload-edit-' ~ p.id)}}
</div>
<a class="text-small mt-3 d-inline-block" href="/formatting" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>Formatting help</a>
<button type="submit" form="post-edit-form-{{p.id}}" class="btn btn-primary ml-2 fl-r" data-nonce="{{g.nonce}}" data-onclick="remove_dialog()">Save Edit</button>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="togglePostEdit('{{p.id}}');remove_dialog()" class="btn btn-link text-muted ml-auto fl-r">Cancel</button>
</form>
<div id="post-edit-{{p.id}}" class="preview mb-3 mt-5"></div>
</div>
{% endif %}
<div class="d-none d-md-flex justify-content-between align-items-center mt-2">
<div class="post-actions mt-2">
<ul class="list-inline text-right d-flex">
<a class="list-inline-item" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
<i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}}
<span class="text-info d-none {{p.id}}-new-comments"></span>
</a>
{% if v and v.can_edit(p) %}
<button type="button" class="list-inline-item" data-nonce="{{g.nonce}}" data-onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit"></i>Edit</button>
{% elif v and v.id != p.author_id and p.body and not v_forbid_deleted %}
<button type="button" class="list-inline-item" data-nonce="{{g.nonce}}" data-onclick="expandMarkdown('{{p.fullname}}')"><i class="fas text-expand-icon-{{p.fullname}} fa-expand-alt"></i><span class="expand-text-{{p.fullname}}">View source</span></button>
{% endif %}
{% include 'post_actions.html' %}
</ul>
</div>
</div>
</div>
{% if v %}
<div id="voting" class="voting d-mob-none mb-auto mt-1">
<div tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '1')" 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 %}" data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}" style="cursor: default">{{score}}</span>
<div {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
</div>
{% else %}
<div id="post-body" class="post-body mt-3">
<div id="post-text"><code>[Deleted by author.]</code></div>
<div id="voting" class="voting d-mob-none mb-auto mt-1">
<a tabindex="0" class="post-{{p.id}}-up arrow-up mx-auto" href="/login?redirect={{request.full_path | urlencode}}">
</a>
<span class="post-{{p.id}}-score-none score text-muted{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}style="cursor: default">{{score}}</span>
<a {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down arrow-down mx-auto" href="/login?redirect={{request.full_path | urlencode}}"></a>
</div>
{% endif %}
{% if v and v.can_edit(p) and not v.is_suspended %}
<div id="edit-post-body-{{p.id}}" class="d-none comment-write collapsed child">
<form id="post-edit-form-{{p.id}}" action="/edit_post/{{p.id}}" method="post" enctype="multipart/form-data" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input hidden name="current_page" value="{{request.path}}">
<textarea id="post-edit-title" autocomplete="off" maxlength="500" name="title" class="comment-box form-control rounded" required placeholder="title">{{p.title}}</textarea>
<textarea autocomplete="off" name="body" {% if v.longpost %}minlength="280"{% endif %} maxlength="{% if v.bird %}140{% else %}{{POST_BODY_LENGTH_LIMIT(v)}}{% endif %}" data-preview="post-edit-{{p.id}}" data-nonce="{{g.nonce}}" data-oninput="markdown(this);charLimit('post-edit-box-{{p.id}}','charcount-post-edit')" id="post-edit-box-{{p.id}}" form="post-edit-form-{{p.id}}" class="file-ta comment-box form-control rounded" placeholder="Add text to your post..." rows="10" data-id="{{p.id}}">{{p.body}}</textarea>
<div class="text-small font-weight-bold mt-1" id="charcount-post-edit" style="right: 1rem; bottom: 0.5rem; z-index: 3"></div>
<div class="format-btns">
{{macros.emoji_btn('post-edit-box-' ~ p.id)}}
{{macros.gif_btn('post-edit-box-' ~ p.id)}}
{{macros.file_btn('file-upload-edit-' ~ p.id)}}
</div>
<a class="text-small mt-3 d-inline-block" href="/formatting" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>Formatting help</a>
<button type="submit" form="post-edit-form-{{p.id}}" class="btn btn-primary ml-2 fl-r" data-nonce="{{g.nonce}}" data-onclick="remove_dialog()">Save Edit</button>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="togglePostEdit('{{p.id}}');remove_dialog()" class="btn btn-link text-muted ml-auto fl-r">Cancel</button>
</form>
<div id="post-edit-{{p.id}}" class="preview mb-3 mt-5"></div>
</div>
{% endif %}
<div class="d-none d-md-flex justify-content-between align-items-center mt-2">
<div class="post-actions mt-2">
<ul class="list-inline text-right d-flex">
<a class="list-inline-item" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
<i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}}
<span class="text-info d-none {{p.id}}-new-comments"></span>
</a>
{% if v and v.can_edit(p) %}
<button type="button" class="list-inline-item" data-nonce="{{g.nonce}}" data-onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit"></i>Edit</button>
{% elif v and v.id != p.author_id and p.body and not v_forbid_deleted %}
<button type="button" class="list-inline-item" data-nonce="{{g.nonce}}" data-onclick="expandMarkdown('{{p.fullname}}')"><i class="fas text-expand-icon-{{p.fullname}} fa-expand-alt"></i><span class="expand-text-{{p.fullname}}">View source</span></button>
{% endif %}
{% include 'post_actions.html' %}
</ul>
</div>
</div>
</div>
{% if v %}
<div id="voting" class="voting d-mob-none mb-auto mt-1">
<div tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '1')" 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 %}" data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}" style="cursor: default">{{score}}</span>
<div {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
</div>
{% else %}
<div id="voting" class="voting d-mob-none mb-auto mt-1">
<a tabindex="0" class="post-{{p.id}}-up arrow-up mx-auto" href="/login?redirect={{request.full_path | urlencode}}">
</a>
<span class="post-{{p.id}}-score-none score text-muted{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}style="cursor: default">{{score}}</span>
<a {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down arrow-down mx-auto" href="/login?redirect={{request.full_path | urlencode}}"></a>
</div>
{% endif %}
</div>
</div>
</div>
</div>
<div class="row mb-3 d-md-none">
<div class="col-12">
<div class="post-actions">
<ul class="list-inline text-right d-flex">
<li class="list-inline-item mr-auto">
<a href="{{p.permalink}}">
<i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}}
<span class="text-info d-none {{p.id}}-new-comments"></span>
</a>
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<button type="button" class="ml-2" data-bs-toggle="modal" data-bs-target="#adminModal-{{p.id}}">
<i class="fas fa-broom"></i>
</button>
{% endif %}
</li>
{% if v %}
<li class="list-inline-item">
<button type="button" data-bs-toggle="modal" data-bs-target="#actionsModal">
<i class="fas fa-ellipsis-h"></i>
</button>
<div class="row mb-3 d-md-none">
<div class="col-12">
<div class="post-actions">
<ul class="list-inline text-right d-flex">
<li class="list-inline-item mr-auto">
<a href="{{p.permalink}}">
<i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}}
<span class="text-info d-none {{p.id}}-new-comments"></span>
</a>
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<button type="button" class="ml-2" data-bs-toggle="modal" data-bs-target="#adminModal-{{p.id}}">
<i class="fas fa-broom"></i>
</button>
{% endif %}
</li>
{% endif %}
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
{% if v %}
<span tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post-mobile', '{{p.id}}', '1')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}">
</span>
{% else %}
<a tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" href="/login?redirect={{request.full_path | urlencode}}">
<i class="fas fa-arrow-alt-up mx-0"></i>
</a>
{% 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 %}" data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}" style="cursor: default">{{score}}</span>
{% if v %}
<span {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post-mobile', '{{p.id}}', '-1')" 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>
{% else %}
<a {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" href="/login?redirect={{request.full_path | urlencode}}">
<i class="fas fa-arrow-alt-down mx-0"></i>
</a>
<li class="list-inline-item">
<button type="button" data-bs-toggle="modal" data-bs-target="#actionsModal">
<i class="fas fa-ellipsis-h"></i>
</button>
</li>
{% endif %}
</li>
</ul>
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
{% if v %}
<span tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post-mobile', '{{p.id}}', '1')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}">
</span>
{% else %}
<a tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" href="/login?redirect={{request.full_path | urlencode}}">
<i class="fas fa-arrow-alt-up mx-0"></i>
</a>
{% 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 %}" data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}" style="cursor: default">{{score}}</span>
{% if v %}
<span {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post-mobile', '{{p.id}}', '-1')" 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>
{% else %}
<a {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" href="/login?redirect={{request.full_path | urlencode}}">
<i class="fas fa-arrow-alt-down mx-0"></i>
</a>
{% endif %}
</li>
</ul>
</div>
</div>
</div>
</div>
{% if v and v.id != p.author_id and p.body and not v_forbid_deleted and v.admin_level < PERMS['POST_COMMENT_EDITING'] %}
<div autocomplete="off" class="markdown d-none border my-2 p-3 rounded" id="markdown-{{p.fullname}}" readonly>{{p.body.strip()}}</div>
{% endif %}
<div class="row border-md-0 comment-section pb-3">
<div class="col border-top">
<div class="comments-count py-3">
{%- import 'util/macros.html' as macros with context -%}
{{- macros.sorting_buttons(COMMENT_SORTS, True) -}}
</div>
{{macros.comment_reply_box(p.fullname, 'comment-reply-' + p.fullname, subwrapper_css_classes='mb-3', enable_cancel_button=false)}}
{% if comment_info %}
<div class="total mt-1"><a href="{{p.permalink}}">View entire discussion <i class="fas fa-long-arrow-right ml-1"></i></a></div>
{% endif %}
{% if p.replies %}
<div class="comment-section" id="replies-of-{{p.fullname}}">
{% with comments=p.replies %}
{% include "comments.html" %}
{% endwith %}
</div>
{% if offset %}
<script defer src="{{'js/view_more.js' | asset}}"></script>
{% if v and v.id != p.author_id and p.body and not v_forbid_deleted and v.admin_level < PERMS['POST_COMMENT_EDITING'] %}
<div autocomplete="off" class="markdown d-none border my-2 p-3 rounded" id="markdown-{{p.fullname}}" readonly>{{p.body.strip()}}</div>
{% endif %}
{% elif not p.replies and p.deleted_utc == 0 %}
<div class="comment-section no-replies" id="replies-of-{{p.fullname}}">
{% if v %}
{% set ghost_town = 'This comment section is a ghost town...' %}
{% else %}
{% set ghost_town = 'This comment section is a ghost town... <a href="/login?redirect={{request.full_path | urlencode}}">Sign in</a></p> '%}
<div class="row border-md-0 comment-section pb-3">
<div class="col border-top">
<div class="comments-count py-3">
{%- import 'util/macros.html' as macros with context -%}
{{- macros.sorting_buttons(COMMENT_SORTS, True) -}}
</div>
{{macros.comment_reply_box(p.fullname, 'comment-reply-' + p.fullname, subwrapper_css_classes='mb-3', enable_cancel_button=false)}}
{% if comment_info %}
<div class="total mt-1"><a href="{{p.permalink}}">View entire discussion <i class="fas fa-long-arrow-right ml-1"></i></a></div>
{% endif %}
{% if p.replies %}
<div class="comment-section" id="replies-of-{{p.fullname}}">
{% with comments=p.replies %}
{% include "comments.html" %}
{% endwith %}
</div>
{% if offset %}
<script defer src="{{'js/view_more.js' | asset}}"></script>
{% endif %}
{{macros.ghost_box('Be the first to comment!', ghost_town, 1)}}
{% elif not p.replies and p.deleted_utc == 0 %}
<div class="comment-section no-replies" id="replies-of-{{p.fullname}}">
{% if v %}
{% set ghost_town = 'This comment section is a ghost town...' %}
{% else %}
{% set ghost_town = 'This comment section is a ghost town... <a href="/login?redirect={{request.full_path | urlencode}}">Sign in</a></p> '%}
{% endif %}
{{macros.ghost_box('Be the first to comment!', ghost_town, 1)}}
</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
</div>
{% if v %}
{% if v.id == p.author_id %}{% include "modals/delete_post.html" %}{% endif %}
{% include "modals/report_post.html" %}
{% if v.can_edit(p) %}
<script defer src="{{'js/edit_post.js' | asset}}"></script>
{% if v %}
{% if v.id == p.author_id %}{% include "modals/delete_post.html" %}{% endif %}
{% include "modals/report_post.html" %}
{% if v.can_edit(p) %}
<script defer src="{{'js/edit_post.js' | asset}}"></script>
{% endif %}
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<script defer src="{{'js/admin/pinpost.js' | asset}}"></script>
{% endif %}
{% endif %}
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<script defer src="{{'js/admin/pinpost.js' | asset}}"></script>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
{% if not p.replies %}{% include "comments.html" %}{% endif %}
<input hidden class="twoattrs" value="{{p.id}},{{p.comment_count}}">
<script defer src="{{'js/new_comments.js' | asset}}"></script>
<script defer src="{{'js/post.js' | asset}}"></script>
{% if fart and not (v and v.has_badge(128)) %}
<script defer src="{{'js/fart.js' | asset}}"></script>
{% endif %}
{% endif %}
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
{% if not p.replies %}{% include "comments.html" %}{% endif %}
<input hidden class="twoattrs" value="{{p.id}},{{p.comment_count}}">
<script defer src="{{'js/new_comments.js' | asset}}"></script>
<script defer src="{{'js/post.js' | asset}}"></script>
{% if fart and not (v and v.has_badge(128)) %}
<script defer src="{{'js/fart.js' | asset}}"></script>
{% endif %}
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<script defer src="{{'js/admin/post.js' | asset}}"></script>
{% endif %}
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<script defer src="{{'js/admin/post.js' | asset}}"></script>
{% endif %}
{% endblock %}

View File

@ -16,7 +16,7 @@
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" data-nonce="{{g.nonce}}" data-onclick="report_postModal('{{p.id}}')"><i class="fas fa-flag text-center text-muted mr-2"></i>Report</button>
{% if FEATURES['AWARDS'] -%}
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" data-url='/award/post/{{p.id}}' data-immune="{{p.author.immune_to_negative_awards(v)}}" data-ghost="{{p.ghost}}" data-nonce="{{g.nonce}}"><i class="fas fa-gift text-center text-muted mr-2"></i>Give Award</button>
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" data-url='/award/post/{{p.id}}' data-immune="{{p.author.immune_to_negative_awards(v)}}" data-ghost="{{p.ghost}}" data-nonce="{{g.nonce}}"><i class="fas fa-gift text-center text-muted mr-2"></i>Give Award</button>
{%- endif %}
<button type="button" id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" data-areyousure="postToastSwitch(this,'/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}','d-none')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-dismiss="modal"><i class="fas fa-bell text-center text-muted mr-2"></i>Subscribe {% if p.num_subscribers %}<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Number of subscribers">[{{p.num_subscribers}}]</span>{% endif %}</button>

View File

@ -1,77 +1,72 @@
{% extends "post.html" %}
{% set score=p.score %}
{% if v %}
{% set voted=p.voted %}
{% set adjust=voted %}
{% set voted=p.voted %}
{% set adjust=voted %}
{% else %}
{% set voted=-2 %}
{% set adjust=0 %}
{% set voted=-2 %}
{% set adjust=0 %}
{% endif %}
{% block title %}
<title>{{p.plaintitle(v)}}</title>
{% if p.is_banned %}
{% else %}
{% endif %}
<title>{{p.plaintitle(v)}}</title>
{% endblock %}
{% block content %}
<div class="mb-2 p-3">
<div class="col-12">
<div id="post-{{p.id}}" class="banned {% if p.award_count('glowie', v) %}glow{% endif %} card d-flex flex-row-reverse flex-nowrap justify-content-end border-0 p-0 {% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
<div class="card-block my-md-auto">
<div class="post-meta text-left d-md-none mb-1">{% if p.nsfw %}<span class="badge badge-danger">NSFW</span> {% endif %}{% if p.is_banned %}Removed by @{{p.ban_reason}} (Site Admin){% else %}[Deleted by user]{% endif %}</div>
<h5 class="card-title post-title text-left mb-0 mb-md-1">{{p.plaintitle(v)}}</h5>
<div class="post-meta text-left d-mob-none">{% if p.nsfw %}<span class="badge badge-danger">NSFW</span> {% endif %}{% if p.is_banned %}Removed by @{{p.ban_reason}} (Site Admin){% else %}[Deleted by user]{% endif %}</div>
</div>
<div id="voting" class="d-md-block my-auto mr-3 text-center">
<div class="post-{{p.id}}-up arrow-up mx-auto">
<div class="mb-2 p-3">
<div class="col-12">
<div id="post-{{p.id}}" class="banned {% if p.award_count('glowie', v) %}glow{% endif %} card d-flex flex-row-reverse flex-nowrap justify-content-end border-0 p-0 {% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
<div class="card-block my-md-auto">
<div class="post-meta text-left d-md-none mb-1">{% if p.nsfw %}<span class="badge badge-danger">NSFW</span> {% endif %}{% if p.is_banned %}Removed by @{{p.ban_reason}} (Site Admin){% else %}[Deleted by user]{% endif %}</div>
<h5 class="card-title post-title text-left mb-0 mb-md-1">{{p.plaintitle(v)}}</h5>
<div class="post-meta text-left d-mob-none">{% if p.nsfw %}<span class="badge badge-danger">NSFW</span> {% endif %}{% if p.is_banned %}Removed by @{{p.ban_reason}} (Site Admin){% else %}[Deleted by user]{% endif %}</div>
</div>
<span class="post-{{p.id}}-score-up score-up text-muted{% if voted!=1 %} d-none{% endif %}"></span>
<span class="post-{{p.id}}-score-none score text-muted{% if voted!=0 and voted!=-2 %} d-none{% endif %}"></span>
<span class="post-{{p.id}}-score-down score-down text-muted{% if voted!=-1 %} d-none{% endif %}"></span>
<div class="post-{{p.id}}-down arrow-down mx-auto">
<div id="voting" class="d-md-block my-auto mr-3 text-center">
<div class="post-{{p.id}}-up arrow-up mx-auto">
</div>
<span class="post-{{p.id}}-score-up score-up text-muted{% if voted!=1 %} d-none{% endif %}"></span>
<span class="post-{{p.id}}-score-none score text-muted{% if voted!=0 and voted!=-2 %} d-none{% endif %}"></span>
<span class="post-{{p.id}}-score-down score-down text-muted{% if voted!=-1 %} d-none{% endif %}"></span>
<div class="post-{{p.id}}-down arrow-down mx-auto">
</div>
</div>
</div>
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] and p.body_html %}
<div class="post-body mt-4 mb-2">
{{p.body_html | safe}}
</div>
{% endif %}
</div>
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] and p.body_html %}
<div class="post-body mt-4 mb-2">
{{p.body_html | safe}}
</div>
<div class="row mb-2 p-3">
<div class="col-12">
<div class="post-actions d-mob-none">
<ul class="list-inline text-left mb-2">
<li class="list-inline-item"><a href="{{p.permalink}}">
<i class="fas fa-comment-dots mr-2"></i><span class="comm-count">{{p.comment_count}}</span> Comment{{'s' if p.comment_count != 1 else ''}}</a>
</li>
</ul>
</div>
{% endif %}
</div>
</div>
<div class="row mb-2 p-3">
<div class="col-12">
<div class="post-actions d-mob-none">
<ul class="list-inline text-left mb-2">
<li class="list-inline-item"><a href="{{p.permalink}}">
<i class="fas fa-comment-dots mr-2"></i><span class="comm-count">{{p.comment_count}}</span> Comment{{'s' if p.comment_count != 1 else ''}}</a>
</li>
</ul>
</div>
</div>
</div>
<div class="comments-count py-3">
{%- import 'util/macros.html' as macros with context -%}
{{- macros.sorting_buttons(COMMENT_SORTS, True) -}}
</div>
<div class="comments-count py-3">
{%- import 'util/macros.html' as macros with context -%}
{{- macros.sorting_buttons(COMMENT_SORTS, True) -}}
</div>
<div class="comment-section">
{% with comments=p.replies %}
{% include "comments.html" %}
{% endwith %}
</div>
{% if offset %}
<script defer src="{{'js/view_more.js' | asset}}"></script>
{% endif %}
<div class="comment-section">
{% with comments=p.replies %}
{% include "comments.html" %}
{% endwith %}
</div>
{% if offset %}
<script defer src="{{'js/view_more.js' | asset}}"></script>
{% endif %}
{% endblock %}
{% block mobileactions %}

View File

@ -13,204 +13,201 @@
{% set disable_votes = request.path.startswith('/@') and v and v.admin_level < PERMS['ENABLE_VOTE_BUTTONS_ON_USER_PAGE'] %}
{% for p in listing if can_see(v, p) %}
<input hidden class="twoattrs" value="{{p.id}},{{p.comment_count}}">
<input hidden class="twoattrs" value="{{p.id}},{{p.comment_count}}">
{% set ups=p.upvotes %}
{% set downs=p.downvotes %}
{% set score=ups-downs %}
{% set ups=p.upvotes %}
{% set downs=p.downvotes %}
{% set score=ups-downs %}
{% if v %}
{% set voted= p.voted %}
{% else %}
{% set voted=-2 %}
{% endif %}
{% if v %}
{% set voted= p.voted %}
{% else %}
{% set voted=-2 %}
{% endif %}
{% set v_forbid_deleted = (p.deleted_utc != 0 or p.is_banned) and not (v and v.admin_level >= PERMS['POST_COMMENT_MODERATION']) and not (v and v.id == p.author_id) %}
{% set v_forbid_deleted = (p.deleted_utc != 0 or p.is_banned) and not (v and v.admin_level >= PERMS['POST_COMMENT_MODERATION']) and not (v and v.id == p.author_id) %}
{{macros.reports(p, 'post')}}
{{macros.reports(p, 'post')}}
<div id="post-{{p.id}}" class="actual-post card {% if p.ghost %}ghost-post{% endif %} {% if p.unread %}unread{% endif %} {% if p.is_banned %} banned{% endif %}{% if p.deleted_utc %} deleted{% endif %}{% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}{% if p.nsfw %} nsfw{% endif %}">
<div class="d-flex flex-row-reverse flex-md-row flex-nowrap" style="align-items:flex-start">
<div class="voting my-2 d-none d-md-flex pr-2">
{% if v %}
<div tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '1')" class="post-{{p.id}}-up mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %} {% if disable_votes and voted != 1 %}disabled {% endif %}"></div>
<div id="post-{{p.id}}" class="actual-post card {% if p.ghost %}ghost-post{% endif %} {% if p.unread %}unread{% endif %} {% if p.is_banned %} banned{% endif %}{% if p.deleted_utc %} deleted{% endif %}{% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}{% if p.nsfw %} nsfw{% 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 %}style="cursor: default">{{score}}</span>
<div class="d-flex flex-row-reverse flex-md-row flex-nowrap" style="align-items:flex-start">
<div class="voting my-2 d-none d-md-flex pr-2">
{% if v %}
<div tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '1')" class="post-{{p.id}}-up mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %} {% if disable_votes and voted != 1 %}disabled {% endif %}"></div>
<div {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %} {% if disable_votes and voted != -1 %}disabled {% endif %}"></div>
{% else %}
<a tabindex="0" data-nonce="{{g.nonce}}" class="post-{{p.id}}-up mx-auto arrow-up" href="/login?redirect={{request.full_path | urlencode}}"></a>
<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 %}style="cursor: default">{{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 %}style="cursor: default">{{score}}</span>
<div {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %} {% if disable_votes and voted != -1 %}disabled {% endif %}"></div>
{% else %}
<a tabindex="0" data-nonce="{{g.nonce}}" class="post-{{p.id}}-up mx-auto arrow-up" href="/login?redirect={{request.full_path | urlencode}}"></a>
<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 %}style="cursor: default">{{score}}</span>
<a {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down text-muted mx-auto arrow-down" href="/login?redirect={{request.full_path | urlencode}}"></a>
{% endif %}
</div>
<div class="card-header bg-transparent border-0 d-flex flex-row flex-nowrap pl-2 pl-md-0 p-0 mr-md-2">
{% if not v_forbid_deleted %}
<div class="card-thumbnail mt-3">
{% if not p.url %}
<a {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
<img alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a>
{% elif p.is_image %}
<a href="{{p.realurl(v)}}" rel="nofollow noopener">
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{{p.realurl(v)}}')" alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a>
{% elif p.is_video or p.is_audio %}
<a href="{{p.realurl(v)}}" rel="nofollow noopener">
<img data-nonce="{{g.nonce}}" data-onclick="togglevideo('{{p.id}}')" alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
{% if p.is_video %}
<i class="video-play fas fa-play"></i>
{% endif %}
</a>
{% elif p.is_youtube %}
<a href="{{p.realurl(v)}}" rel="nofollow noopener">
<img data-nonce="{{g.nonce}}" data-onclick="toggleyoutube('{{p.id}}')" alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
<i class="video-play fas fa-play"></i>
</a>
{% else %}
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
<i class="ext-link fas fa-external-link"></i>
</a>
{% endif %}
</div>
{% endif %}
</div>
<div class="card-block text-left x-scroll-parent w-100">
<div class="post-meta text-left x-scroll hide-scrollbar mb-md-2">
{{macros.post_meta(p)}}
</div>
<h5 class="card-title post-title text-left w-lg-95 pb-0 pb-md-1">
<a id="{{p.id}}-title" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}" class="{% if p.hole %}sub{% endif %} stretched-link {% if p.chudded %}text-uppercase{% endif %}">
{% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}}
</a></h5>
</div>
</div>
<div class="post-actions d-mob-none">
<div class="d-flex" style="flex-basis:146px"></div>
<ul class="list-inline text-right d-flex">
{% if p.realbody(v) %}
<button type="button" class="list-inline-item ml-2" data-nonce="{{g.nonce}}" data-onclick="expandText('{{p.id}}')"><i class="fas fa-expand-alt mx-0 text-expand-icon-{{p.fullname}}"></i></button>
{% endif %}
<a class="list-inline-item" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
<i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}}
<span class="text-info d-none {{p.id}}-new-comments"></span>
</a>
{% include 'post_actions.html' %}
</ul>
</div>
<div class="d-md-none mt-2">
<div class="post-actions">
<ul class="list-inline text-right d-flex">
<li class="list-inline-item mr-auto">
<a {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
<i class="fas fa-comment-dots ml-0 mr-2"></i>{{p.comment_count}}
<span class="text-info d-none {{p.id}}-new-comments"></span>
</a>
{% if v and v.admin_level >= PERMS['ADMIN_HOME_VISIBLE'] %}
<button type="button" class="ml-2" data-bs-toggle="modal" data-bs-target="#adminModal-{{p.id}}">
<i class="fas fa-broom"></i>
</button>
<a {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post', '{{p.id}}', '-1')" class="post-{{p.id}}-down text-muted mx-auto arrow-down" href="/login?redirect={{request.full_path | urlencode}}"></a>
{% endif %}
</li>
</div>
{% if p.realbody(v) %}
<button type="button" class="list-inline-item ml-2" data-nonce="{{g.nonce}}" data-onclick="expandText('{{p.id}}')"><i class="fas fa-expand-alt mx-0 text-expand-icon-{{p.fullname}}"></i></button>
{% endif %}
<div class="card-header bg-transparent border-0 d-flex flex-row flex-nowrap pl-2 pl-md-0 p-0 mr-md-2">
{% if v %}
<li class="list-inline-item">
<button type="button" data-bs-toggle="modal" data-bs-target="#actionsModal-{{p.id}}">
<i class="fas fa-ellipsis-h"></i>
</button>
</li>
{% endif %}
{% if v %}
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
<span tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post-mobile', '{{p.id}}', '1')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %} {% if disable_votes and voted != 1 %}disabled {% endif %}"></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 %}style="cursor: default">{{score}}</span>
<span {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post-mobile', '{{p.id}}', '-1')" 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 %} {% if disable_votes and voted != -1 %}disabled {% endif %}"></span>
</li>
{% else %}
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
<a tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" href="/login?redirect={{request.full_path | urlencode}}">
<i class="fas fa-arrow-alt-up mx-0"></i>
</a>
<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 %}style="cursor: default">{{score}}</span>
<a tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" href="/login?redirect={{request.full_path | urlencode}}">
<i class="fas fa-arrow-alt-down mx-0"></i>
</a>
</li>
{% endif %}
</ul>
</div>
</div>
{% if v %}
<div class="modal fade d-md-none" id="actionsModal-{{p.id}}" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header p-3">
<h6 class="col modal-title text-center">More options</h6>
<button type="button" class="close position-absolute py-3" style="right: 1rem" data-bs-dismiss="modal">
<span><i class="fas fa-times-circle text-gray-500"></i></span>
</button>
</div>
<div class="modal-body">
<ul class="list-group post-actions">
{% include "post_actions_mobile.html" %}
</ul>
{% if not v_forbid_deleted %}
<div class="card-thumbnail mt-3">
{% if not p.url %}
<a {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
<img alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a>
{% elif p.is_image %}
<a href="{{p.realurl(v)}}" rel="nofollow noopener">
<img data-nonce="{{g.nonce}}" data-onclick="expandImage('{{p.realurl(v)}}')" alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a>
{% elif p.is_video or p.is_audio %}
<a href="{{p.realurl(v)}}" rel="nofollow noopener">
<img data-nonce="{{g.nonce}}" data-onclick="togglevideo('{{p.id}}')" alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
{% if p.is_video %}
<i class="video-play fas fa-play"></i>
{% endif %}
</a>
{% elif p.is_youtube %}
<a href="{{p.realurl(v)}}" rel="nofollow noopener">
<img data-nonce="{{g.nonce}}" data-onclick="toggleyoutube('{{p.id}}')" alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
<i class="video-play fas fa-play"></i>
</a>
{% else %}
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
<i class="ext-link fas fa-external-link"></i>
</a>
{% endif %}
</div>
{% endif %}
</div>
<div class="card-block text-left x-scroll-parent w-100">
<div class="post-meta text-left x-scroll hide-scrollbar mb-md-2">
{{macros.post_meta(p)}}
</div>
<h5 class="card-title post-title text-left w-lg-95 pb-0 pb-md-1">
<a id="{{p.id}}-title" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}" class="{% if p.hole %}sub{% endif %} stretched-link {% if p.chudded %}text-uppercase{% endif %}">
{% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}}
</a></h5>
</div>
</div>
<div class="post-actions d-mob-none">
<div class="d-flex" style="flex-basis:146px"></div>
<ul class="list-inline text-right d-flex">
{% if p.realbody(v) %}
<button type="button" class="list-inline-item ml-2" data-nonce="{{g.nonce}}" data-onclick="expandText('{{p.id}}')"><i class="fas fa-expand-alt mx-0 text-expand-icon-{{p.fullname}}"></i></button>
{% endif %}
<a class="list-inline-item" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
<i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}}
<span class="text-info d-none {{p.id}}-new-comments"></span>
</a>
{% include 'post_actions.html' %}
</ul>
</div>
<div class="d-md-none mt-2">
<div class="post-actions">
<ul class="list-inline text-right d-flex">
<li class="list-inline-item mr-auto">
<a {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
<i class="fas fa-comment-dots ml-0 mr-2"></i>{{p.comment_count}}
<span class="text-info d-none {{p.id}}-new-comments"></span>
</a>
{% if v and v.admin_level >= PERMS['ADMIN_HOME_VISIBLE'] %}
<button type="button" class="ml-2" data-bs-toggle="modal" data-bs-target="#adminModal-{{p.id}}">
<i class="fas fa-broom"></i>
</button>
{% endif %}
</li>
{% if p.realbody(v) %}
<button type="button" class="list-inline-item ml-2" data-nonce="{{g.nonce}}" data-onclick="expandText('{{p.id}}')"><i class="fas fa-expand-alt mx-0 text-expand-icon-{{p.fullname}}"></i></button>
{% endif %}
{% if v %}
<li class="list-inline-item">
<button type="button" data-bs-toggle="modal" data-bs-target="#actionsModal-{{p.id}}">
<i class="fas fa-ellipsis-h"></i>
</button>
</li>
{% endif %}
{% if v %}
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
<span tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post-mobile', '{{p.id}}', '1')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %} {% if disable_votes and voted != 1 %}disabled {% endif %}"></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 %}style="cursor: default">{{score}}</span>
<span {% if DISABLE_DOWNVOTES %}style="display:None!important"{% endif %} tabindex="0" data-nonce="{{g.nonce}}" data-onclick="vote('post-mobile', '{{p.id}}', '-1')" 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 %} {% if disable_votes and voted != -1 %}disabled {% endif %}"></span>
</li>
{% else %}
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
<a tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" href="/login?redirect={{request.full_path | urlencode}}">
<i class="fas fa-arrow-alt-up mx-0"></i>
</a>
<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 %}style="cursor: default">{{score}}</span>
<a tabindex="0" class="arrow-{{p.id}}-mobile-down arrow-mobile-down mx-0 pl-1 my-0" href="/login?redirect={{request.full_path | urlencode}}">
<i class="fas fa-arrow-alt-down mx-0"></i>
</a>
</li>
{% endif %}
</ul>
</div>
</div>
{% if v %}
<div class="modal fade d-md-none" id="actionsModal-{{p.id}}" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header p-3">
<h6 class="col modal-title text-center">More options</h6>
<button type="button" class="close position-absolute py-3" style="right: 1rem" data-bs-dismiss="modal">
<span><i class="fas fa-times-circle text-gray-500"></i></span>
</button>
</div>
<div class="modal-body">
<ul class="list-group post-actions">
{% include "post_actions_mobile.html" %}
</ul>
</div>
</div>
</div>
</div>
{% endif %}
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% include "post_admin_actions_mobile.html" %}
{% endif %}
{% if not v_forbid_deleted %}
{% if p.realbody(v) %}
<div class="{% if p.chudded %}text-uppercase chud-img chud-{{p.id_last_num}}{% endif %} d-none card rounded border post-preview" id="post-text-{{p.id}}">
{{p.realbody(v) | safe}}
</div>
{% endif %}
{% if p.is_video %}
<div id="video-{{p.id}}" class="d-none ml-md-5 mt-md-4 mt-2 mx-sm-auto">
<p class="resizable">
<video {% if p.poster_url %}poster="{{p.poster_url}}"{% endif %} id="video2-{{p.id}}" controls preload="none" src="{{p.realurl(v)}}"></video>
</p>
</div>
{% elif p.is_audio %}
<div id="video-{{p.id}}" class="d-none ml-md-5 mt-md-4 mt-2 mx-sm-auto">
<audio id="video2-{{p.id}}" controls preload="none" src="{{p.realurl(v)}}"></audio>
</div>
{% elif p.is_youtube %}
<div id="video-{{p.id}}" class="d-none ml-md-5 mt-md-4 mt-2 resizable">
{{p.embed | safe}}
</div>
{% endif %}
{% endif %}
</div>
{% endif %}
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% include "post_admin_actions_mobile.html" %}
{% endif %}
{% if not v_forbid_deleted %}
{% if p.realbody(v) %}
<div class="{% if p.chudded %}text-uppercase chud-img chud-{{p.id_last_num}}{% endif %} d-none card rounded border post-preview" id="post-text-{{p.id}}">
{{p.realbody(v) | safe}}
</div>
{% endif %}
{% if p.is_video %}
<div id="video-{{p.id}}" class="d-none ml-md-5 mt-md-4 mt-2 mx-sm-auto">
<p class="resizable">
<video {% if p.poster_url %}poster="{{p.poster_url}}"{% endif %} id="video2-{{p.id}}" controls preload="none" src="{{p.realurl(v)}}"></video>
</p>
</div>
{% elif p.is_audio %}
<div id="video-{{p.id}}" class="d-none ml-md-5 mt-md-4 mt-2 mx-sm-auto">
<audio id="video2-{{p.id}}" controls preload="none" src="{{p.realurl(v)}}"></audio>
</div>
{% elif p.is_youtube %}
<div id="video-{{p.id}}" class="d-none ml-md-5 mt-md-4 mt-2 resizable">
{{p.embed | safe}}
</div>
{% endif %}
{% endif %}
</div>
{% else %}
<div class="row no-gutters">
<div class="col">

View File

@ -2,7 +2,7 @@
{% block pagetype %}search{% endblock %}
{% block pagetitle %}Search for "{{query}}"{% endblock %}
{% block head_final %}
<meta name="description" content="{{total}} result{{'s' if total != 1 else ''}}">
<meta name="description" content="{{total}} result{{'s' if total != 1 else ''}}">
{% endblock %}
{% block PseudoSubmitForm %}
@ -18,133 +18,133 @@
{% endblock %}
{% block navbar %}{% endblock %}
{% block content %}
<div class="row no-gutters my-md-3">
<div class="col">
<div class="card search-results">
<div class="row no-gutters my-md-3">
<div class="col">
<div class="card search-results">
<div class="card-header bg-white d-none">
<ul class="list-inline no-bullets mb-0">
<li class="list-inline-item active mr-4"><i class="fas fa-align-left text-gray-400"></i></li>
<li class="list-inline-item"><i class="fas fa-link text-gray-400"></i></li>
</ul>
</div>
<div class="card-body pb-2">
<div>
<div id="searchparams-dropdown" class="dropdown dropdown-actions">
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton2" data-bs-toggle="dropdown" data-bs-display="static"><strong>Advanced search parameters (with examples)</strong></button>
<div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px)">
<div>
<div style="display: inline-block; width: 150px; text-align: center">Before Date:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">before:2022-12-30</button>
</div>
<div>
<div style="display: inline-block; width: 150px; text-align: center">After Date:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">after:2022-12-30</button>
</div>
<div class="card-header bg-white d-none">
<ul class="list-inline no-bullets mb-0">
<li class="list-inline-item active mr-4"><i class="fas fa-align-left text-gray-400"></i></li>
<li class="list-inline-item"><i class="fas fa-link text-gray-400"></i></li>
</ul>
</div>
<div class="card-body pb-2">
<div>
<div id="searchparams-dropdown" class="dropdown dropdown-actions">
<button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton2" data-bs-toggle="dropdown" data-bs-display="static"><strong>Advanced search parameters (with examples)</strong></button>
<div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px)">
<div>
<div style="display: inline-block; width: 150px; text-align: center">Before Date:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">before:2022-12-30</button>
</div>
<div>
<div style="display: inline-block; width: 150px; text-align: center">After Date:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">after:2022-12-30</button>
</div>
{% if not request.path.startswith('/search/users') %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Author:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">author:quadnarca</button>
</div>
{% endif %}
{% if not request.path.startswith('/search/users') %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Author:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">author:quadnarca</button>
</div>
{% endif %}
{% if request.path.startswith('/search/messages') %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Sent To:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">sentto:carpathianflorist</button>
</div>
{% elif request.path.startswith('/search/posts') or request.path.startswith('/search/comments') %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Hole:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">hole:music</button>
</div>
{% if request.path.startswith('/search/comments') %}
{% if request.path.startswith('/search/messages') %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Post ID:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">post:504</button>
<div style="display: inline-block; width: 150px; text-align: center">Sent To:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">sentto:carpathianflorist</button>
</div>
{% elif request.path.startswith('/search/posts') %}
{% elif request.path.startswith('/search/posts') or request.path.startswith('/search/comments') %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Domain:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">domain:reddit.com</button>
<div style="display: inline-block; width: 150px; text-align: center">Hole:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">hole:music</button>
</div>
<div>
<div style="display: inline-block; width: 150px; text-align: center">Post Title Only:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">title:true</button>
</div>
<div>
<div style="display: inline-block; width: 150px; text-align: center">Exact Match Only:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">exact:true</button>
</div>
{% if SITE_NAME != 'WPD' %}
{% if request.path.startswith('/search/comments') %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Subreddit:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">subreddit:menslib</button>
<div style="display: inline-block; width: 150px; text-align: center">Post ID:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">post:504</button>
</div>
{% elif request.path.startswith('/search/posts') %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Domain:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">domain:reddit.com</button>
</div>
<div>
<div style="display: inline-block; width: 150px; text-align: center">Post Title Only:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">title:true</button>
</div>
<div>
<div style="display: inline-block; width: 150px; text-align: center">Exact Match Only:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">exact:true</button>
</div>
{% if SITE_NAME != 'WPD' %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Subreddit:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">subreddit:menslib</button>
</div>
{% endif %}
{% endif %}
{% if FEATURES['NSFW_MARKING'] %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">NSFW Only:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">nsfw:true</button>
</div>
{% endif %}
{% endif %}
{% if FEATURES['NSFW_MARKING'] %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">NSFW Only:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">nsfw:true</button>
</div>
</div>
</div>
<br>
<script defer src="{{'js/search.js' | asset}}"></script>
<div class="text-muted text-small mb-1">Showing {% block listinglength %}{{listing | length}}{% endblock %} of {{total}} result{{'s' if total != 1 else ''}} for</div>
<h4 class=" mb-0">{{query}}</h4>
{% if not '/users' in request.path %}
<div class="mt-3 d-flex align-items-center fl-r">
{%- import 'util/macros.html' as macros with context -%}
{{- macros.time_filter_buttons() -}}
{% if "/posts" in request.path %}
{{- macros.sorting_buttons(POST_SORTS) -}}
{% else %}
{{- macros.sorting_buttons(COMMENT_SORTS) -}}
{% endif %}
{% endif %}
</div>
</div>
{% endif %}
</div>
<br>
<script defer src="{{'js/search.js' | asset}}"></script>
<div class="text-muted text-small mb-1">Showing {% block listinglength %}{{listing | length}}{% endblock %} of {{total}} result{{'s' if total != 1 else ''}} for</div>
<h4 class=" mb-0">{{query}}</h4>
{% if not '/users' in request.path %}
<div class="mt-3 d-flex align-items-center fl-r">
{%- import 'util/macros.html' as macros with context -%}
{{- macros.time_filter_buttons() -}}
{% if "/posts" in request.path %}
{{- macros.sorting_buttons(POST_SORTS) -}}
{% else %}
{{- macros.sorting_buttons(COMMENT_SORTS) -}}
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
<div class="row no-gutters">
<div class="col">
<div class="flex-row box-shadow-bottom d-flex justify-content-center justify-content-md-between align-items-center">
<ul class="nav settings-nav">
<li class="nav-item">
<a class="nav-link{% if '/posts' in request.path %} active{% endif %}" href="/search/posts/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Posts</a>
</li>
<li class="nav-item">
<a class="nav-link{% if '/comments' in request.path %} active{% endif %}" href="/search/comments/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Comments</a>
</li>
<li class="nav-item">
<a class="nav-link{% if '/users' in request.path %} active{% endif %}" href="/search/users/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Users</a>
</li>
<li class="nav-item">
<a class="nav-link{% if '/messages' in request.path %} active{% endif %}" href="/search/messages/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Messages</a>
</li>
</ul>
<div class="row no-gutters">
<div class="col">
<div class="flex-row box-shadow-bottom d-flex justify-content-center justify-content-md-between align-items-center">
<ul class="nav settings-nav">
<li class="nav-item">
<a class="nav-link{% if '/posts' in request.path %} active{% endif %}" href="/search/posts/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Posts</a>
</li>
<li class="nav-item">
<a class="nav-link{% if '/comments' in request.path %} active{% endif %}" href="/search/comments/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Comments</a>
</li>
<li class="nav-item">
<a class="nav-link{% if '/users' in request.path %} active{% endif %}" href="/search/users/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Users</a>
</li>
<li class="nav-item">
<a class="nav-link{% if '/messages' in request.path %} active{% endif %}" href="/search/messages/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Messages</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row no-gutters">
<div class="col-12">
<div class="posts">
{% block listing_template %}
{% include "post_listing.html" %}
{% endblock %}
<div class="row no-gutters">
<div class="col-12">
<div class="posts">
{% block listing_template %}
{% include "post_listing.html" %}
{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -17,5 +17,5 @@
{% endblock %}
{% block listinglength %}
{{comments | length}}
{{comments | length}}
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "search.html" %}
{% block listing_template %}
<div class="row row-cols-1 row-cols-md-3 mt-3">
{% include "user_listing.html" %}
</div>
<div class="row row-cols-1 row-cols-md-3 mt-3">
{% include "user_listing.html" %}
</div>
{% endblock %}
{% block listinglength %}{{users | length}}{% endblock %}
{% block listinglength %}{{users | length}}{% endblock %}

View File

@ -43,12 +43,11 @@
</div>
</div>
{% block clipboard %}
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
</div>
</div>
{% endblock %}
{% block onload %}{% endblock %}
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
{% endblock %}

View File

@ -1,159 +1,159 @@
{% extends "settings.html" %}
{% block pagetitle %}Advanced Settings{% endblock %}
{% block content %}
<div class="row settings-page" id="settings-page-advanced">
<div class="col col-lg-8">
<div class="settings">
{# toggle_section(title, id, name, flag, below_text) #}
<section id="site-settings-poor-mode-section" class="settings-section-section"> {# note: not using the thing from common just because of how much stuff there is in here #}
<h5>Poor Mode</h5>
<div class="settings-section rounded">
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="poor">Poor Mode</label>
</div>
<div class="body w-lg-100 pt-1 pt-lg-3">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input setting_switch" data-nonce="{{g.nonce}}" id="poor" name="poor"{% if v.poor %} checked{% endif %}>
<label class="custom-control-label" for="poor"></label>
</div>
<span class="text-small text-muted">Makes the site faster for low-end devices:</span>
<ul>
<li><small>Disables the effects of cosmetic awards.</small></li>
<li><small>Makes emoji search only start when you press Enter.</small></li>
<li><small>Hides signatures.</small></li>
<li><small>Limits frontpage size to 25 posts.</small></li>
</ul>
</div>
</div>
</div>
</section>
<section id="site-settings-sort-time-filter-section" class="settings-section-section">
<h5>Sorting and Filtering</h5>
<div class="settings-section rounded">
<div class="row settings-page" id="settings-page-advanced">
<div class="col col-lg-8">
<div class="settings">
{# toggle_section(title, id, name, flag, below_text) #}
<section id="site-settings-poor-mode-section" class="settings-section-section"> {# note: not using the thing from common just because of how much stuff there is in here #}
<h5>Poor Mode</h5>
<div class="settings-section rounded">
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="frontsize">Frontpage Size</label>
<label for="poor">Poor Mode</label>
</div>
<div class="body w-lg-100">
<p>Change how many posts appear on every page.</p>
<div class="input-group">
<select autocomplete="off" id='frontsize' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="frontsize">
{% for entry in PAGE_SIZES %}
<option value="{{entry}}"{{' selected' if v.frontsize==entry}}>{{entry}}</option>
{% endfor %}
<div class="body w-lg-100 pt-1 pt-lg-3">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input setting_switch" data-nonce="{{g.nonce}}" id="poor" name="poor"{% if v.poor %} checked{% endif %}>
<label class="custom-control-label" for="poor"></label>
</div>
<span class="text-small text-muted">Makes the site faster for low-end devices:</span>
<ul>
<li><small>Disables the effects of cosmetic awards.</small></li>
<li><small>Makes emoji search only start when you press Enter.</small></li>
<li><small>Hides signatures.</small></li>
<li><small>Limits frontpage size to 25 posts.</small></li>
</ul>
</div>
</div>
</div>
</section>
<section id="site-settings-sort-time-filter-section" class="settings-section-section">
<h5>Sorting and Filtering</h5>
<div class="settings-section rounded">
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="frontsize">Frontpage Size</label>
</div>
<div class="body w-lg-100">
<p>Change how many posts appear on every page.</p>
<div class="input-group">
<select autocomplete="off" id='frontsize' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="frontsize">
{% for entry in PAGE_SIZES %}
<option value="{{entry}}"{{' selected' if v.frontsize==entry}}>{{entry}}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="defaultsortingcomments">Default Sorting for Comments</label>
</div>
<div class="body w-lg-100">
<p>Change the default sorting for comments.</p>
<div class="input-group">
<select autocomplete="off" id='defaultsortingcomments' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaultsortingcomments">
{% for entry in COMMENT_SORTS.keys() %}
<option value="{{entry}}"{{' selected' if v.defaultsortingcomments==entry}}>{{entry}}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="defaultsorting">Default Sorting for Posts</label>
</div>
<div class="body w-lg-100">
<p>Change the default sorting for posts.</p>
<div class="input-group">
<select autocomplete="off" id='defaultsorting' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaultsorting">
{% for entry in POST_SORTS.keys() %}
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry}}>{{entry}}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="defaultsortingcomments">Default Sorting for Comments</label>
<label for="defaulttime">Default Time Filter for Posts</label>
</div>
<div class="body w-lg-100">
<p>Change the default sorting for comments.</p>
<p>Change the default time filter for posts.</p>
<div class="input-group">
<select autocomplete="off" id='defaultsortingcomments' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaultsortingcomments">
{% for entry in COMMENT_SORTS.keys() %}
<option value="{{entry}}"{{' selected' if v.defaultsortingcomments==entry}}>{{entry}}</option>
<select autocomplete="off" id='defaulttime' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaulttime">
{% for entry in TIME_FILTERS.keys() %}
<option value="{{entry}}"{{' selected' if v.defaulttime==entry}}>{{entry}}</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
</section>
<section id="site-settings-tab-behavior-section" class="settings-section-section">
<h5>Tab Behavior</h5>
<div class="settings-section rounded">
{{common.toggle_section("Open Internal Links in New Tabs", "newtab", "newtab", v.newtab, "Enable if you would like to automatically open links to other pages on the site in new tabs.", false)}}
{{common.toggle_section("Open External Links in New Tabs", "newtabexternal", "newtabexternal", v.newtabexternal, "Enable if you would like to automatically open links to other sites in new tabs.", false)}}
</div>
</section>
<section id="site-settings-external-services-section" class="settings-section-section">
<h5>External Services</h5>
<div class="settings-section rounded">
{{common.toggle_section("Use Nitter for Twitter Links", "nitter", "nitter", v.nitter, "Enable if you would like to automatically convert twitter.com links to nitter.net links.", false)}}
{{common.toggle_section("Use imgsed for Instagram Links", "imgsed", "imgsed", v.imgsed, "Enable if you would like to automatically convert instagram.com links to imgsed.com links.", false)}}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="defaultsorting">Default Sorting for Posts</label>
<label for="reddit">Reddit Domain</label>
</div>
<div class="body w-lg-100">
<p>Change the default sorting for posts.</p>
<p>Change the domain you would like to view reddit posts in.</p>
<div class="input-group">
<select autocomplete="off" id='defaultsorting' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaultsorting">
{% for entry in POST_SORTS.keys() %}
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry}}>{{entry}}</option>
<select autocomplete="off" id='reddit' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="reddit">
{% for entry in ['old.reddit.com', 'reddit.com', 'teddit.net', 'libreddit.hu', 'undelete.pullpush.io'] %}
<option value="{{entry}}"{{' selected' if v.reddit==entry}}>{{entry}}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="defaulttime">Default Time Filter for Posts</label>
</div>
<div class="body w-lg-100">
<p>Change the default time filter for posts.</p>
<div class="input-group">
<select autocomplete="off" id='defaulttime' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaulttime">
{% for entry in TIME_FILTERS.keys() %}
<option value="{{entry}}"{{' selected' if v.defaulttime==entry}}>{{entry}}</option>
{% endfor %}
</select>
{{common.toggle_section("Sort Reddit Links by Controversial", "controversial", "controversial", v.controversial, "Enable if you would like to automatically sort reddit.com links by controversial.", false)}}
</div>
</section>
<section id="site-settings-content-filters" class="settings-section-section">
<h5>Content Filters</h5>
<div class="settings-section rounded">
{{common.toggle_section('User Signatures', 'show_sigs', 'show_sigs', v.show_sigs, 'Show user signatures.', false)}}
{% if FEATURES['NSFW_MARKING'] %}
{{common.toggle_section('NSFW Warnings', 'nsfw_warnings', 'nsfw_warnings', v.nsfw_warnings, "Show a warning when viewing NSFW posts and collapse NSFW comments.", false)}}
{% endif %}
{% if SITE_NAME != 'rDrama' %}
{{common.toggle_section('Hide Posts Voted On', 'hidevotedon', 'hidevotedon', v.hidevotedon, 'Enable if you would like to automatically hide posts you have voted on from your frontpage.', false)}}
{% endif %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="custom-filter">Custom Filters</label>
</div>
<div class="body w-lg-100">
<form id="custom-filter" action="/settings/filters" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<small>Hides matching posts from the frontpage and collapses matching comments.</small>
<textarea autocomplete="off" class="form-control rounded" id="filters-text"
placeholder="Add your own custom content filters."
rows="3" name="filters" form="custom-filter" maxlength="1000">{% if v.custom_filter_list %}{{v.custom_filter_list}}{% endif %}</textarea>
<small>Use a new line for each filter entry. Limit of 1000 characters.</small>
<div class="d-flex">
<input autocomplete="off" class="btn btn-primary ml-auto" id="bioSave" type="submit" value="Save Changes">
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<section id="site-settings-tab-behavior-section" class="settings-section-section">
<h5>Tab Behavior</h5>
<div class="settings-section rounded">
{{common.toggle_section("Open Internal Links in New Tabs", "newtab", "newtab", v.newtab, "Enable if you would like to automatically open links to other pages on the site in new tabs.", false)}}
{{common.toggle_section("Open External Links in New Tabs", "newtabexternal", "newtabexternal", v.newtabexternal, "Enable if you would like to automatically open links to other sites in new tabs.", false)}}
</div>
</section>
<section id="site-settings-external-services-section" class="settings-section-section">
<h5>External Services</h5>
<div class="settings-section rounded">
{{common.toggle_section("Use Nitter for Twitter Links", "nitter", "nitter", v.nitter, "Enable if you would like to automatically convert twitter.com links to nitter.net links.", false)}}
{{common.toggle_section("Use imgsed for Instagram Links", "imgsed", "imgsed", v.imgsed, "Enable if you would like to automatically convert instagram.com links to imgsed.com links.", false)}}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="reddit">Reddit Domain</label>
</div>
<div class="body w-lg-100">
<p>Change the domain you would like to view reddit posts in.</p>
<div class="input-group">
<select autocomplete="off" id='reddit' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="reddit">
{% for entry in ['old.reddit.com', 'reddit.com', 'teddit.net', 'libreddit.hu', 'undelete.pullpush.io'] %}
<option value="{{entry}}"{{' selected' if v.reddit==entry}}>{{entry}}</option>
{% endfor %}
</select>
</div>
</div>
</div>
{{common.toggle_section("Sort Reddit Links by Controversial", "controversial", "controversial", v.controversial, "Enable if you would like to automatically sort reddit.com links by controversial.", false)}}
</div>
</section>
<section id="site-settings-content-filters" class="settings-section-section">
<h5>Content Filters</h5>
<div class="settings-section rounded">
{{common.toggle_section('User Signatures', 'show_sigs', 'show_sigs', v.show_sigs, 'Show user signatures.', false)}}
{% if FEATURES['NSFW_MARKING'] %}
{{common.toggle_section('NSFW Warnings', 'nsfw_warnings', 'nsfw_warnings', v.nsfw_warnings, "Show a warning when viewing NSFW posts and collapse NSFW comments.", false)}}
{% endif %}
{% if SITE_NAME != 'rDrama' %}
{{common.toggle_section('Hide Posts Voted On', 'hidevotedon', 'hidevotedon', v.hidevotedon, 'Enable if you would like to automatically hide posts you have voted on from your frontpage.', false)}}
{% endif %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="custom-filter">Custom Filters</label>
</div>
<div class="body w-lg-100">
<form id="custom-filter" action="/settings/filters" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<small>Hides matching posts from the frontpage and collapses matching comments.</small>
<textarea autocomplete="off" class="form-control rounded" id="filters-text"
placeholder="Add your own custom content filters."
rows="3" name="filters" form="custom-filter" maxlength="1000">{% if v.custom_filter_list %}{{v.custom_filter_list}}{% endif %}</textarea>
<small>Use a new line for each filter entry. Limit of 1000 characters.</small>
<div class="d-flex">
<input autocomplete="off" class="btn btn-primary ml-auto" id="bioSave" type="submit" value="Save Changes">
</div>
</form>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,138 +1,139 @@
{% extends "settings.html" %}
{% block pagetitle %}Apps/Bots{% endblock %}
{% block content %}
<div class="row">
<div class="col col-lg-8">
<div class="settings">
<h5>API Guide</h5>
<a style="font-size:18px" href="/api">{{SITE_FULL}}/api</a>
<div class="row">
<div class="col col-lg-8">
<div class="settings">
<h5>API Guide</h5>
<a style="font-size:18px" href="/api">{{SITE_FULL}}/api</a>
<h5 class="mt-6">Your API Applications</h5>
{% for app in v.applications if app.client_id %}
<form id="edit-app-{{app.id}}" action="/edit_app/{{app.id}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="name-{{app.id}}">{{app.app_name}}</label>
<h5 class="mt-6">Your API Applications</h5>
{% for app in v.applications if app.client_id %}
<form id="edit-app-{{app.id}}" action="/edit_app/{{app.id}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="name-{{app.id}}">{{app.app_name}}</label>
</div>
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<input autocomplete="off" id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}">
{% if app.client_id %}
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
<input autocomplete="off" id="edit-{{app.id}}-client-id" class="form-control copy-link" type="text" name="name" value="{{app.client_id}}" data-clipboard-text="{{app.client_id}}" readonly="readonly">
{% endif %}
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<input autocomplete="off" id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}">
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<textarea rows="10" autocomplete="off" form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256">{{app.description}}</textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<button type="button" class="btn btn-secondary ml-auto" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/reroll/{{app.id}}')">Reroll Client ID</button>
<input type="submit" class="btn btn-primary ml-2" value="Save Changes">
</div>
</div>
</div>
</form>
{% else %}
<p>None</p>
{% endfor %}
<h5 class="mt-6">API Applications Awaiting Approval</h5>
{% for app in v.applications if not app.client_id %}
<form id="edit-app-{{app.id}}" action="/edit_app/{{app.id}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="name-{{app.id}}">{{app.app_name}}</label>
</div>
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<input autocomplete="off" id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}" maxlength="50" required>
{% if app.client_id %}
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
<input autocomplete="off" id="edit-{{app.id}}-client-id" class="form-control copy-link" type="text" name="name" value="{{app.client_id}}" data-clipboard-text="{{app.client_id}}" readonly>
{% endif %}
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<input autocomplete="off" id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}" maxlength="4096" required>
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<textarea rows="10" autocomplete="off" form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256" required>{{app.description}}</textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<input type="submit" class="btn btn-primary ml-auto" value="Save Changes">
</div>
</div>
</div>
</form>
{% else %}
<p>None</p>
{% endfor %}
<h5 class="mt-6">Your Authorized Applications</h5>
{% for auth in v.authorizations %}
<div id="auth-{{auth.id}}" class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="name-{{auth.application.id}}">{{auth.application.app_name}}</label>
</div>
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="mb-0 w-lg-25">Description</label>
<textarea autocomplete="off" class="form-control" name="description" maxlength="256" readonly="readonly">{{auth.application.description}}</textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<button type="button" class="btn btn-primary ml-auto text-white" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/rescind/{{auth.application.id}}')">Revoke</button>
</div>
</div>
</div>
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<input autocomplete="off" id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}">
{% else %}
<p>None</p>
{% endfor %}
{% if app.client_id %}
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
<input autocomplete="off" id="edit-{{app.id}}-client-id" class="form-control copy-link" type="text" name="name" value="{{app.client_id}}" data-clipboard-text="{{app.client_id}}" readonly="readonly">
{% endif %}
<h5 class="mt-6">Request API Keys</h2>
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<input autocomplete="off" id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}">
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<textarea rows="10" autocomplete="off" form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256">{{app.description}}</textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<button type="button" class="btn btn-secondary ml-auto" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/reroll/{{app.id}}')">Reroll Client ID</button>
<input type="submit" class="btn btn-primary ml-2" value="Save Changes">
<form id="api-key-request-form" action="/api_keys" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="form-username">Username</label>
<input autocomplete="off" type="text" id="form-username" class="form-control" name="username" value="{{v.username}}" readonly>
<label for="form-appname">Application Name</label>
<input autocomplete="off" type="text" id="form-appname" class="form-control" name="name" maxlength="50" required>
<label for="form-redirect">Redirect URI</label>
<input autocomplete="off" type="text" id="form-redirect" class="form-control" name="redirect_uri" maxlength="4096" required>
<label for="form-username">Description</label>
<textarea autocomplete="off" form="api-key-request-form" id="form-desc" class="form-control" name="description" maxlength="256" required></textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<input type="submit" class="btn btn-primary ml-auto" value="Request API Key">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</form>
{% else %}
<p>None</p>
{% endfor %}
<h5 class="mt-6">API Applications Awaiting Approval</h5>
{% for app in v.applications if not app.client_id %}
<form id="edit-app-{{app.id}}" action="/edit_app/{{app.id}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="name-{{app.id}}">{{app.app_name}}</label>
</div>
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label>
<input autocomplete="off" id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}" maxlength="50" required>
{% if app.client_id %}
<label for="edit-{{app.id}}-client-id" class="mb-0 w-lg-25">Client ID</label>
<input autocomplete="off" id="edit-{{app.id}}-client-id" class="form-control copy-link" type="text" name="name" value="{{app.client_id}}" data-clipboard-text="{{app.client_id}}" readonly>
{% endif %}
<label for="edit-{{app.id}}-redirect" class="mb-0 w-lg-25">Redirect URI</label>
<input autocomplete="off" id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}" maxlength="4096" required>
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label>
<textarea rows="10" autocomplete="off" form="edit-app-{{app.id}}" class="form-control" name="description" id="edit-{{app.id}}-desc" maxlength="256" required>{{app.description}}</textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<input type="submit" class="btn btn-primary ml-auto" value="Save Changes">
</div>
</div>
</div>
</form>
{% else %}
<p>None</p>
{% endfor %}
<h5 class="mt-6">Your Authorized Applications</h5>
{% for auth in v.authorizations %}
<div id="auth-{{auth.id}}" class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="name-{{auth.application.id}}">{{auth.application.app_name}}</label>
</div>
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="mb-0 w-lg-25">Description</label>
<textarea autocomplete="off" class="form-control" name="description" maxlength="256" readonly="readonly">{{auth.application.description}}</textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<button type="button" class="btn btn-primary ml-auto text-white" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/rescind/{{auth.application.id}}')">Revoke</button>
</div>
</div>
</div>
{% else %}
<p>None</p>
{% endfor %}
<h5 class="mt-6">Request API Keys</h2>
<form id="api-key-request-form" action="/api_keys" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="body w-lg-100">
<input hidden name="formkey" value="{{v|formkey}}">
<label for="form-username">Username</label>
<input autocomplete="off" type="text" id="form-username" class="form-control" name="username" value="{{v.username}}" readonly>
<label for="form-appname">Application Name</label>
<input autocomplete="off" type="text" id="form-appname" class="form-control" name="name" maxlength="50" required>
<label for="form-redirect">Redirect URI</label>
<input autocomplete="off" type="text" id="form-redirect" class="form-control" name="redirect_uri" maxlength="4096" required>
<label for="form-username">Description</label>
<textarea autocomplete="off" form="api-key-request-form" id="form-desc" class="form-control" name="description" maxlength="256" required></textarea>
</div>
</div>
<div class="footer">
<div class="d-flex">
<input type="submit" class="btn btn-primary ml-auto" value="Request API Key">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
{% endblock %}
{% block clipboard %}
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Token copied to clipboard
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Token copied to clipboard
</div>
</div>
</div>
{% endblock %}

View File

@ -1,55 +1,55 @@
{%- import 'util/macros.html' as macros with context -%}
{% macro toggle_section(title, id, name, flag, below_text, disabled) %}
<div id="{{id}}_toggle" class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="{{id}}">{{title}}</label>
</div>
<div class="body w-lg-100 pt-1 pt-lg-3">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input setting_switch" data-nonce="{{g.nonce}}" id="{{id}}" name="{{name}}"{% if flag %} checked{% endif %} {% if disabled %}disabled{% endif %}>
<label class="custom-control-label" for="{{id}}"></label>
<div id="{{id}}_toggle" class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="{{id}}">{{title}}</label>
</div>
<div class="body w-lg-100 pt-1 pt-lg-3">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input setting_switch" data-nonce="{{g.nonce}}" id="{{id}}" name="{{name}}"{% if flag %} checked{% endif %} {% if disabled %}disabled{% endif %}>
<label class="custom-control-label" for="{{id}}"></label>
</div>
{% if below_text %}
<span class="text-small text-muted">{{below_text|safe}}</span>
{% endif %}
</div>
{% if below_text %}
<span class="text-small text-muted">{{below_text|safe}}</span>
{% endif %}
</div>
</div>
{% endmacro %}
{% macro color_section(id, form_action, form_name, section_title, current_color) %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="{{id}}">{{section_title}}</label>
</div>
<div class="body w-lg-100 d-lg-flex">
<div class="d-flex">
<form action="{{form_action}}" id="{{id}}-form" method="post" class="color-picker" style="line-height: 0">
<input hidden name="formkey" value="{{v|formkey}}">
{% for themecolor in COLORS %}
<input autocomplete="off" type="radio" name="{{form_name}}" id="{{id}}-{{themecolor}}" value="{{themecolor}}" {% if current_color == themecolor %}checked{% endif %} data-nonce="{{g.nonce}}" onclick_submit>
<label class="color-radio" for="{{id}}-{{themecolor}}">
<span style="background-color: #{{themecolor}}">
{% if current_color and current_color.lower() == themecolor %}
<i class="fas fa-check text-white"></i>
{% else %}
&nbsp;
{% endif %}
</span>
</label>
{% endfor %}
</form>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="{{id}}">{{section_title}}</label>
</div>
<p class="text-small mb-2">Or type a color hex code:</p>
<div class="d-flex">
<form action="{{form_action}}" id="{{id}}-color-code-form" method="post">
<input hidden name="formkey" value="{{v|formkey}}">
<input autocomplete="off" class="form-control" type="text" name="{{form_name}}" id="{{id}}-color-code" minlength="6" maxlength="6" value="{% if current_color %}{{current_color}}{% endif %}">
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="submit" for="{{id}}-color-code" hidden></label>
</form>
<div class="body w-lg-100 d-lg-flex">
<div class="d-flex">
<form action="{{form_action}}" id="{{id}}-form" method="post" class="color-picker" style="line-height: 0">
<input hidden name="formkey" value="{{v|formkey}}">
{% for themecolor in COLORS %}
<input autocomplete="off" type="radio" name="{{form_name}}" id="{{id}}-{{themecolor}}" value="{{themecolor}}" {% if current_color == themecolor %}checked{% endif %} data-nonce="{{g.nonce}}" onclick_submit>
<label class="color-radio" for="{{id}}-{{themecolor}}">
<span style="background-color: #{{themecolor}}">
{% if current_color and current_color.lower() == themecolor %}
<i class="fas fa-check text-white"></i>
{% else %}
&nbsp;
{% endif %}
</span>
</label>
{% endfor %}
</form>
</div>
<p class="text-small mb-2">Or type a color hex code:</p>
<div class="d-flex">
<form action="{{form_action}}" id="{{id}}-color-code-form" method="post">
<input hidden name="formkey" value="{{v|formkey}}">
<input autocomplete="off" class="form-control" type="text" name="{{form_name}}" id="{{id}}-color-code" minlength="6" maxlength="6" value="{% if current_color %}{{current_color}}{% endif %}">
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="submit" for="{{id}}-color-code" hidden></label>
</form>
</div>
</div>
</div>
</div>
{% endmacro %}
{% macro line_text_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, button_text, show_emojis, minlength, maxlength, pattern, disabled) %}
@ -72,26 +72,26 @@
{% endmacro %}
{% macro text_area_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, show_extras, maxlength) %}
<div class="body d-lg-flex border-bottom">
<label class="text-black w-lg-25">{{section_title}}</label>
<div class="w-lg-100">
<form id="{{id}}-form" action="{{form_action}}" method="post" enctype="multipart/form-data" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" id="{{id}}-text" class="file-ta form-control rounded" placeholder="{{placeholder_text}}" rows="3" name="{{form_name}}" form="{{id}}-form" maxlength="{{maxlength}}">{% if contents %}{{contents}}{% endif %}</textarea>
<div class="body d-lg-flex border-bottom">
<label class="text-black w-lg-25">{{section_title}}</label>
<div class="w-lg-100">
<form id="{{id}}-form" action="{{form_action}}" method="post" enctype="multipart/form-data" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" id="{{id}}-text" class="file-ta form-control rounded" placeholder="{{placeholder_text}}" rows="3" name="{{form_name}}" form="{{id}}-form" maxlength="{{maxlength}}">{% if contents %}{{contents}}{% endif %}</textarea>
{% if show_extras %}
<div class="format-btns">
{{macros.emoji_btn(id ~ '-text')}}
{{macros.gif_btn(id ~ '-text')}}
{{macros.file_btn('file-upload-common-' ~ id)}}
{% if show_extras %}
<div class="format-btns">
{{macros.emoji_btn(id ~ '-text')}}
{{macros.gif_btn(id ~ '-text')}}
{{macros.file_btn('file-upload-common-' ~ id)}}
</div>
{% endif %}
<div class="d-flex mt-1">
<small>{{below_text}}</small>
<input autocomplete="off" class="btn btn-primary ml-auto" id="{{id}}-save" type="submit" value="Save Changes">
</div>
{% endif %}
<div class="d-flex mt-1">
<small>{{below_text}}</small>
<input autocomplete="off" class="btn btn-primary ml-auto" id="{{id}}-save" type="submit" value="Save Changes">
</div>
</form>
</form>
</div>
</div>
</div>
{% endmacro %}

View File

@ -1,45 +1,44 @@
{% extends "settings.html" %}
{% block pagetitle %}Custom CSS{% endblock %}
{% block content %}
<div class="row">
<div class="settings col col-md-8">
<section>
<h5>Custom CSS</h5>
<div id="settings-custom-css" class="settings-section rounded mb-0">
<p class="text-small text-muted pt-2 pl-3">Edit your custom CSS for the site</p>
<div class="body d-lg-flex border-bottom">
<div class="w-lg-100">
<form id="profile-settings-css" action="/settings/css" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" class="form-control rounded" id="css-textarea" placeholder="Custom CSS" rows="3" name="css" form="profile-settings-css" maxlength="{{CSS_LENGTH_LIMIT}}">{% if v.css %}{{v.csslazy}}{% endif %}</textarea>
<small>Limit of {{CSS_LENGTH_LIMIT}} characters</small>
<div class="d-flex mt-2">
<input autocomplete="off" id="submit-btn" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
<div class="row">
<div class="settings col col-md-8">
<section>
<h5>Custom CSS</h5>
<div id="settings-custom-css" class="settings-section rounded mb-0">
<p class="text-small text-muted pt-2 pl-3">Edit your custom CSS for the site</p>
<div class="body d-lg-flex border-bottom">
<div class="w-lg-100">
<form id="profile-settings-css" action="/settings/css" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" class="form-control rounded" id="css-textarea" placeholder="Custom CSS" rows="3" name="css" form="profile-settings-css" maxlength="{{CSS_LENGTH_LIMIT}}">{% if v.css %}{{v.csslazy}}{% endif %}</textarea>
<small>Limit of {{CSS_LENGTH_LIMIT}} characters</small>
<div class="d-flex mt-2">
<input autocomplete="off" id="submit-btn" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<section>
<h5>Profile CSS</h5>
<div id="settings-profile-css" class="settings-section rounded mb-0">
<p class="text-small text-muted pt-2 pl-3">Edit your profile CSS</p>
<div class="body d-lg-flex border-bottom">
<div class="w-lg-100">
<form id="profile-settings-profilecss" action="/settings/profilecss" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" class="form-control rounded" id="profilecss-textarea" placeholder="Custom profile CSS" rows="3" name="profilecss" form="profile-settings-profilecss" maxlength="{{CSS_LENGTH_LIMIT}}">{% if profilecss %}{{profilecss}}{% endif %}</textarea>
<small>Limit of {{CSS_LENGTH_LIMIT}} characters</small>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
</section>
<section>
<h5>Profile CSS</h5>
<div id="settings-profile-css" class="settings-section rounded mb-0">
<p class="text-small text-muted pt-2 pl-3">Edit your profile CSS</p>
<div class="body d-lg-flex border-bottom">
<div class="w-lg-100">
<form id="profile-settings-profilecss" action="/settings/profilecss" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" class="form-control rounded" id="profilecss-textarea" placeholder="Custom profile CSS" rows="3" name="profilecss" form="profile-settings-profilecss" maxlength="{{CSS_LENGTH_LIMIT}}">{% if profilecss %}{{profilecss}}{% endif %}</textarea>
<small>Limit of {{CSS_LENGTH_LIMIT}} characters</small>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,108 +1,37 @@
{% extends "settings.html" %}
{% block pagetitle %}Personal Settings{% endblock %}
{% block content %}
<div class="row settings-page" id="settings-page-personal">
<div class="col col-lg-10">
<div class="settings">
<section id="site-settings-experience-section" class="settings-section-section">
<h5>Site Experience</h5>
<div class="settings-section rounded" id="site-settings-experience">
{% if IS_EVENT() and v.can_toggle_event_music %}
{{common.toggle_section('Event Music', 'event_music_switch', 'event_music', v.event_music, 'Toggle event music.', false)}}
{% endif %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="patron-status">{{patron}} Status</label>
</div>
<div class="body w-lg-100">
<p>You're a {{TIER_TO_NAME[v.patron] if v.patron else "freeloader"}}!</p>{% if v.patron %} Thanks ily! &lt;3{% endif %}
{% if not v.patron and v.truescore >= TRUESCORE_MINIMUM and DONATE_LINK != DEFAULT_CONFIG_VALUE %}
<p class="font-italic">To stop freeloading, first <a href="/settings/security#site-settings-email-section">verify your email</a>, then support us on <a href="{{DONATE_LINK}}">{{DONATE_SERVICE}}</a> with the same email, and then click "Claim {{patron}} Rewards" <a href="/settings/security#site-settings-email-section">here</a></p>
{% elif not v.patron %}
<p class="font-italic">To stop freeloading, you can <a href="/donate">donate by crypto</a>. If you do that, please let us know by <a href="/contact">sending us the transaction id via modmail</a> so we can give you your {{patron}} rewards manually!</p>
{% endif %}
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="theme">Website Theme</label>
</div>
<div class="body w-lg-100">
<div class="input-group">
<select autocomplete="off" id='theme' class="form-control setting_select" form="profile-settings" name="theme" data-nonce="{{g.nonce}}" data-reload="1">
{% for entry in THEMES %}
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
{{entry}}
</option>
{% endfor %}
</select>
</div>
</div>
</div>
{{common.color_section('theme-color', '/settings/themecolor', 'themecolor', 'Theme Color', v.themecolor)}}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="background">Website Backgrounds</label>
</div>
<div class="body w-lg-100">
<p>Change the background for the website.</p>
<div class="input-group">
<select autocomplete="off" id='backgroundSelector' class="form-control" form="profile-settings" name="background" data-nonce="{{g.nonce}}" data-onchange="updatebgselection()">
{% for entry in BACKGROUND_CATEGORIES %}
<option value="{{entry}}" {% if v.background and v.background.startswith(entry) %}selected{% endif %}>
{{entry}}
</option>
{% endfor %}
</select>
</div>
<form class="d-flex mt-3 mb-2" id="upload-custom-background" action="/settings/custom_background" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-primary" for="upload-custom-background-file">
<i class="fas fa-image mr-1"></i>
{% if v.background and v.background.startswith('/images/') %}
{{v.background}}
{% else %}
Upload custom site background
{% endif %}
</label>
<input autocomplete="off" id="upload-custom-background-file" accept="image/*", type="file" name="file" data-nonce="{{g.nonce}}" onchange_submit hidden>
</form>
{% if v.background %}
<div class="d-flex mb-3">
<button type="button" class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/settings/remove_background')">
<i class="fas fa-image-slash mr-1"></i>
Remove current background
</button>
</div>
{% endif %}
<div id="bgcontainer"></div>
</div>
</div>
</div>
</section>
<section id="site-settings-aesthetic-section" class="settings-section-section">
<h5>Your Aesthetic</h5>
<div class="settings-section rounded" id="site-settings-aesthetic">
{% if FEATURES['HOUSES'] %}
<div class="row settings-page" id="settings-page-personal">
<div class="col col-lg-10">
<div class="settings">
<section id="site-settings-experience-section" class="settings-section-section">
<h5>Site Experience</h5>
<div class="settings-section rounded" id="site-settings-experience">
{% if IS_EVENT() and v.can_toggle_event_music %}
{{common.toggle_section('Event Music', 'event_music_switch', 'event_music', v.event_music, 'Toggle event music.', false)}}
{% endif %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="theme">House</label>
<label for="patron-status">{{patron}} Status</label>
</div>
<div class="body w-lg-100">
{% if v.house %}
{% set cost = HOUSE_SWITCH_COST %}
<p>Change your house (cost: {{cost}} coins or marseybux).</p>
{% if ' Founder' in v.house %}
<p>Warning: you'll lose your founder status if you join a different house</p>
{% endif %}
{% else %}
{% set cost = HOUSE_JOIN_COST %}
<p>Join a house (cost: {{cost}} coins or marseybux).</p>
<p>You're a {{TIER_TO_NAME[v.patron] if v.patron else "freeloader"}}!</p>{% if v.patron %} Thanks ily! &lt;3{% endif %}
{% if not v.patron and v.truescore >= TRUESCORE_MINIMUM and DONATE_LINK != DEFAULT_CONFIG_VALUE %}
<p class="font-italic">To stop freeloading, first <a href="/settings/security#site-settings-email-section">verify your email</a>, then support us on <a href="{{DONATE_LINK}}">{{DONATE_SERVICE}}</a> with the same email, and then click "Claim {{patron}} Rewards" <a href="/settings/security#site-settings-email-section">here</a></p>
{% elif not v.patron %}
<p class="font-italic">To stop freeloading, you can <a href="/donate">donate by crypto</a>. If you do that, please let us know by <a href="/contact">sending us the transaction id via modmail</a> so we can give you your {{patron}} rewards manually!</p>
{% endif %}
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="theme">Website Theme</label>
</div>
<div class="body w-lg-100">
<div class="input-group">
<select data-cost="{{cost}}" id="changing-house"{% if cost > v.coins + v.marseybux or v.bite %}disabled{% endif %} autocomplete="off" id='house' class="form-control setting_select" form="profile-settings" name="house" data-nonce="{{g.nonce}}">
{% for entry in HOUSES %}
<option value="{{entry}}" {% if v.house.startswith(entry) %}selected{% endif %}>
<select autocomplete="off" id='theme' class="form-control setting_select" form="profile-settings" name="theme" data-nonce="{{g.nonce}}" data-reload="1">
{% for entry in THEMES %}
<option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
{{entry}}
</option>
{% endfor %}
@ -110,43 +39,92 @@
</div>
</div>
</div>
{%- endif %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="profile-picture">Profile Picture</label>
</div>
<div class="title w-lg-25 text-md-center">
<img loading="lazy" alt="your profile picture" src="{{v.profile_url}}" class="profile-pic-75">
</div>
<div class="body w-lg-100 my-auto">
<div class="d-flex">
<div>
<form action="/settings/images/profile" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="profile" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
</div>
<div class="text-small text-muted mt-3">All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.</div>
</div>
</div>
{% if FEATURES['USERS_PROFILE_BANNER'] -%}
{{common.color_section('theme-color', '/settings/themecolor', 'themecolor', 'Theme Color', v.themecolor)}}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="banner">Banner</label>
<label for="background">Website Backgrounds</label>
</div>
<div class="title w-lg-75 text-md-center">
<img loading="lazy" alt="your banner" src="{{v.banner_url}}" class="banner-pic">
<div class="body w-lg-100">
<p>Change the background for the website.</p>
<div class="input-group">
<select autocomplete="off" id='backgroundSelector' class="form-control" form="profile-settings" name="background" data-nonce="{{g.nonce}}" data-onchange="updatebgselection()">
{% for entry in BACKGROUND_CATEGORIES %}
<option value="{{entry}}" {% if v.background and v.background.startswith(entry) %}selected{% endif %}>
{{entry}}
</option>
{% endfor %}
</select>
</div>
<form class="d-flex mt-3 mb-2" id="upload-custom-background" action="/settings/custom_background" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-primary" for="upload-custom-background-file">
<i class="fas fa-image mr-1"></i>
{% if v.background and v.background.startswith('/images/') %}
{{v.background}}
{% else %}
Upload custom site background
{% endif %}
</label>
<input autocomplete="off" id="upload-custom-background-file" accept="image/*", type="file" name="file" data-nonce="{{g.nonce}}" onchange_submit hidden>
</form>
{% if v.background %}
<div class="d-flex mb-3">
<button type="button" class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/settings/remove_background')">
<i class="fas fa-image-slash mr-1"></i>
Remove current background
</button>
</div>
{% endif %}
<div id="bgcontainer"></div>
</div>
</div>
</div>
</section>
<section id="site-settings-aesthetic-section" class="settings-section-section">
<h5>Your Aesthetic</h5>
<div class="settings-section rounded" id="site-settings-aesthetic">
{% if FEATURES['HOUSES'] %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="theme">House</label>
</div>
<div class="body w-lg-100">
{% if v.house %}
{% set cost = HOUSE_SWITCH_COST %}
<p>Change your house (cost: {{cost}} coins or marseybux).</p>
{% if ' Founder' in v.house %}
<p>Warning: you'll lose your founder status if you join a different house</p>
{% endif %}
{% else %}
{% set cost = HOUSE_JOIN_COST %}
<p>Join a house (cost: {{cost}} coins or marseybux).</p>
{% endif %}
<div class="input-group">
<select data-cost="{{cost}}" id="changing-house"{% if cost > v.coins + v.marseybux or v.bite %}disabled{% endif %} autocomplete="off" id='house' class="form-control setting_select" form="profile-settings" name="house" data-nonce="{{g.nonce}}">
{% for entry in HOUSES %}
<option value="{{entry}}" {% if v.house.startswith(entry) %}selected{% endif %}>
{{entry}}
</option>
{% endfor %}
</select>
</div>
</div>
</div>
{%- endif %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="profile-picture">Profile Picture</label>
</div>
<div class="title w-lg-25 text-md-center">
<img loading="lazy" alt="your profile picture" src="{{v.profile_url}}" class="profile-pic-75">
</div>
<div class="body w-lg-100 my-auto">
<div class="d-flex">
<div>
<form action="/settings/images/banner" method="post" enctype="multipart/form-data">
<form action="/settings/images/profile" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload<input autocomplete="off" type="file" {% if g.is_tor %}disabled{% endif %} accept="image/*" hidden name="banner" data-nonce="{{g.nonce}}" onchange_submit>
Upload<input autocomplete="off" type="file" accept="image/*" {% if g.is_tor %}disabled{% endif %} hidden name="profile" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
@ -154,223 +132,246 @@
<div class="text-small text-muted mt-3">All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.</div>
</div>
</div>
{%- endif %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="profile_background">Profile Background</label>
</div>
{% if v.profile_background %}
<div class="title w-lg-75 text-md-center">
<img loading="lazy" alt="your profile background" src="{{v.profile_background}}" class="profile-background-pic">
</div>
{% endif %}
<div class="body w-lg-100 my-auto">
<div class="d-flex">
<div>
<form action="/settings/images/profile_background" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload<input autocomplete="off" type="file" {% if g.is_tor %}disabled{% endif %} accept="image/*" hidden name="profile_background" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
{% if FEATURES['USERS_PROFILE_BANNER'] -%}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="banner">Banner</label>
</div>
<div class="title w-lg-75 text-md-center">
<img loading="lazy" alt="your banner" src="{{v.banner_url}}" class="banner-pic">
</div>
<div class="body w-lg-100 my-auto">
<div class="d-flex">
<div>
<form action="/settings/images/banner" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload<input autocomplete="off" type="file" {% if g.is_tor %}disabled{% endif %} accept="image/*" hidden name="banner" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
</div>
<div class="text-small text-muted mt-3">All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.</div>
</div>
</div>
<div class="text-small text-muted mt-3">All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.</div>
</div>
</div>
{%- endif %}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="name">Username</label>
</div>
<div class="body w-lg-100">
<p>Your original username will always stay reserved for you: <code>{{v.original_username}}</code></p>
<form action="/settings/name_change" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
{% if v.patron %}
{% set minlength = 1 %}
{% else %}
{% set minlength = 3 %}
{% endif %}
<input id="name-body" autocomplete="off" type="text" name="name" class="form-control" value="{{v.username}}" minlength="{{minlength}}" maxlength="25" {% if v.namechanged %}disabled{% endif %}>
<small>{{minlength}}-25 characters, including letters, numbers, _ , and -</small>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Change Display Name" {% if v.namechanged %}disabled{% endif %}>
</div>
</form>
</div>
</div>
{{common.color_section('namecolor', '/settings/namecolor', 'namecolor', 'Name Color', v.name_color)}}
{% if FEATURES['PRONOUNS'] %}
{{common.line_text_section('pronouns', '/settings/pronouns_change', 'pronouns', 'Pronouns', v.pronouns, 'Limit of 15 characters', 'Enter pronouns here', 'Change Pronouns', false, 3, 15, '([a-zA-Z]{1,7})/[a-zA-Z]{1,7}(/[a-zA-Z]{1,7})?', false)}}
{% endif %}
{{common.line_text_section('flair', '/settings/change_flair', 'flair', 'Flair', v.flair, 'Limit of 100 characters', 'Enter a flair here', 'Change Flair', true, 0, 100, '.*', v.flairchanged)}}
{{common.color_section('flaircolor', '/settings/flaircolor', 'flaircolor', 'Flair Color', v.flaircolor)}}
{% if FEATURES['USERS_PROFILE_SONG'] -%}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="anthem">Profile Anthem</label>
<label for="profile_background">Profile Background</label>
</div>
{% if v.profile_background %}
<div class="title w-lg-75 text-md-center">
<img loading="lazy" alt="your profile background" src="{{v.profile_background}}" class="profile-background-pic">
</div>
{% endif %}
<div class="body w-lg-100 my-auto">
<div class="d-flex">
<div>
<form action="/settings/images/profile_background" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
Upload<input autocomplete="off" type="file" {% if g.is_tor %}disabled{% endif %} accept="image/*" hidden name="profile_background" data-nonce="{{g.nonce}}" onchange_submit>
</label>
</form>
</div>
</div>
<div class="text-small text-muted mt-3">All image files are supported. Max file size is {% if v and v.patron %}16{% else %}8{% endif %} MB.</div>
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="name">Username</label>
</div>
<div class="body w-lg-100">
<p>You can use an MP3 file or a YouTube video.</p>
<form action="/settings/song_change_mp3" method="post" enctype="multipart/form-data">
<p>Your original username will always stay reserved for you: <code>{{v.original_username}}</code></p>
<form action="/settings/name_change" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary d-inline-block m-0 mb-3">
<div><i class="fas fa-file"></i>
{% if v.song and v.song|length in (1,2,3,4,5,17) %}
{{v.song}}.mp3
{% else %}
Use an MP3 file (Max size is 8MB)
{% endif %}
</div>
<input autocomplete="off" id="file-upload2" type="file" name="file" {% if g.is_tor %}disabled{% endif %} accept="audio/mp3" data-nonce="{{g.nonce}}" onchange_submit hidden>
</label>
{% if v.patron %}
{% set minlength = 1 %}
{% else %}
{% set minlength = 3 %}
{% endif %}
<input id="name-body" autocomplete="off" type="text" name="name" class="form-control" value="{{v.username}}" minlength="{{minlength}}" maxlength="25" {% if v.namechanged %}disabled{% endif %}>
<small>{{minlength}}-25 characters, including letters, numbers, _ , and -</small>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Change Display Name" {% if v.namechanged %}disabled{% endif %}>
</div>
</form>
<form action="/settings/song_change" method="post">
<input hidden name="formkey" value="{{v|formkey}}">
<input class="form-control" style="display:inline;max-width:75%;font-size: min(3.5vw,16px)!important" autocomplete="off" type="text" name="song" class="form-control" value="{% if v.song and v.song|length not in (1,2,3,4,5,17) %}https://youtu.be/{{v.song}}{% endif %}" placeholder='Enter a YouTube video link here'>
<input class="btn btn-primary" style="font-size: min(3.5vw,16px)!important" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Submit">
</form>
<br><small>In some browsers, users have to click at least once anywhere in the profile page for the anthem to play.</small>
</div>
</div>
{%- endif %}
{{common.color_section('namecolor', '/settings/namecolor', 'namecolor', 'Name Color', v.name_color)}}
{% if FEATURES['USERS_PROFILE_BODYTEXT'] %}
{{common.text_area_section('profile-bio', '/settings/personal', 'bio', 'Bio', v.bio, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Tell the community a bit about yourself.', true, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}}
{% endif %}
{{common.text_area_section('profile-friends', '/settings/personal', 'friends', 'Friends', v.friends, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your friends on the site...', false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}}
{{common.text_area_section('profile-enemies', '/settings/personal', 'enemies', 'Enemies', v.enemies, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your enemies on the site...', false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}}
{{common.text_area_section('profile-signature', '/settings/personal', 'sig', 'Signature', v.sig, 'Limit of 200 characters', 'Enter a signature...', true, 200)}}
{{common.toggle_section('Private Mode', 'privateswitch', 'private', v.is_private, 'This will hide your profile page from other users.', false)}}
{{common.toggle_section('Lifetime Donated Visiblity', 'lifetimedonated_visibleswitch', 'lifetimedonated_visible', v.lifetimedonated_visible, 'Make the "lifetime donated" field in your profile visible to everyone instead of just you.', false)}}
{{common.toggle_section('Cursor Marsey', 'cursormarseyswitch', 'cursormarsey', v.cursormarsey, 'Have a cute
marsey accompany you during your journey on the site.', false)}}
{{common.toggle_section('Spider', 'spiderswitch', 'spider', v.spider, 'Have a spider friend accompany you during your journey on the site.', v.spider > 1)}}
{{common.toggle_section('Marsify', 'marsifyswitch', 'marsify', v.marsify, 'Automatically insert relevant
marseys into your future comments.', v.marsify > 1)}}
</div>
</section>
<section id="site-settings-checkmark-section" class="settings-section-section">
<h5>Checkmark Customization</h5>
<div class="settings-section rounded" id="site-settings-checkmark">
{{common.color_section('verifiedcolor', '/settings/verifiedcolor', 'verifiedcolor', 'Checkmark Color', v.verifiedcolor)}}
{{common.line_text_section('checkmark_text', '/settings/checkmark_text', 'checkmark-text', 'Checkmark Hover Text', v.verified, 'Limit of 100 characters', 'Enter checkmark hover text here', 'Change Text', false, 0, 100, '.*', false)}}
</div>
</section>
<section id="site-settings-filters-section" class="settings-section-section">
<h5>Filters</h5>
<div class="settings-section rounded" id="site-settings-filters">
{% set ns = namespace(slurtext='Enable if you would like to automatically replace slurs.', profanitytext='Enable if you would like to automatically replace profanities.') %}
{% if FEATURES['USERS_PERMANENT_WORD_FILTERS'] %}
{% if v.slurreplacer > 1 %}
{% set slurtext = "You've enabled the slur replacer permanently! ✊🏿" %}
{% else %}
{% set slurtext = 'Enable if you would like to automatically replace slurs. <button type="button" {% if v.slurreplacer == 0 %}hidden{% endif %} id="slurreplacer-perma-link" class="text-primary" data-bs-toggle="modal" data-bs-target="#modal-slurreplacer">Make filter permanent for a badge!</button>' %}
{% if FEATURES['PRONOUNS'] %}
{{common.line_text_section('pronouns', '/settings/pronouns_change', 'pronouns', 'Pronouns', v.pronouns, 'Limit of 15 characters', 'Enter pronouns here', 'Change Pronouns', false, 3, 15, '([a-zA-Z]{1,7})/[a-zA-Z]{1,7}(/[a-zA-Z]{1,7})?', false)}}
{% endif %}
{% if v.profanityreplacer > 1 %}
{% set profanitytext = "You've enabled the profanity replacer permanently! 😇" %}
{% else %}
{% set profanitytext = 'Enable if you would like to automatically replace profanities. <button type="button" {% if v.profanityreplacer == 0 %}hidden{% endif %} id="profanityreplacer-perma-link" class="text-primary" data-bs-toggle="modal" data-bs-target="#modal-profanityreplacer">Make filter permanent for a badge!</button>' %}
{% endif %}
{% endif %}
{{common.toggle_section("Slur Replacer", "slurreplacerswitch", 'slurreplacer', v.slurreplacer, slurtext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.slurreplacer > 1)}}
{{common.toggle_section("Profanity Replacer", "profanityreplacerswitch", 'profanityreplacer', v .profanityreplacer, profanitytext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.profanityreplacer > 1)}}
</div>
</section>
<section id="site-settings-referral-section" class="settings-section-section">
<h5>Refer a Friend!</h5>
<div class="settings-section rounded" id="site-settings-referral">
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="referral_code">Referral Code</label>
</div>
<div class="body w-lg-100">
<div class="input-group">
<input autocomplete="off" type="text" readonly class="form-control copy-link" id="referral_code" value="{{SITE_FULL}}/signup?ref={{v.id}}" data-clipboard-text="{{SITE_FULL}}/signup?ref={{v.id}}">
<span class="input-group-append" data-bs-toggle="tooltip" data-bs-placement="top" title="You have referred {{v.referral_count}} user{{'s' if v.referral_count != 1 else ''}} so far. {% if v.referral_count==0 %}¯\_(ツ)_/¯{% elif v.referral_count>10 %}Wow!{% endif %}">
<span class="input-group-text border-0 font-weight-bold"><i class="fas fa-user mr-1"></i>{{v.referral_count}}</span>
</span>
{{common.line_text_section('flair', '/settings/change_flair', 'flair', 'Flair', v.flair, 'Limit of 100 characters', 'Enter a flair here', 'Change Flair', true, 0, 100, '.*', v.flairchanged)}}
{{common.color_section('flaircolor', '/settings/flaircolor', 'flaircolor', 'Flair Color', v.flaircolor)}}
{% if FEATURES['USERS_PROFILE_SONG'] -%}
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="anthem">Profile Anthem</label>
</div>
<div class="body w-lg-100">
<p>You can use an MP3 file or a YouTube video.</p>
<form action="/settings/song_change_mp3" method="post" enctype="multipart/form-data">
<input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary d-inline-block m-0 mb-3">
<div><i class="fas fa-file"></i>
{% if v.song and v.song|length in (1,2,3,4,5,17) %}
{{v.song}}.mp3
{% else %}
Use an MP3 file (Max size is 8MB)
{% endif %}
</div>
<input autocomplete="off" id="file-upload2" type="file" name="file" {% if g.is_tor %}disabled{% endif %} accept="audio/mp3" data-nonce="{{g.nonce}}" onchange_submit hidden>
</label>
</form>
<form action="/settings/song_change" method="post">
<input hidden name="formkey" value="{{v|formkey}}">
<input class="form-control" style="display:inline;max-width:75%;font-size: min(3.5vw,16px)!important" autocomplete="off" type="text" name="song" class="form-control" value="{% if v.song and v.song|length not in (1,2,3,4,5,17) %}https://youtu.be/{{v.song}}{% endif %}" placeholder='Enter a YouTube video link here'>
<input class="btn btn-primary" style="font-size: min(3.5vw,16px)!important" autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Submit">
</form>
<br><small>In some browsers, users have to click at least once anywhere in the profile page for the anthem to play.</small>
</div>
</div>
<div class="text-small text-muted mt-3">Share this link with a friend. {% if v.referral_count==0 %} When they sign up, you'll get the bronze recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<10 %} When you refer 10 friends, you'll receive the silver recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<100 %} When you refer 100 friends, you'll receive the gold recruitment badge. <a href="/badges">Learn more</a>.{% endif %}</div>
{%- endif %}
{% if FEATURES['USERS_PROFILE_BODYTEXT'] %}
{{common.text_area_section('profile-bio', '/settings/personal', 'bio', 'Bio', v.bio, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Tell the community a bit about yourself.', true, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}}
{% endif %}
{{common.text_area_section('profile-friends', '/settings/personal', 'friends', 'Friends', v.friends, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your friends on the site...', false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}}
{{common.text_area_section('profile-enemies', '/settings/personal', 'enemies', 'Enemies', v.enemies, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your enemies on the site...', false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}}
{{common.text_area_section('profile-signature', '/settings/personal', 'sig', 'Signature', v.sig, 'Limit of 200 characters', 'Enter a signature...', true, 200)}}
{{common.toggle_section('Private Mode', 'privateswitch', 'private', v.is_private, 'This will hide your profile page from other users.', false)}}
{{common.toggle_section('Lifetime Donated Visiblity', 'lifetimedonated_visibleswitch', 'lifetimedonated_visible', v.lifetimedonated_visible, 'Make the "lifetime donated" field in your profile visible to everyone instead of just you.', false)}}
{{common.toggle_section('Cursor Marsey', 'cursormarseyswitch', 'cursormarsey', v.cursormarsey, 'Have a cute
marsey accompany you during your journey on the site.', false)}}
{{common.toggle_section('Spider', 'spiderswitch', 'spider', v.spider, 'Have a spider friend accompany you during your journey on the site.', v.spider > 1)}}
{{common.toggle_section('Marsify', 'marsifyswitch', 'marsify', v.marsify, 'Automatically insert relevant
marseys into your future comments.', v.marsify > 1)}}
</div>
</section>
<section id="site-settings-checkmark-section" class="settings-section-section">
<h5>Checkmark Customization</h5>
<div class="settings-section rounded" id="site-settings-checkmark">
{{common.color_section('verifiedcolor', '/settings/verifiedcolor', 'verifiedcolor', 'Checkmark Color', v.verifiedcolor)}}
{{common.line_text_section('checkmark_text', '/settings/checkmark_text', 'checkmark-text', 'Checkmark Hover Text', v.verified, 'Limit of 100 characters', 'Enter checkmark hover text here', 'Change Text', false, 0, 100, '.*', false)}}
</div>
</section>
<section id="site-settings-filters-section" class="settings-section-section">
<h5>Filters</h5>
<div class="settings-section rounded" id="site-settings-filters">
{% set ns = namespace(slurtext='Enable if you would like to automatically replace slurs.', profanitytext='Enable if you would like to automatically replace profanities.') %}
{% if FEATURES['USERS_PERMANENT_WORD_FILTERS'] %}
{% if v.slurreplacer > 1 %}
{% set slurtext = "You've enabled the slur replacer permanently! ✊🏿" %}
{% else %}
{% set slurtext = 'Enable if you would like to automatically replace slurs. <button type="button" {% if v.slurreplacer == 0 %}hidden{% endif %} id="slurreplacer-perma-link" class="text-primary" data-bs-toggle="modal" data-bs-target="#modal-slurreplacer">Make filter permanent for a badge!</button>' %}
{% endif %}
{% if v.profanityreplacer > 1 %}
{% set profanitytext = "You've enabled the profanity replacer permanently! 😇" %}
{% else %}
{% set profanitytext = 'Enable if you would like to automatically replace profanities. <button type="button" {% if v.profanityreplacer == 0 %}hidden{% endif %} id="profanityreplacer-perma-link" class="text-primary" data-bs-toggle="modal" data-bs-target="#modal-profanityreplacer">Make filter permanent for a badge!</button>' %}
{% endif %}
{% endif %}
{{common.toggle_section("Slur Replacer", "slurreplacerswitch", 'slurreplacer', v.slurreplacer, slurtext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.slurreplacer > 1)}}
{{common.toggle_section("Profanity Replacer", "profanityreplacerswitch", 'profanityreplacer', v .profanityreplacer, profanitytext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.profanityreplacer > 1)}}
</div>
</section>
<section id="site-settings-referral-section" class="settings-section-section">
<h5>Refer a Friend!</h5>
<div class="settings-section rounded" id="site-settings-referral">
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="referral_code">Referral Code</label>
</div>
<div class="body w-lg-100">
<div class="input-group">
<input autocomplete="off" type="text" readonly class="form-control copy-link" id="referral_code" value="{{SITE_FULL}}/signup?ref={{v.id}}" data-clipboard-text="{{SITE_FULL}}/signup?ref={{v.id}}">
<span class="input-group-append" data-bs-toggle="tooltip" data-bs-placement="top" title="You have referred {{v.referral_count}} user{{'s' if v.referral_count != 1 else ''}} so far. {% if v.referral_count==0 %}¯\_(ツ)_/¯{% elif v.referral_count>10 %}Wow!{% endif %}">
<span class="input-group-text border-0 font-weight-bold"><i class="fas fa-user mr-1"></i>{{v.referral_count}}</span>
</span>
</div>
<div class="text-small text-muted mt-3">Share this link with a friend. {% if v.referral_count==0 %} When they sign up, you'll get the bronze recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<10 %} When you refer 10 friends, you'll receive the silver recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<100 %} When you refer 100 friends, you'll receive the gold recruitment badge. <a href="/badges">Learn more</a>.{% endif %}</div>
</div>
</div>
<div class="d-lg-flex border-bottom px-3">
<div class="title w-lg-25 px-0">
<label>Referred Users</label>
</div>
<table class="table">
{% for user in v.referrals %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td data-time="{{user.created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
</div>
<div class="d-lg-flex border-bottom px-3">
<div class="title w-lg-25 px-0">
<label>Referred Users</label>
</div>
<table class="table">
{% for user in v.referrals %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td data-time="{{user.created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
</div>
</section>
</section>
</div>
</div>
</div>
</div>
{% include "modals/emoji.html" %}
{% include "modals/gif.html" %}
{% include "modals/emoji.html" %}
{% include "modals/gif.html" %}
{% if v.flairchanged %}
<input hidden id="flairchanged" value="{{v.flairchanged}}">
<script defer src="{{'js/flairchanged.js' | asset}}"></script>
{% endif %}
{% if v.flairchanged %}
<input hidden id="flairchanged" value="{{v.flairchanged}}">
<script defer src="{{'js/flairchanged.js' | asset}}"></script>
{% endif %}
{% if v.namechanged %}
<input hidden id="namechanged" value="{{v.namechanged}}">
<script defer src="{{'js/namechanged.js' | asset}}"></script>
{% endif %}
{% if v.namechanged %}
<input hidden id="namechanged" value="{{v.namechanged}}">
<script defer src="{{'js/namechanged.js' | asset}}"></script>
{% endif %}
<script defer src="{{'js/settings_profile.js' | asset}}"></script>
<script defer src="{{'js/settings_profile.js' | asset}}"></script>
{% macro permanent_filter_modal(id, form_action, field, friendly_name, badge_name) %}
{% if FEATURES['USERS_PERMANENT_WORD_FILTERS'] -%}
<div class="modal fade" id="modal-{{id}}" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<form class="m-auto" action="{{form_action}}" id="{{id}}-form" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Make {{friendly_name}} Permanent</h5>
<button type="button" class="close" data-bs-dismiss="modal">
<span><i class="fas fa-times"></i></span>
</button>
</div>
<div class="modal-body">
<input hidden name="{{field}}" value="true">
<input hidden name="permanent" value="true">
<input hidden name="formkey" value="{{v|formkey}}">
<p>This form will permanently enable the filter for you. You will receive the {{badge_name}} badge and <strong>will not</strong> be able to disable the filter.<br>Type your username to continue.</p>
<input autocomplete="off" type="text" name="username" placeholder="Enter your username to confirm" id="username-{{id}}" class="form-control" pattern="{{v.username}}" required>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-danger" id="submit-{{id}}-form">Make Permanent</button>
{% macro permanent_filter_modal(id, form_action, field, friendly_name, badge_name) %}
{% if FEATURES['USERS_PERMANENT_WORD_FILTERS'] -%}
<div class="modal fade" id="modal-{{id}}" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<form class="m-auto" action="{{form_action}}" id="{{id}}-form" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Make {{friendly_name}} Permanent</h5>
<button type="button" class="close" data-bs-dismiss="modal">
<span><i class="fas fa-times"></i></span>
</button>
</div>
<div class="modal-body">
<input hidden name="{{field}}" value="true">
<input hidden name="permanent" value="true">
<input hidden name="formkey" value="{{v|formkey}}">
<p>This form will permanently enable the filter for you. You will receive the {{badge_name}} badge and <strong>will not</strong> be able to disable the filter.<br>Type your username to continue.</p>
<input autocomplete="off" type="text" name="username" placeholder="Enter your username to confirm" id="username-{{id}}" class="form-control" pattern="{{v.username}}" required>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-danger" id="submit-{{id}}-form">Make Permanent</button>
</div>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
{%- endif %}
{% endmacro %}
{{permanent_filter_modal('slurreplacer', '/settings/personal', 'slurreplacer', 'Slur Replacer', 'Social Justice Berserker')}}
{{permanent_filter_modal('profanityreplacer', '/settings/personal', 'profanityreplacer', 'Profanity Replacer', 'Soapy-Mouthed Angel')}}
{%- endif %}
{% endmacro %}
{{permanent_filter_modal('slurreplacer', '/settings/personal', 'slurreplacer', 'Slur Replacer', 'Social Justice Berserker')}}
{{permanent_filter_modal('profanityreplacer', '/settings/personal', 'profanityreplacer', 'Profanity Replacer', 'Soapy-Mouthed Angel')}}
{% endblock %}

View File

@ -1,190 +1,190 @@
{% extends "settings.html" %}
{% block pagetitle %}Security Settings{% endblock %}
{% block content %}
<script defer src="{{'js/settings_security.js' | asset}}"></script>
<div class="row settings-page" id="settings-page-security">
<div class="col col-lg-8">
<div class="settings">
<section id="site-settings-email-section" class="settings-section-section">
<h5>Email</h5>
<div class="settings-section rounded">
<form action="/settings/security" method="post">
<input hidden name="formkey" value="{{v|formkey}}">
<input hidden name="now" value="{{now}}">
<div class="body">
<div class="d-lg-flex">
<label for="new-email" class="w-lg-25">Email</label>
<div class="w-lg-100">
<input autocomplete="off" class="form-control" id="new_email" {% if v.email %}placeholder="{{v.email}}"{% else %}placeholder="Your email"{% endif %} type="email" name="new_email" required>
{% if v.email and not v.email_verified %}
<div class="text-danger mt-1" id="email-verify-text">Email not verified. You will not be able to recover your account with this email until you verify it. <u><button type="button" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/verify_email');emailVerifyText()" class="text-primary font-weight-bold ml-1">Verify now.</button></u></div>
{% elif not v.email %}
<div class="text-danger mt-1" id="email-verify-text">Add an email to secure your account in case you forget your password.</div>
{% endif %}
</div>
</div>
<div class="d-lg-flex mt-3">
<label for="email-password" class="w-lg-25 d-none" id="email-password-label">Password</label>
<div class="w-lg-100">
<input autocomplete="off" type="password" class="form-control mb-2 d-none" id="email-password" name="password" required>
<small id="emailpasswordRequired" class="form-text font-weight-bold text-danger d-none mt-1">Password required to update your email.</small>
</div>
</div>
<small id="emailpasswordRequired" class="form-text font-weight-bold text-danger d-none mt-1">Password required to update your email.</small>
</div>
<div class="footer">
<div class="d-flex">
{% if FEATURES['MARSEYBUX'] %}
<button type="button" class="btn btn-success" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/settings/claim_rewards')">Claim {{patron}} Rewards</button>
{% endif %}
{% if v.email %}
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Update email">
{% else %}
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add email">
{% endif %}
</div>
{% if v.truescore >= TRUESCORE_MINIMUM and DONATE_LINK != DEFAULT_CONFIG_VALUE %}
<div class="text-small text-muted pl-1 pt-1 pt-sm-3">
Must be same email as the one you used to donate on <a rel="nofollow noopener" class="text-primary no-visited" href="{{DONATE_LINK}}">{{DONATE_SERVICE}}</a>
</div>
{% endif %}
</div>
</form>
</div>
</section>
<section id="site-settings-password-section" class="settings-section-section">
<h5>Password</h5>
<div class="settings-section rounded">
<form action="/settings/security" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="body">
<div class="d-lg-flex">
<label for="old_password" class="mb-0 w-lg-25">Old Password</label>
<input autocomplete="off" class="form-control mb-2 w-lg-100" id="old_password" type="password" name="old_password" required>
</div>
<div class="d-lg-flex mt-5">
<label for="new_password" class="mb-0 w-lg-25">New Password</label>
<input autocomplete="off" class="form-control w-lg-100" id="new_password" type="password" minlength="8" maxlength="100" name="new_password" required>
<small id="passwordHelpChange" class="form-text font-weight-bold text-muted d-none mt-1 w-lg-100">Minimum of 8 characters required.</small>
<small id="passwordHelpChangeSuccess" class="form-text font-weight-bold text-success d-none mt-1 w-lg-100">Your password meets the requirements.</small>
</div>
<div class="d-lg-flex mt-4">
<label for="cnf_password" class="mb-0 w-lg-25">Confirm New Password</label>
<input autocomplete="off" class="form-control w-lg-100" id="cnf_password" type="password" minlength="8" maxlength="100" name="cnf_password" required>
<small id="passwordHelpCnf" class="form-text font-weight-bold text-muted d-none mt-1 w-lg-100">Passwords do not match.</small>
<small id="passwordHelpCnfSuccess" class="form-text font-weight-bold text-success d-none mt-1 w-lg-100">Passwords match.</small>
</div>
</div>
<div class="footer">
<script defer src="{{'js/settings_security.js' | asset}}"></script>
<div class="row settings-page" id="settings-page-security">
<div class="col col-lg-8">
<div class="settings">
<section id="site-settings-email-section" class="settings-section-section">
<h5>Email</h5>
<div class="settings-section rounded">
<form action="/settings/security" method="post">
<input hidden name="formkey" value="{{v|formkey}}">
<input hidden name="now" value="{{now}}">
<div class="body">
<div class="d-lg-flex">
<label for="new-email" class="w-lg-25">Email</label>
<div class="w-lg-100">
<input autocomplete="off" class="form-control" id="new_email" {% if v.email %}placeholder="{{v.email}}"{% else %}placeholder="Your email"{% endif %} type="email" name="new_email" required>
{% if v.email and not v.email_verified %}
<div class="text-danger mt-1" id="email-verify-text">Email not verified. You will not be able to recover your account with this email until you verify it. <u><button type="button" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/verify_email');emailVerifyText()" class="text-primary font-weight-bold ml-1">Verify now.</button></u></div>
{% elif not v.email %}
<div class="text-danger mt-1" id="email-verify-text">Add an email to secure your account in case you forget your password.</div>
{% endif %}
</div>
</div>
<div class="d-lg-flex mt-3">
<label for="email-password" class="w-lg-25 d-none" id="email-password-label">Password</label>
<div class="w-lg-100">
<input autocomplete="off" type="password" class="form-control mb-2 d-none" id="email-password" name="password" required>
<small id="emailpasswordRequired" class="form-text font-weight-bold text-danger d-none mt-1">Password required to update your email.</small>
</div>
</div>
<small id="emailpasswordRequired" class="form-text font-weight-bold text-danger d-none mt-1">Password required to update your email.</small>
</div>
<div class="footer">
<div class="d-flex">
{% if FEATURES['MARSEYBUX'] %}
<button type="button" class="btn btn-success" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/settings/claim_rewards')">Claim {{patron}} Rewards</button>
{% endif %}
{% if v.email %}
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Update email">
{% else %}
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add email">
{% endif %}
</div>
{% if v.truescore >= TRUESCORE_MINIMUM and DONATE_LINK != DEFAULT_CONFIG_VALUE %}
<div class="text-small text-muted pl-1 pt-1 pt-sm-3">
Must be same email as the one you used to donate on <a rel="nofollow noopener" class="text-primary no-visited" href="{{DONATE_LINK}}">{{DONATE_SERVICE}}</a>
</div>
{% endif %}
</div>
</form>
</div>
</section>
<section id="site-settings-password-section" class="settings-section-section">
<h5>Password</h5>
<div class="settings-section rounded">
<form action="/settings/security" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<div class="body">
<div class="d-lg-flex">
<label for="old_password" class="mb-0 w-lg-25">Old Password</label>
<input autocomplete="off" class="form-control mb-2 w-lg-100" id="old_password" type="password" name="old_password" required>
</div>
<div class="d-lg-flex mt-5">
<label for="new_password" class="mb-0 w-lg-25">New Password</label>
<input autocomplete="off" class="form-control w-lg-100" id="new_password" type="password" minlength="8" maxlength="100" name="new_password" required>
<small id="passwordHelpChange" class="form-text font-weight-bold text-muted d-none mt-1 w-lg-100">Minimum of 8 characters required.</small>
<small id="passwordHelpChangeSuccess" class="form-text font-weight-bold text-success d-none mt-1 w-lg-100">Your password meets the requirements.</small>
</div>
<div class="d-lg-flex mt-4">
<label for="cnf_password" class="mb-0 w-lg-25">Confirm New Password</label>
<input autocomplete="off" class="form-control w-lg-100" id="cnf_password" type="password" minlength="8" maxlength="100" name="cnf_password" required>
<small id="passwordHelpCnf" class="form-text font-weight-bold text-muted d-none mt-1 w-lg-100">Passwords do not match.</small>
<small id="passwordHelpCnfSuccess" class="form-text font-weight-bold text-success d-none mt-1 w-lg-100">Passwords match.</small>
</div>
</div>
<div class="footer">
<input hidden name="formkey" value="{{v|formkey}}">
<input hidden name="now" value="{{now}}">
<div class="d-flex">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Change Password">
</div>
</div>
</form>
</div>
</section>
<section id="site-settings-2fa-section" class="settings-section-section">
<h5>Two-Factor Authentication</h5>
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="2faToggle">Use Two-Factor Authentication</label>
</div>
<div class="body w-lg-100 pt-1 pt-lg-3">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="2faToggle" name="2faToggle" data-nonce="{{g.nonce}}" {% if v.mfa_secret %}checked{% endif %}>
<label class="custom-control-label" for="2faToggle"></label>
</div>
<span class="text-small text-muted">This requires entering a randomly-generated, 6-digit code and your password to login.</span>
</div>
</div>
</div>
</section>
<section id="site-settings-logout-everywhere-section" class="settings-section-section">
<h5>Log Out Everywhere</h5>
<form action="/settings/log_out_all_others" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<div class="body">
<div class="d-lg-flex">
<label for="forcelog-password" class="w-lg-25" id="email-password-label">Password</label>
<div class="w-lg-100">
<input autocomplete="off" type="password" class="form-control mb-2" id="forcelog-password" name="password" required>
</div>
</div>
<small id="emailpasswordRequired" class="form-text mt-1">This will also invalidate any existing recovery links associated with this account.</small>
</div>
<div class="footer">
<div class="d-flex">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Change Password">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Log out everywhere">
</div>
</div>
</form>
</div>
</section>
<section id="site-settings-2fa-section" class="settings-section-section">
<h5>Two-Factor Authentication</h5>
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="2faToggle">Use Two-Factor Authentication</label>
</div>
<div class="body w-lg-100 pt-1 pt-lg-3">
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="2faToggle" name="2faToggle" data-nonce="{{g.nonce}}" {% if v.mfa_secret %}checked{% endif %}>
<label class="custom-control-label" for="2faToggle"></label>
</div>
<span class="text-small text-muted">This requires entering a randomly-generated, 6-digit code and your password to login.</span>
</div>
</div>
</div>
</section>
<section id="site-settings-logout-everywhere-section" class="settings-section-section">
<h5>Log Out Everywhere</h5>
<form action="/settings/log_out_all_others" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<div class="body">
<div class="d-lg-flex">
<label for="forcelog-password" class="w-lg-25" id="email-password-label">Password</label>
<div class="w-lg-100">
<input autocomplete="off" type="password" class="form-control mb-2" id="forcelog-password" name="password" required>
</div>
</div>
<small id="emailpasswordRequired" class="form-text mt-1">This will also invalidate any existing recovery links associated with this account.</small>
</div>
<div class="footer">
<div class="d-flex">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Log out everywhere">
</div>
</div>
</form>
</section>
</div>
</div>
</div>
<div class="modal fade" id="2faModal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{% if mfa_secret %}
Setup two-step login
{% elif mfa_secret and not v.email %}
Email required for two-step login
{% else %}
Disable two-step login
{% endif %}
</h5>
<button type="button" class="close" data-bs-dismiss="modal">
<span><i class="fas fa-times"></i></span>
</button>
</div>
<form action="/settings/security" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input hidden name="2fa_secret" value="{{mfa_secret}}">
<div class="modal-body">
{% if mfa_secret %}
<p><span class="font-weight-bold">Step 1:</span> Scan this QR code (or enter the code) using a two-factor authentication app such as Google Authenticator or Authy.</p>
<div class="text-center mb-3">
<img alt="two-factor QR code" loading="lazy" class="img-fluid" width=175 src="/2faqr/{{mfa_secret}}">
<div class="text-small text-muted mt-1">Or enter this code: {{mfa_secret}}</div>
</div>
<p><span class="font-weight-bold">Step 2:</span> Enter the six-digit code generated in the authenticator app and your {{SITE_NAME}} account password.</p>
<label for="2fa_input">6-digit code</label>
<input autocomplete="off" type="text" class="form-control mb-2" id="2fa_input" name="2fa_token" placeholder="# # # # # #" required>
<label for="2fa_input_password">Password</label>
<input autocomplete="off" type="password" class="form-control mb-2" id="2fa_input_password" name="password" data-nonce="{{g.nonce}}" data-undisable_element="toggle2faButton" required>
{% set action = "Enable" %}
{% else %}
<div class="alert alert-warning">
<i class="fas fa-info-circle"></i>
To disable two-step login, please enter your {{SITE_NAME}} account password and the 6-digit code generated in your authentication app. If you no longer have your two-step device, <a href="/lost_2fa">click here</a>.
</div>
<label for="2fa_input_password">Password</label>
<input autocomplete="off" type="password" class="form-control mb-2" id="2fa_input_password" name="password" required>
<label for="2fa_input">6-digit code</label>
<input autocomplete="off" type="text" class="form-control mb-2" id="2fa_input" name="2fa_remove" placeholder="# # # # # #" data-nonce="{{g.nonce}}" data-undisable_element="toggle2faButton" required>
{% set action = "Disable" %}
{% endif %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button>
<input autocomplete="off" id="toggle2faButton" class="btn btn-primary" type="submit" value="{{action}} two-factor authentication" disabled>
</div>
</form>
</section>
</div>
</div>
</div>
<div class="toast error" id="toast-exile-error" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-exclamation-circle text-danger mr-2"></i><span id="toast-error-message">Error. Please try again.</span>
</div>
</div>
<div class="modal fade" id="2faModal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{% if mfa_secret %}
Setup two-step login
{% elif mfa_secret and not v.email %}
Email required for two-step login
{% else %}
Disable two-step login
{% endif %}
</h5>
<button type="button" class="close" data-bs-dismiss="modal">
<span><i class="fas fa-times"></i></span>
</button>
</div>
<form action="/settings/security" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="formkey" value="{{v|formkey}}">
<input hidden name="2fa_secret" value="{{mfa_secret}}">
<div class="modal-body">
{% if mfa_secret %}
<p><span class="font-weight-bold">Step 1:</span> Scan this QR code (or enter the code) using a two-factor authentication app such as Google Authenticator or Authy.</p>
<div class="text-center mb-3">
<img alt="two-factor QR code" loading="lazy" class="img-fluid" width=175 src="/2faqr/{{mfa_secret}}">
<div class="text-small text-muted mt-1">Or enter this code: {{mfa_secret}}</div>
</div>
<p><span class="font-weight-bold">Step 2:</span> Enter the six-digit code generated in the authenticator app and your {{SITE_NAME}} account password.</p>
<label for="2fa_input">6-digit code</label>
<input autocomplete="off" type="text" class="form-control mb-2" id="2fa_input" name="2fa_token" placeholder="# # # # # #" required>
<label for="2fa_input_password">Password</label>
<input autocomplete="off" type="password" class="form-control mb-2" id="2fa_input_password" name="password" data-nonce="{{g.nonce}}" data-undisable_element="toggle2faButton" required>
{% set action = "Enable" %}
{% else %}
<div class="alert alert-warning">
<i class="fas fa-info-circle"></i>
To disable two-step login, please enter your {{SITE_NAME}} account password and the 6-digit code generated in your authentication app. If you no longer have your two-step device, <a href="/lost_2fa">click here</a>.
</div>
<label for="2fa_input_password">Password</label>
<input autocomplete="off" type="password" class="form-control mb-2" id="2fa_input_password" name="password" required>
<label for="2fa_input">6-digit code</label>
<input autocomplete="off" type="text" class="form-control mb-2" id="2fa_input" name="2fa_remove" placeholder="# # # # # #" data-nonce="{{g.nonce}}" data-undisable_element="toggle2faButton" required>
{% set action = "Disable" %}
{% endif %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button>
<input autocomplete="off" id="toggle2faButton" class="btn btn-primary" type="submit" value="{{action}} two-factor authentication" disabled>
</div>
</form>
</div>
</div>
</div>
<div class="toast error" id="toast-exile-error" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-exclamation-circle text-danger mr-2"></i><span id="toast-error-message">Error. Please try again.</span>
</div>
</div>
{% endblock %}

View File

@ -3,92 +3,89 @@
{% block pagetype %}settings2{% endblock %}
{% block body_attributes %}class="has_header"{% endblock %}
{% block body %}
{% include "header.html" %}
{% block subNav %}
{% if not request.path.startswith('/h/') %}
<div class="container-fluid bg-white sticky d-mob-none" style="padding-top: 50px; padding-bottom: 0 !important">
<div class="row box-shadow-bottom">
<div class="col">
<div class="container" style="padding-bottom: 0">
<div class="row box-shadow-bottom bg-white">
<div class="col">
<div class="d-flex flex-row-reverse justify-content-end">
<ul class="nav settings-nav" style="margin-left: -15px">
<li class="nav-item">
<a class="nav-link{% if request.path == '/leaderboard' %} active{% endif %}" href="/leaderboard"><i class="fas fa-trophy pr-2"></i>Leaderboard</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path == '/admins' %} active{% endif %}" href="/admins"><i class="fas fa-crown pr-2"></i>Admins</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path == '/log' %} active{% endif %}" href="/log"><i class="fas fa-scroll-old pr-2"></i>Moderation Log</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path == '/banned' %} active{% endif %}" href="/banned"><i class="fas fa-user-slash pr-2"></i>Banned Users</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path == '/blocks' %} active{% endif %}" href="/blocks"><i class="fas fa-eye-slash pr-2"></i>Blocks</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/post/{{CHANGELOG_THREAD}}"><i class="fas fa-clipboard pr-2"></i>Changelog</a>
</li>
</ul>
{% include "header.html" %}
{% block subNav %}
{% if not request.path.startswith('/h/') %}
<div class="container-fluid bg-white sticky d-mob-none" style="padding-top: 50px; padding-bottom: 0 !important">
<div class="row box-shadow-bottom">
<div class="col">
<div class="container" style="padding-bottom: 0">
<div class="row box-shadow-bottom bg-white">
<div class="col">
<div class="d-flex flex-row-reverse justify-content-end">
<ul class="nav settings-nav" style="margin-left: -15px">
<li class="nav-item">
<a class="nav-link{% if request.path == '/leaderboard' %} active{% endif %}" href="/leaderboard"><i class="fas fa-trophy pr-2"></i>Leaderboard</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path == '/admins' %} active{% endif %}" href="/admins"><i class="fas fa-crown pr-2"></i>Admins</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path == '/log' %} active{% endif %}" href="/log"><i class="fas fa-scroll-old pr-2"></i>Moderation Log</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path == '/banned' %} active{% endif %}" href="/banned"><i class="fas fa-user-slash pr-2"></i>Banned Users</a>
</li>
<li class="nav-item">
<a class="nav-link{% if request.path == '/blocks' %} active{% endif %}" href="/blocks"><i class="fas fa-eye-slash pr-2"></i>Blocks</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/post/{{CHANGELOG_THREAD}}"><i class="fas fa-clipboard pr-2"></i>Changelog</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid bg-white sticky d-md-none" style="padding-top: 20px; padding-bottom: 0">
<div class="row box-shadow-bottom">
<div class="col px-0">
<div class="d-flex flex-row-reverse justify-content-center">
<ul class="nav settings-nav">
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/leaderboard' %} active{% endif %}" href="/leaderboard"><i class="fas fa-trophy text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/admins' %} active{% endif %}" href="/admins"><i class="fas fa-crown text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/log' %} active{% endif %}" href="/log"><i class="fas fa-scroll-old text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/banned' %} active{% endif %}" href="/banned"><i class="fas fa-user-slash text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/blocks' %} active{% endif %}" href="/blocks"><i class="fas fa-eye-slash text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link" href="/post/{{CHANGELOG_THREAD}}"><i class="fas fa-clipboard text-lg mr-0"></i></a>
</li>
</ul>
<div class="container-fluid bg-white sticky d-md-none" style="padding-top: 20px; padding-bottom: 0">
<div class="row box-shadow-bottom">
<div class="col px-0">
<div class="d-flex flex-row-reverse justify-content-center">
<ul class="nav settings-nav">
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/leaderboard' %} active{% endif %}" href="/leaderboard"><i class="fas fa-trophy text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/admins' %} active{% endif %}" href="/admins"><i class="fas fa-crown text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/log' %} active{% endif %}" href="/log"><i class="fas fa-scroll-old text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/banned' %} active{% endif %}" href="/banned"><i class="fas fa-user-slash text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link{% if request.path == '/blocks' %} active{% endif %}" href="/blocks"><i class="fas fa-eye-slash text-lg mr-0"></i></a>
</li>
<li class="nav-item">
<a style="padding: 0.75rem 1rem" class="nav-link" href="/post/{{CHANGELOG_THREAD}}"><i class="fas fa-clipboard text-lg mr-0"></i></a>
</li>
</ul>
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
<div class="pt-3 container">
{% block content %}{% endblock %}
</div>
<div class="toast clipboard" id="toast-clipboard-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
{% endif %}
{% endblock %}
<div class="pt-3 container">
{% block content %}{% endblock %}
</div>
<div class="toast clipboard" id="toast-clipboard-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
</div>
<div class="toast clipboard" id="toast-clipboard-error" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-exclamation-circle mr-2"></i>Unable to copy link
<div class="toast clipboard" id="toast-clipboard-error" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-exclamation-circle mr-2"></i>Unable to copy link
</div>
</div>
</div>
{% block mobilenavbar %}{% include "mobile_navigation_bar.html" %}{% endblock %}
{% block scripts %}{% endblock %}
{% block mobilenavbar %}{% include "mobile_navigation_bar.html" %}{% endblock %}
{% block scripts %}{% endblock %}
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "default.html" %}
{% block pagetitle %}{{SITE_NAME}} Sidebar{% endblock %}
{% block content %}
<div class="mx-4 mt-4 mb-6">
<h1 class="text-muted text-uppercase">Sidebar</h5>
<div id="sidebar" class="my-3">
{% if has_sidebar %}
{% include "sidebar_" ~ SITE_NAME ~ ".html" %}
{% endif %}
<div class="mx-4 mt-4 mb-6">
<h1 class="text-muted text-uppercase">Sidebar</h5>
<div id="sidebar" class="my-3">
{% if has_sidebar %}
{% include "sidebar_" ~ SITE_NAME ~ ".html" %}
{% endif %}
</div>
</div>
</div>
{% endblock %}

View File

@ -1,35 +1,34 @@
{%- extends 'default.html' -%}
{% block pagetitle %}Women World Cup 2023 Betting Leaderboard{% endblock %}
{% block content %}
<h1>Women World Cup 2023 Betting Leaderboard</h1>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Wins</th>
<th>Bets</th>
<th>Win rate</th>
<th>Winnings</th>
</tr>
</thead>
<tbody>
{% for r in result %}
<tr>
{% set user = users.get(r[0]) %}
<td>{{loop.index}}</td>
<td data-sort-key="{{user.username.lower() if user else ''}}">{%- include 'user_in_table.html' -%}</td>
<td>{{r[1]}}</td>
<td>{{r[2]}}</td>
{% set ratio = r[1]/r[2] %}
{% set percent = (ratio*100)|string %}
<td data-sort-key="{{ratio}}">{{percent[:3].replace('0.0', '0').rstrip('.')}}%</td>
<td>{{r[3]}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<h1>Women World Cup 2023 Betting Leaderboard</h1>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Wins</th>
<th>Bets</th>
<th>Win rate</th>
<th>Winnings</th>
</tr>
</thead>
<tbody>
{% for r in result %}
<tr>
{% set user = users.get(r[0]) %}
<td>{{loop.index}}</td>
<td data-sort-key="{{user.username.lower() if user else ''}}">{%- include 'user_in_table.html' -%}</td>
<td>{{r[1]}}</td>
<td>{{r[2]}}</td>
{% set ratio = r[1]/r[2] %}
{% set percent = (ratio*100)|string %}
<td data-sort-key="{{ratio}}">{{percent[:3].replace('0.0', '0').rstrip('.')}}%</td>
<td>{{r[3]}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

View File

@ -1,22 +1,24 @@
{% extends "default.html" %}
{% block pagetitle %}Content Statistics{% endblock %}
{% block content %}
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th class="disable-sort-click">Statistic</th>
<th class="disable-sort-click">Value</th>
</tr>
</thead>
{% for key, value in data.items() %}
<tr>
<td>{{key}}</td>
{% if key == 'time' -%}
<td data-time="{{value}}"></td>
{% else -%}
<td>{{value}}</td>
{%- endif %}
</tr>
{% endfor %}
</table>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th class="disable-sort-click">Statistic</th>
<th class="disable-sort-click">Value</th>
</tr>
</thead>
{% for key, value in data.items() %}
<tr>
<td>{{key}}</td>
{% if key == 'time' -%}
<td data-time="{{value}}"></td>
{% else -%}
<td>{{value}}</td>
{%- endif %}
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -13,11 +13,11 @@
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
{% include "pagination.html" %}
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
</div>
</div>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
{% endblock %}

View File

@ -3,11 +3,11 @@
{% block PseudoSubmitForm %}{% endblock %}
{% block customPadding %}{% endblock %}
{% block content %}
<div class="row mt-3 p-md-4">
{% include "user_listing.html" %}
</div>
<div class="row mt-3 p-md-4">
{% include "user_listing.html" %}
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}
{% block navbar %}{% endblock %}

File diff suppressed because it is too large Load Diff

View File

@ -3,18 +3,18 @@
{% block pagetype %}userpage{% endblock %}
{% block pagetitle %}@{{u.username}}{% endblock %}
{% block content %}
<div class="row no-gutters">
<div class="col-12">
<div class="text-center py-6 py-md-8">
<span class="fa-stack fa-2x text-muted mb-2">
<i class="fas fa-square text-danger opacity-25 fa-stack-2x"></i>
<i class="fas text-danger fa-user-cog fa-stack-1x text-lg"></i>
</span>
<h5>You are blocking @{{u.username}}.</h5>
<p class="text-muted">So we aren't going to show you their profile.</p>
<button type="button" class="btn btn-success text-success mt-2" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/unblock_user?username={{u.username}}')"><i class="fas fa-eye text-success mr-2"></i>Unblock @{{u.username}}</a>
<div class="row no-gutters">
<div class="col-12">
<div class="text-center py-6 py-md-8">
<span class="fa-stack fa-2x text-muted mb-2">
<i class="fas fa-square text-danger opacity-25 fa-stack-2x"></i>
<i class="fas text-danger fa-user-cog fa-stack-1x text-lg"></i>
</span>
<h5>You are blocking @{{u.username}}.</h5>
<p class="text-muted">So we aren't going to show you their profile.</p>
<button type="button" class="btn btn-success text-success mt-2" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/unblock_user?username={{u.username}}')"><i class="fas fa-eye text-success mr-2"></i>Unblock @{{u.username}}</a>
</div>
</div>
</div>
</div>
{% endblock %}
{% block pagenav %}{% endblock %}

View File

@ -1,28 +1,29 @@
{% extends "default.html" %}
{% block pagetitle %}@{{u.username}}'s blockers{% endblock %}
{% block content %}
<h5 class="my-3">@{{u.username}}'s blockers ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Blocking since</td>
</tr>
</thead>
<tbody id="blockers-table">
{% for block, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if block.created_utc > 1599343262 %}data-time="{{block.created_utc}}"{% endif %}></td>
</tr>
{% endfor %}
</tbody>
</table>
<h5 class="my-3">@{{u.username}}'s blockers ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Blocking since</td>
</tr>
</thead>
<tbody id="blockers-table">
{% for block, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if block.created_utc > 1599343262 %}data-time="{{block.created_utc}}"{% endif %}></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}
({{total}} user{{macros.plural(total)}})

View File

@ -1,38 +1,37 @@
{% extends "default.html" %}
{% block pagetitle %}Users blocked by @{{u.username}}{% endblock %}
{% block content %}
<h5 class="my-3">Users blocked by @{{u.username}} ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Blocking since</th>
{% if v.id == u.id %}
<th class="disable-sort-click"></th>
{% endif %}
</tr>
</thead>
<tbody id="blockers-table">
{% for block, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if block.created_utc > 1599343262 %}data-time="{{block.created_utc}}"{% endif %}></td>
{% if v.id == u.id %}
<td>
<button type="button" class="btn btn-primary" data-nonce="{{g.nonce}}" data-onclick="unblock_user(this, '/unblock_user?username={{user.username}}&formkey={{v|formkey}}')">Unblock</button>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% if v.id == u.id %}
<script defer src="{{'js/userpage_blocking.js' | asset}}"></script>
{% endif %}
<h5 class="my-3">Users blocked by @{{u.username}} ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Blocking since</th>
{% if v.id == u.id %}
<th class="disable-sort-click"></th>
{% endif %}
</tr>
</thead>
<tbody id="blockers-table">
{% for block, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if block.created_utc > 1599343262 %}data-time="{{block.created_utc}}"{% endif %}></td>
{% if v.id == u.id %}
<td>
<button type="button" class="btn btn-primary" data-nonce="{{g.nonce}}" data-onclick="unblock_user(this, '/unblock_user?username={{user.username}}&formkey={{v|formkey}}')">Unblock</button>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% if v.id == u.id %}
<script defer src="{{'js/userpage_blocking.js' | asset}}"></script>
{% endif %}
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -1,38 +1,39 @@
{% extends "default.html" %}
{% block pagetitle %}@{{u.username}}'s followers{% endblock %}
{% block content %}
<h5 class="my-3">@{{u.username}}'s followers ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Following since</td>
{% if v.id == u.id %}
<th class="disable-sort-click"></th>
{% endif %}
</tr>
</thead>
<tbody id="followers-table">
{% for follow, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if follow.created_utc > 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}></td>
{% if v.id == u.id %}
<td>
<div class="btn btn-danger" data-areyousure="removeFollower(this, '{{user.username}}')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">
Remove follow
</div>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
<script defer src="{{'js/followers.js' | asset}}"></script>
<h5 class="my-3">@{{u.username}}'s followers ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Following since</td>
{% if v.id == u.id %}
<th class="disable-sort-click"></th>
{% endif %}
</tr>
</thead>
<tbody id="followers-table">
{% for follow, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if follow.created_utc > 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}></td>
{% if v.id == u.id %}
<td>
<div class="btn btn-danger" data-areyousure="removeFollower(this, '{{user.username}}')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">
Remove follow
</div>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<script defer src="{{'js/followers.js' | asset}}"></script>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -1,38 +1,39 @@
{% extends "default.html" %}
{% block pagetitle %}Users followed by @{{u.username}}{% endblock %}
{% block content %}
<h5 class="my-3">Users followed by @{{u.username}} ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Following since</td>
{% if v.id == u.id %}
<th class="disable-sort-click"></th>
{% endif %}
</tr>
</thead>
<tbody id="followers-table">
{% for follow, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if follow.created_utc > 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}></td>
{% if v.id == u.id %}
<td>
<div class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="removeFollowing(this, '{{user.username}}')">
Unfollow
</div>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
<script defer src="{{'js/following.js' | asset}}"></script>
<h5 class="my-3">Users followed by @{{u.username}} ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Following since</td>
{% if v.id == u.id %}
<th class="disable-sort-click"></th>
{% endif %}
</tr>
</thead>
<tbody id="followers-table">
{% for follow, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td {% if follow.created_utc > 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}></td>
{% if v.id == u.id %}
<td>
<div class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="removeFollowing(this, '{{user.username}}')">
Unfollow
</div>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<script defer src="{{'js/following.js' | asset}}"></script>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -1,26 +1,27 @@
{% extends "default.html" %}
{% block pagetitle %}@{{u.username}}'s notification muters{% endblock %}
{% block content %}
<h5 class="my-3">@{{u.username}}'s notification muters ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Muting notifications since</td>
</tr>
</thead>
<tbody id="muters-table">
{% for mute, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td data-time="{{mute.created_utc}}"></td>
</tr>
{% endfor %}
</tbody>
</table>
<h5 class="my-3">@{{u.username}}'s notification muters ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Muting notifications since</td>
</tr>
</thead>
<tbody id="muters-table">
{% for mute, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td data-time="{{mute.created_utc}}"></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -1,38 +1,39 @@
{% extends "default.html" %}
{% block pagetitle %}Users whose notifications are muted by @{{u.username}}{% endblock %}
{% block content %}
<h5 class="my-3">Users whose notifications are muted by @{{u.username}} ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Muting notifications since</th>
{% if v.id == u.id %}
<th class="disable-sort-click"></th>
{% endif %}
</tr>
</thead>
<tbody id="muters-table">
{% for mute, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td data-time="{{mute.created_utc}}"></td>
{% if v.id == u.id %}
<td>
<button type="button" class="btn btn-primary" data-nonce="{{g.nonce}}" data-onclick="unmute_notifs(this, '/unmute_notifs/{{user.id}}')">Unmute</button>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% if v.id == u.id %}
<script defer src="{{'js/userpage_muting.js' | asset}}"></script>
{% endif %}
<h5 class="my-3">Users whose notifications are muted by @{{u.username}} ({{total}} user{{macros.plural(total)}})</h5>
<div class="overflow-x-auto mt-1">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Muting notifications since</th>
{% if v.id == u.id %}
<th class="disable-sort-click"></th>
{% endif %}
</tr>
</thead>
<tbody id="muters-table">
{% for mute, user in users %}
<tr>
<td>{% include "user_in_table.html" %}</td>
<td data-time="{{mute.created_utc}}"></td>
{% if v.id == u.id %}
<td>
<button type="button" class="btn btn-primary" data-nonce="{{g.nonce}}" data-onclick="unmute_notifs(this, '/unmute_notifs/{{user.id}}')">Unmute</button>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if v.id == u.id %}
<script defer src="{{'js/userpage_muting.js' | asset}}"></script>
{% endif %}
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

View File

@ -1,10 +1,10 @@
{%- extends 'userpage/userpage.html' -%}
{% block userpage_content %}
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %} userpage-posts" style="margin-top: 10px">
<div class="col">
<div class="posts">
{% include "post_listing.html" %}
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %} userpage-posts" style="margin-top: 10px">
<div class="col">
<div class="posts">
{% include "post_listing.html" %}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,15 +1,15 @@
{% extends "userpage/userpage.html" %}
{% block userpage_content %}
<div class="row justify-content-center userpage-private">
<div class="col-10 col-md-5">
<div class="text-center px-3 my-3">
<span class="fa-stack fa-2x text-muted mb-4">
<i class="fas fa-square text-gray-500 opacity-25 fa-stack-2x"></i>
<i class="fas text-gray-500 fa-user-lock fa-stack-1x text-lg"></i>
</span>
<h5>This account is private</h5>
<p class="text-muted">This user has enabled private mode to cloak their posting history.</p>
<div class="row justify-content-center userpage-private">
<div class="col-10 col-md-5">
<div class="text-center px-3 my-3">
<span class="fa-stack fa-2x text-muted mb-4">
<i class="fas fa-square text-gray-500 opacity-25 fa-stack-2x"></i>
<i class="fas text-gray-500 fa-user-lock fa-stack-1x text-lg"></i>
</span>
<h5>This account is private</h5>
<p class="text-muted">This user has enabled private mode to cloak their posting history.</p>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,6 +1,7 @@
{% extends "default.html" %}
{% block pagetype %}userpage{% endblock %}
{% block pagetitle %}@{{u.username}}'s profile{% endblock %}
{% block head_final %}
{% if u and u.profile_background %}
<link rel="stylesheet" href="{{('css/transparent.css') | asset}}">
@ -9,42 +10,47 @@
<link rel="stylesheet" href="/@{{u.username}}/profilecss">
{% endif %}
{% endblock %}
{% block content %}
{%- include 'userpage/banner.html' -%}
{%- include 'userpage/header.html' -%}
{% block userpage_content required %}{% endblock %}
{% if FEATURES['USERS_PROFILE_SONG'] and u.song %}
{% if v and v.id == u.id %}
<div id="v_username" class="d-none">{{v.username}}</div>
{% else %}
<div id="u_username" class="d-none">{{u.username}}</div>
{% endif %}
{% endif %}
{% if v %}
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
<script defer src="{{'js/userpage_v.js' | asset}}"></script>
<div id="username" class="d-none">{{u.username}}</div>
{% endif %}
<script defer src="{{'js/userpage.js' | asset}}"></script>
{% if can_see(v, u) and u.song %}
<audio id="profile-song" hidden preload="none" src="/songs/{{u.song}}.mp3" loop></audio>
<script defer src="{{'js/profile_song.js' | asset}}"></script>
{% endif %}
{% block content %}
{%- include 'userpage/banner.html' -%}
{%- include 'userpage/header.html' -%}
{% block userpage_content required %}{% endblock %}
{% if FEATURES['USERS_PROFILE_SONG'] and u.song %}
{% if v and v.id == u.id %}
<div id="v_username" class="d-none">{{v.username}}</div>
{% else %}
<div id="u_username" class="d-none">{{u.username}}</div>
{% endif %}
{% endif %}
{% if v %}
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
<script defer src="{{'js/userpage_v.js' | asset}}"></script>
<div id="username" class="d-none">{{u.username}}</div>
{% endif %}
<script defer src="{{'js/userpage.js' | asset}}"></script>
{% if can_see(v, u) and u.song %}
<audio id="profile-song" hidden preload="none" src="/songs/{{u.song}}.mp3" loop></audio>
<script defer src="{{'js/profile_song.js' | asset}}"></script>
{% endif %}
{% endblock %}
{% block pagenav %}
{% if listing %}
{% include "pagination.html" %}
{% endif %}
{% if listing %}
{% include "pagination.html" %}
{% endif %}
{% if request.path.endswith('/posts') %}
<script defer src="{{'js/vendor/marked.js' | asset}}"></script>
<script defer src="{{'js/markdown.js' | asset}}"></script>
{% endif %}
{% if request.path.endswith('/posts') %}
<script defer src="{{'js/vendor/marked.js' | asset}}"></script>
<script defer src="{{'js/markdown.js' | asset}}"></script>
{% endif %}
{% if v and v.id != u.id and request.path.endswith('/posts') %}
{% include "modals/gif.html" %}
{% endif %}
{% if v and v.id != u.id and request.path.endswith('/posts') %}
{% include "modals/gif.html" %}
{% endif %}
{% endblock %}
{% block GIFpicker %}{% endblock %}

View File

@ -1,28 +1,30 @@
{% extends "default.html" %}
{% block pagetitle %}@{{u.username}}'s Profile Views{% endblock %}
{% block content %}
<h5 class="pt-4 pl-2 pb-3">Users who viewed @{{u.username}}'s profile</h5>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Last visit</th>
</tr>
</thead>
{% for view in views %}
<tr>
<td>
{% with user=view.viewer %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td>{{view.last_view_string}}</td>
</tr>
{% endfor %}
</table>
{% block content %}
<h5 class="pt-4 pl-2 pb-3">Users who viewed @{{u.username}}'s profile</h5>
<div class="overflow-x-auto">
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>Name</th>
<th class="disable-sort-click">Last visit</th>
</tr>
</thead>
{% for view in views %}
<tr>
<td>
{% with user=view.viewer %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td>{{view.last_view_string}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}
{% block pagenav %}
{% include "pagination.html" %}
{% include "pagination.html" %}
{% endblock %}

Some files were not shown because too many files have changed in this diff Show More