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 pagetitle %}Admin Home{% endblock %}
{% block customPadding %}px-3{% endblock %} {% block customPadding %}px-3{% endblock %}
{% block content %} {% block content %}
<h3 class="py-2">Admin Tools</h3> <h3 class="py-2">Admin Tools</h3>
{% if v.admin_level >= PERMS['INSERT_TRANSACTION'] %} {% if v.admin_level >= PERMS['INSERT_TRANSACTION'] %}
<h4>Transactions</h4> <h4>Transactions</h4>
<ul> <ul>
<li><a href="/admin/insert_transaction">Insert Transaction</a></li> <li><a href="/admin/insert_transaction">Insert Transaction</a></li>
</ul> </ul>
{%- endif %} {%- endif %}
{% if v.admin_level >= PERMS['ORGIES'] %} {% if v.admin_level >= PERMS['ORGIES'] %}
<h4>Orgies</h4> <h4>Orgies</h4>
<ul> <ul>
<li><a href="/admin/orgies">Schedule/Stop Orgy</a></li> <li><a href="/admin/orgies">Schedule/Stop Orgy</a></li>
</ul> </ul>
{%- endif %} {%- 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) %} {% 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> <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> <ul>
{% if v.admin_level >= PERMS['USE_ADMIGGER_THREADS'] %} {% if v.admin_level >= PERMS['ENABLE_DM_MEDIA'] %}
{% if SIDEBAR_THREAD %} <li><a href="/admin/dm_media">DM Media</a></li>
<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 %} {% endif %}
<li><a href="/log">Moderation Log</a></li>
{% if v.admin_level >= PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] %} {% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% if FEATURES['EMOJI_SUBMISSIONS'] -%} <li><a href="/admin/image_posts">Image Posts</a></li>
<li><a href="/submit/emojis">Approve or Reject Emojis</a></li> <li><a href="/admin/reported/posts">Reported Posts/Comments</a></li>
{% endif %} <li><a href="/admin/removed/posts">Removed Posts/Comments</a></li>
{% 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 %} {% endif %}
</ul> </ul>
{% endif %}
<h4>Content</h4> <h4>Users</h4>
<ul> <ul>
{% if v.admin_level >= PERMS['ENABLE_DM_MEDIA'] %} {% if v.can_see_shadowbanned %}
<li><a href="/admin/dm_media">DM Media</a></li> <li><a href="/admin/shadowbanned">Shadowbanned Users</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>
{% endif %} {% endif %}
{% endfor %} <li><a href="/banned">Banned Users</a></li>
{% endif %} {% 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'] %} <h4>Safety</h4>
<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> <ul>
{% endif %} {% 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'] %} {% if FEATURES['BADGES'] and v.admin_level >= PERMS['USER_BADGES'] -%}
<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> <h4>Badges</h4>
{% endif %} <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 %} {% endblock %}

View File

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

View File

@ -1,60 +1,60 @@
{% extends "settings2.html" %} {% extends "settings2.html" %}
{% block pagetitle %}Alts{% if u %} for @{{u.username}}{% endif %}{% endblock %} {% block pagetitle %}Alts{% if u %} for @{{u.username}}{% endif %}{% endblock %}
{% block content %} {% block content %}
{% if u %} {% if u %}
<h5 class="mt-3">Alts for <a href="/@{{u.username}}">@{{u.username}}</a></h5> <h5 class="mt-3">Alts for <a href="/@{{u.username}}">@{{u.username}}</a></h5>
{% else %} {% else %}
<h5 class="mt-3">Alts</h5> <h5 class="mt-3">Alts</h5>
{% endif %} {% endif %}
<section class="username-input-section mb-3"> <section class="username-input-section mb-3">
<form action="/admin/alts" method="get"> <form action="/admin/alts" method="get">
<label for="link-input">Username</label> <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 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"> <input type="submit" value="Submit" class="btn btn-primary">
</form> </form>
</section> </section>
{% if u %} {% if u %}
{% set count=alts|length %} {% set count=alts|length %}
<section class="userinfo-section"> <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> <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> 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> </section>
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="table table-striped mb-5"> <table class="table table-striped mb-5">
<thead class="bg-primary text-white"> <thead class="bg-primary text-white">
<tr> <tr>
<th>#</th> <th>#</th>
<th>Name</th> <th>Name</th>
<th class="disable-sort-click">Account Created</th> <th class="disable-sort-click">Account Created</th>
<th>Manual</th> <th>Manual</th>
<th class="disable-sort-click">Actions</th> <th class="disable-sort-click">Actions</th>
</tr> </tr>
</thead> </thead>
{% for user in alts %} {% for user in alts %}
<tr> <tr>
<td>{{loop.index}}</td> <td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td> <td>{% include "user_in_table.html" %}</td>
<td>{{user.created_utc|timestamp}}</td> <td>{{user.created_utc|timestamp}}</td>
<td>{{user._is_manual}}</td> <td>{{user._is_manual}}</td>
<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> <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> <a class="btn btn-secondary" href="/@{{user.username}}/alts">Alts</a>
{% if v.admin_level >= PERMS['VIEW_ALT_VOTES'] %} {% 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> <a class="btn btn-secondary" href="/admin/alt_votes/?u1={{u.username}}&u2={{user.username}}">Alt Votes</a>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
<section id="add-alt" class="rounded rounded-section p-3"> <section id="add-alt" class="rounded rounded-section p-3">
<h5>Add Alt</h5> <h5>Add Alt</h5>
<p>This tool allows you to link an alt.</p> <p>This tool allows you to link an alt.</p>
<label for="link-input-other">Other Username</label> <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"> <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> <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> </section>
{% endif %} {% endif %}
<script defer src="{{'js/admin/alts.js' | asset}}"></script> <script defer src="{{'js/admin/alts.js' | asset}}"></script>
{% endblock %} {% endblock %}

View File

@ -1,50 +1,49 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}API App Administration{% endblock %} {% block pagetitle %}API App Administration{% endblock %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col col-lg-8"> <div class="col col-lg-8">
<div class="settings"> <div class="settings">
{% for app in apps %} {% for app in apps %}
<div class="settings-section rounded"> <div class="settings-section rounded">
<div class="d-lg-flex"> <div class="d-lg-flex">
<div class="title w-lg-25"> <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> <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>
<div class="footer">
<div class="body w-lg-100"> <div class="d-flex">
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label> {% if not app.client_id %}
<input autocomplete="off" id="edit-{{app.id}}-author" class="form-control" type="text" name="name" value="{{app.author.username}}" readonly=readonly> <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>
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label> {% else %}
<input autocomplete="off" id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}" readonly=readonly> <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 %}
{% if app.client_id %} </div>
<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> </div>
<div class="footer"> {% endfor %}
<div class="d-flex"> </div>
{% 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 %}
</div> </div>
</div> </div>
</div>
<script defer src="{{'js/admin/apps.js' | asset}}"></script>
<script defer src="{{'js/admin/apps.js' | asset}}"></script>
{% endblock %} {% endblock %}

View File

@ -2,55 +2,56 @@
{% block pagetitle %}{{"Badge Grant" if grant else "Badge Remove"}}{% endblock %} {% block pagetitle %}{{"Badge Grant" if grant else "Badge Remove"}}{% endblock %}
{% block pagetype %}message{% endblock %} {% block pagetype %}message{% endblock %}
{% block content %} {% 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)"> <div class="overflow-x-auto mt-4">
<input hidden name="formkey" value="{{v|formkey}}"> <table class="table table-striped">
<thead class="bg-primary text-white">
<div class="overflow-x-auto mt-4"><table class="table table-striped"> <tr>
<thead class="bg-primary text-white"> <th>Select</th>
<tr> <th>Image</th>
<th>Select</th> <th>Name</th>
<th>Image</th> <th>Default Description</th>
<th>Name</th> </tr>
<th>Default Description</th> </thead>
</tr> <tbody>
</thead> {% for badge in badge_types %}
<tbody> <tr>
{% for badge in badge_types %} <td>
<tr> <div class="custom-control">
<td> <input autocomplete="off" class="custom-control-input" type="radio" id="{{badge.id}}" name="badge_id" value="{{badge.id}}" required>
<div class="custom-control"> <label class="custom-control-label" for="{{badge.id}}"></label>
<input autocomplete="off" class="custom-control-input" type="radio" id="{{badge.id}}" name="badge_id" value="{{badge.id}}" required> </div>
<label class="custom-control-label" for="{{badge.id}}"></label> </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> </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 for="input-usernames">Usernames (separated with a space)</label>
<label class="mt-2" for="input-url">URL</label> {% set usernames = request.values.get('usernames') %}
<input autocomplete="off" id="input-url" class="form-control" type="text" name="url" type="url" placeholder="Optional"> <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> {% if grant %}
<input autocomplete="off" id="input-description" class="form-control" type="text" name="description" placeholder="Optional except for specific badges"> <label class="mt-2" for="input-url">URL</label>
{% endif %} <input autocomplete="off" id="input-url" class="form-control" type="text" name="url" type="url" placeholder="Optional">
<input autocomplete="off" class="btn btn-primary mt-3" type="submit">
</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 %} {% endblock %}

View File

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

View File

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

View File

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

View File

@ -3,26 +3,26 @@
{% block pagetitle %}Edit {{SITE_NAME}}'s rules{% endblock %} {% block pagetitle %}Edit {{SITE_NAME}}'s rules{% endblock %}
{% block content %} {% block content %}
<div class="row my-5"> <div class="row my-5">
<div class="col"> <div class="col">
<div class="settings mx-3"> <div class="settings mx-3">
<div id="description"> <div id="description">
<h2>Edit the Rules</h2> <h2>Edit the Rules</h2>
<br> <br>
</div> </div>
<div class="body d-lg-flex"> <div class="body d-lg-flex">
<div class="w-lg-100"> <div class="w-lg-100">
<form id="edit_rules" action="/admin/edit_rules" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)"> <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}}"> <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> <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"> <div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save"> <input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
</div> </div>
</form> </form>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,29 +1,30 @@
{% extends "settings2.html" %} {% extends "settings2.html" %}
{% block pagetitle %}Patrons{% endblock %} {% block pagetitle %}Patrons{% endblock %}
{% block content %} {% block content %}
<div class="overflow-x-auto"><table class="table table-striped mb-5"> <div class="overflow-x-auto">
<thead class="bg-primary text-white"> <table class="table table-striped mb-5">
<tr> <thead class="bg-primary text-white">
<th>#</th> <tr>
<th>Name</th> <th>#</th>
<th>Tier</th> <th>Name</th>
<th>Lifetime Donated</th> <th>Tier</th>
<th>Truescore</th> <th>Lifetime Donated</th>
</tr> <th>Truescore</th>
</thead> </tr>
{% for user in users %} </thead>
<tr> {% for user in users %}
<td>{{loop.index}}</td> <tr>
<td>{% include "user_in_table.html" %}</td> <td>{{loop.index}}</td>
<td data-sort-key="{{user.patrons}}"> <td>{% include "user_in_table.html" %}</td>
{% if user.patron > 1 %} <td data-sort-key="{{user.patrons}}">
<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}}"> {% if user.patron > 1 %}
{% endif %} <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}}">
</td> {% endif %}
<td data-sort-key="{{user.lifetimedonated}}">${{user.lifetimedonated}}</td> </td>
<td>{{user.truescore}}</td> <td data-sort-key="{{user.lifetimedonated}}">${{user.lifetimedonated}}</td>
</tr> <td>{{user.truescore}}</td>
{% endfor %} </tr>
</table> {% endfor %}
</table>
</div>
{% endblock %} {% endblock %}

View File

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

View File

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

View File

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

View File

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

View File

@ -2,97 +2,97 @@
{% block pagetitle %}API{% endblock %} {% block pagetitle %}API{% endblock %}
{% block content %} {% block content %}
<h1 class="my-3">API Guide for Bots</h1> <h1 class="my-3">API Guide for Bots</h1>
<p>This page explains how to obtain and use an access token. </p> <p>This page explains how to obtain and use an access token. </p>
<h4>Step 1: Create your Application</h4> <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> <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> <ul>
<li>an application name</li> <li>an application name</li>
<li>a Redirect URI. May not use HTTP unless using localhost (use HTTPS instead).</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> <li>a brief description of what your bot is intended to do</li>
</ul> </ul>
<p>Don't worry too much about accuracy; you will be able to change all of these later.</p> <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>{{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> <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> <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>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> <p>Python example:</p>
<pre> import requests <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()) print(r.json())
</pre> </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> <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> <p>Aother python example:</p>
<pre> import requests <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()) print(r.json())
</pre> </pre>
<p>The expected result of this would be a JSON representation of unread notifications for your account</p> <p>The expected result of this would be a JSON representation of unread notifications for your account</p>
<br> <br>
<hr> <hr>
<br> <br>
<h1 class="my-3">API Guide for Applications</h1> <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>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> <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> <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> <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> <ul>
<li>an application name</li> <li>an application name</li>
<li>a Redirect URI. May not use HTTP unless using localhost (use HTTPS instead).</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> <li>a brief description of what your application is intended to do</li>
</ul> </ul>
<p>Don't worry too much about accuracy; you will be able to change all of these later.</p> <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>{{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> <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> <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>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> <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> <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> <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> <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>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> <p>Python example:</p>
<pre> import requests <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()) print(r.json())
</pre> </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> <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> <p>Aother python example:</p>
<pre> import requests <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()) print(r.json())
</pre> </pre>
<p>The expected result of this would be a JSON representation of unread notifications for your account</p> <p>The expected result of this would be a JSON representation of unread notifications for your account</p>
{% endblock %} {% endblock %}

View File

@ -1,29 +1,28 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}App{% endblock %} {% block pagetitle %}App{% endblock %}
{% block content %} {% block content %}
<div class="ml-3 mt-4"> <div class="ml-3 mt-4">
<h5>How to install {{SITE_NAME}}'s mobile app</h5> <h5>How to install {{SITE_NAME}}'s mobile app</h5>
{% if not v and g.browser == 'chromium' %} {% if not v and g.browser == 'chromium' %}
{% set type = 'chromium-lo' %} {% set type = 'chromium-lo' %}
{% elif g.browser in ('iphone','mac') %} {% elif g.browser in ('iphone','mac') %}
{% set type = 'apple' %} {% set type = 'apple' %}
{% else %} {% else %}
{% set type = g.browser %} {% set type = g.browser %}
{% endif %} {% 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> <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"> <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">
{% endif %}
</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 %} {% endblock %}

View File

@ -1,37 +1,34 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}User Badges{% endblock %} {% block pagetitle %}User Badges{% endblock %}
{% block content %} {% block content %}
<h1 class="mt-3">User Badges</h1> <h1 class="mt-3">User Badges</h1>
<div>This page describes the requirements for obtaining all profile badges.</div> <div>This page describes the requirements for obtaining all profile badges.</div>
<div class="overflow-x-auto mt-3"> <div class="overflow-x-auto mt-3">
<table class="table table-striped mb-5"> <table class="table table-striped mb-5">
<thead class="bg-primary text-white"> <thead class="bg-primary text-white">
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>Name</th> <th>Name</th>
<th>Image</th> <th>Image</th>
<th>Description</th> <th>Description</th>
<th>#</th> <th>#</th>
<th>Rarity</th> <th>Rarity</th>
</tr> </tr>
</thead> </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>
{% 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 %} {% endblock %}

View File

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

View File

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

View File

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

View File

@ -5,41 +5,41 @@
{% endblock %} {% endblock %}
{% block screen %} {% block screen %}
<div id="blackjack-table-deck"></div> <div id="blackjack-table-deck"></div>
<div id="blackjack-table" data-state="{{game_state}}" style="position: relative"> <div id="blackjack-table" data-state="{{game_state}}" style="position: relative">
</div> </div>
{% endblock %} {% endblock %}
{% block actions %} {% 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"> <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-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-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()" <button type="button" id="twentyone-STAY" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="stay()"
style="display: none">Stay</button> style="display: none">Stay</button>
<button type="button" id="twentyone-SPLIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="split()" <button type="button" id="twentyone-SPLIT" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="split()"
style="display: none">Split</button> 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()" <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> 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()" <button type="button" id="twentyone-BUY_INSURANCE" class="btn btn-primary twentyone-btn" data-nonce="{{g.nonce}}" data-onclick="buyInsurance()"
style="display: none">Buy style="display: none">Buy
Insurance</button> Insurance</button>
</div> </div>
<div id="twentyone-SPLIT_ACTIONS" class="btn-group" style="display: none"> <div id="twentyone-SPLIT_ACTIONS" class="btn-group" style="display: none">
<h5>Split</h5> <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-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()" <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> style="display: none">Stay</button>
</div> </div>
{% endblock %} {% endblock %}
{% block leaders %} {% block leaders %}
Blackjack Blackjack
{% endblock %} {% endblock %}
{% block feed %} {% block feed %}
Blackjack Blackjack
{% endblock %} {% endblock %}

View File

@ -1,108 +1,108 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}{{game.capitalize()}}{% endblock %} {% block pagetitle %}{{game.capitalize()}}{% endblock %}
{% block content %} {% block content %}
<link rel="stylesheet" href="{{('css/casino/game_screen.css') | asset}}"> <link rel="stylesheet" href="{{('css/casino/game_screen.css') | asset}}">
<script defer src="{{'js/casino/game_screen.js' | asset}}"></script> <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 id="casino-game-wrapper" data-game="{{game}}" class="container-fluid" style="max-width: 500px">
<div class="row row-cols-1"> <div class="row row-cols-1">
<div class="col game_screen-title"> <div class="col game_screen-title">
<h3>{{game}}</h3> <h3>{{game}}</h3>
<hr> <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> </div>
</div> <div class="col">
<div class="col"> {% set stats_alert_class = 'success' if v_stats[0] >= v_stats[2] else 'danger' %}
<div id="casinoGameResult" class="alert"> <div id="casinoGameStats" class="alert alert-{{stats_alert_class}}">
{%- block result -%}{%- endblock -%} {{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>
<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>
<div class="col"> </div>
<div class="game_screen-title"> <div class="col">
<h5>Currency</h5> <div id="casinoGameResult" class="alert">
<hr> {%- 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>
<div class="btn-group"> <div class="col">
<span class="unbreakable mr-3"> <div class="game_screen-title">
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerCoins" <h5>Currency</h5>
value="coin" checked> <hr>
<label for="wagerCoins" class="btn btn-primary border-0 px-0"> </div>
<img id="wagerCoinsImg" loading="lazy" src="{{SITE_FULL_IMAGES}}/i/rDrama/coins.webp?x=6" alt="coin" data-bs-toggle="tooltip" <div class="btn-group">
data-bs-placement="bottom" title="Coin"> <span class="unbreakable mr-3">
</label> <input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerCoins"
<span id="user-coins-amount-casino">{{v.coins}}</span> value="coin" checked>
</span> <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"> <span class="unbreakable">
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerMarseybux" <input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerMarseybux"
value="marseybux"> value="marseybux">
<label for="wagerMarseybux" class="btn btn-primary border-0 px-0"> <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" <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"> data-bs-placement="bottom" title="Marseybux">
</label> </label>
<span id="user-bux-amount-casino">{{v.marseybux}}</span> <span id="user-bux-amount-casino">{{v.marseybux}}</span>
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> <div class="col">
<div class="col"> <div class="game_screen-title">
<div class="game_screen-title"> <h5>{% block actiontext %}Actions{% endblock %}</h5>
<h5>{% block actiontext %}Actions{% endblock %}</h5> <hr>
<hr> </div>
</div> {% block actions %} {% endblock %}
{% block actions %} {% endblock %} </div>
</div> <div id="casinoGameFeed" data-feed="{{feed}}" class="col">
<div id="casinoGameFeed" data-feed="{{feed}}" class="col"> <div class="game_screen-title">
<div class="game_screen-title"> <h5>Feed</h5>
<h5>Feed</h5> <hr>
<hr> </div>
</div> <ul id="casinoGameFeedList"></ul>
<ul id="casinoGameFeedList"></ul> <button type="button" class="btn btn-secondary" style="width: 100%" data-nonce="{{g.nonce}}" data-onclick="reloadFeed()">
<button type="button" class="btn btn-secondary" style="width: 100%" data-nonce="{{g.nonce}}" data-onclick="reloadFeed()"> Reload Feed
Reload Feed </button>
</button> </div>
</div> <div class="col">
<div class="col"> <div class="game_screen-title">
<div class="game_screen-title"> <h5>Leaders</h5>
<h5>Leaders</h5> <hr>
<hr> </div>
</div> <div id="gameLeaderboard" data-leaderboard="{{leaderboard}}">
<div id="gameLeaderboard" data-leaderboard="{{leaderboard}}"> {%- macro leaderboard(text, css_class, marsey, color) -%}
{%- macro leaderboard(text, css_class, marsey, color) -%} <div class="casino-game-leaderboard">
<div class="casino-game-leaderboard"> <div class="leaderboard-marsey-trophy">
<div class="leaderboard-marsey-trophy"> <img loading="lazy" class="leaderboard-marsey-trophy__marsey" src="{{SITE_FULL_IMAGES}}/e/{{marsey}}.webp">
<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>
<i class="fas fa-trophy leaderboard-marsey-trophy__trophy" style="color: {{color}}"></i> </div>
</div> <div class="casino-game-leaderboard-info">
<div class="casino-game-leaderboard-info"> <small>{{text}}</small>
<small>{{text}}</small> <h3 id="{{css_class}}">-</h3>
<h3 id="{{css_class}}">-</h3> </div>
</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> </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>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -2,13 +2,13 @@
{% block pagetitle %}You're in rehab!{% endblock %} {% block pagetitle %}You're in rehab!{% endblock %}
{% block pagetype %}casino-in-rehab{% endblock %} {% block pagetype %}casino-in-rehab{% endblock %}
{% block content %} {% block content %}
<div style="text-transform: uppercase; letter-spacing: 2px; display: flex; flex-direction: column; align-items: center"> <div style="text-transform: uppercase; letter-spacing: 2px; display: flex; flex-direction: column; align-items: center">
<div style="margin-top: 3rem"> <div style="margin-top: 3rem">
<h2>No one was there for Britney…</h2> <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>
<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 %} {% endblock %}

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -1,146 +1,143 @@
{%- extends 'root.html' -%} {%- extends 'root.html' -%}
{% block body_attributes %}id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" class="has_header"{% endblock %} {% block body_attributes %}id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" class="has_header"{% endblock %}
{% block body %} {% block body %}
{% block pulltorefresh %} {% block pulltorefresh %}
<div id="pulltorefresh"> <div id="pulltorefresh">
<img id="pulltorefresh-img" src="{{SITE_FULL_IMAGES}}/e/marseyunamused.webp"> <img id="pulltorefresh-img" src="{{SITE_FULL_IMAGES}}/e/marseyunamused.webp">
</div> </div>
{% endblock %} {% endblock %}
{% block banner %} {% block banner %}
{% include "modals/expanded_image.html" %} {% include "modals/expanded_image.html" %}
{% if err or '@' not in request.path %} {% if err or '@' not in request.path %}
{% if IS_FISTMAS() and not (hole and hole.has_banners) %} {% if IS_FISTMAS() and not (hole and hole.has_banners) %}
{% include 'events/fistmas/banner.html' %} {% include 'events/fistmas/banner.html' %}
{% elif IS_HOMOWEEN() and not (hole and hole.has_banners) %} {% elif IS_HOMOWEEN() and not (hole and hole.has_banners) %}
{% include 'events/homoween/banner.html' %} {% include 'events/homoween/banner.html' %}
{% else %} {% else %}
{% set path = "files/assets/images/" ~ SITE_NAME %} {% set path = "files/assets/images/" ~ SITE_NAME %}
{% if err and SITE_NAME == 'rDrama' %} {% if err and SITE_NAME == 'rDrama' %}
{% set src = "banner_error.webp" | asset_siteimg %} {% set src = "banner_error.webp" | asset_siteimg %}
{% elif hole and hole.has_banners %} {% elif hole and hole.has_banners %}
{% set src = hole.random_banner() %} {% set src = hole.random_banner() %}
{% set alt = ['/h/', hole, ' banner']|join %} {% set alt = ['/h/', hole, ' banner']|join %}
{% set class = 'site-banner-hole' %} {% set class = 'site-banner-hole' %}
{% elif get_running_orgy(v) and os_path.exists(path ~ "/orgy_banners") %} {% elif get_running_orgy(v) and os_path.exists(path ~ "/orgy_banners") %}
{% set src = macros.random_image("assets/images/" ~ SITE_NAME ~ "/orgy_banners") %} {% set src = macros.random_image("assets/images/" ~ SITE_NAME ~ "/orgy_banners") %}
{% set href = "/chat" %} {% 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 %}
{% set expand = false %} {% set expand = false %}
{% else %} {% elif IS_DKD() or IS_BIRTHGAY() or IS_BIRTHDEAD() %}
{% set href = "/" %} {% 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 %} {% set expand = false %}
{% endif %} {% endif %}
{% endif %}
<a id="banner-link" href="{{href|default(src)}}" rel="nofollow noopener"> {% if SITE_NAME == "WPD" %}
{% if src %} {% if hole %}
{% set banner_url = src %} {% set href = "/h/" ~ hole %}
{% else %} {% set expand = false %}
{%- if not v and os_path.exists(path ~ "/cached.webp") -%} {% else %}
{% set banner_url = 'cached.webp' | asset_siteimg %} {% set href = "/" %}
{%- elif SITE_NAME == 'rDrama' and v and v.chud %} {% set expand = false %}
{% set banner_url = '/banners/18.webp' | asset_siteimg %} {% endif %}
{%- 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 %} {% endif %}
{% macro img_element() %} <a id="banner-link" href="{{href|default(src)}}" rel="nofollow noopener">
<img data-nonce="{{g.nonce}}" data-onclick="{{expand|default('expandImage()')}}" class="{{class|default('site-banner')}}" alt="{{alt|default('site banner')}}" src="{{banner_url}}"> {% if src %}
{% endmacro %} {% 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 %} {% macro img_element() %}
{{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}}">
{% else %} {% endmacro %}
<div class="banner-wrapper">
<div style="padding: 0 0 12.2%"> {% if hole and hole.has_banners %}
<div> {{img_element()}}
{{img_element()}} {% else %}
<div class="banner-wrapper">
<div style="padding: 0 0 12.2%">
<div>
{{img_element()}}
</div>
</div> </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> </div>
{% endif %} {% 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 %}
{% endif %} {% endif %}
{% endblock %}
{% include "header.html" %} {% if IS_EVENT() %}
{% include "events/shared/music.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>
{% endif %} {% 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 %} {% endblock %}

View File

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

View File

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

View File

@ -36,32 +36,32 @@
</thead> </thead>
<tbody id="emojis-table"> <tbody id="emojis-table">
{% for emoji in emojis %} {% for emoji in emojis %}
<tr> <tr>
<td>{{loop.index}}</td> <td>{{loop.index}}</td>
<td>{{emoji.name}}</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><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>{{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'] %}
<td> <td>
{% if emoji.og %} {% if emoji.author_id == 2 %}
<a href="{{SITE_FULL_IMAGES}}/asset_submissions/emojis/original/{{emoji.og}}">{{emoji.og}}</a> {% if SITE == 'rdrama.net' %}
a WPD user
{% else %}
an rDrama user
{% endif %}
{% else %}
{% set user = emoji.user %}
{% include "user_in_table.html" %}
{% endif %} {% endif %}
</td> </td>
{% endif %} <td data-sort-key="{{emoji.created_utc}}" {% if emoji.created_utc %}data-time="{{emoji.created_utc}}"{% endif %}></td>
</tr> {% 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 %} {% endfor %}
</tbody> </tbody>
</table> </table>

View File

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

View File

@ -2,21 +2,21 @@
{% block pagetitle %}NSFW{% endblock %} {% block pagetitle %}NSFW{% endblock %}
{% block pagetype %}error-451{% endblock %} {% block pagetype %}error-451{% endblock %}
{% block content %} {% block content %}
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col col-md-5"> <div class="col col-md-5">
<div class="text-center px-3 mt-3"> <div class="text-center px-3 mt-3">
<img alt=":#marseytwerking:" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseytwerking.webp"> <img alt=":#marseytwerking:" loading="lazy" src="{{SITE_FULL_IMAGES}}/e/marseytwerking.webp">
<h5>NSFW Warning</h5> <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> <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"> <div class="btn-toolbar justify-content-center mb-4">
<form action="/allow_nsfw" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)"> <form action="/allow_nsfw" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input hidden name="redir" value="{{request.full_path}}"> <input hidden name="redir" value="{{request.full_path}}">
<input type="submit" class="btn btn-danger" value="Yes"> <input type="submit" class="btn btn-danger" value="Yes">
</form> </form>
<div class="mt-3"><a href="/" class="btn btn-secondary">No</a></div> <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="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>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,472 +1,472 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}Formatting{% endblock %} {% block pagetitle %}Formatting{% endblock %}
{% block content %} {% 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"> <div class="overflow-x-auto mt-3">
<table id="formatting-table" class="table table-striped generate-copy-buttons"> <table id="formatting-table" class="table table-striped generate-copy-buttons">
<thead class="bg-primary text-white"> <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'] -%}
<tr> <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"> <span style="font-style: italic; font-weight: normal">
* Minimum 100 coins. * will embed automatically if from <a href="#approved">approved hosts</a>.
</span> </span>
</td> </td>
<td>!slots 100</td> <td>https://i.imgur.com/SwVuagI.png</td>
<td>???</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>
<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"> <span style="font-style: italic; font-weight: normal">
* Minimum 100 marseybux. * will embed automatically if from <a href="#approved">approved hosts</a>.
</span> </span>
</td> </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> <td>???</td>
</tr> </tr>
<tr> <tr>
<td>Random Fortune</td> <td>Random Platy Emoji</td>
<td>#fortune</td> <td>:platyrandom:</td>
<td>???</td> <td>???</td>
</tr> </tr>
<tr> <tr>
<td>Random 8-Ball Answer</td> <td>Random Wolf Emoji</td>
<td>#8ball</td> <td>:wolfrandom:</td>
<td>???</td> <td>???</td>
</tr> </tr>
<tr> <tr>
<td>Random Factcheck</td> <td>Random Donkey Kong Emoji</td>
<td>#factcheck</td> <td>:donkeykongrandom:</td>
<td>???</td> <td>???</td>
</tr> </tr>
<tr> <tr>
<td>Roll</td> <td>Random Tay Emoji</td>
<td>#roll</td> <td>:tayrandom:</td>
<td>A number 1&ndash;9999.</td> <td>???</td>
</tr> </tr>
<tr> <tr>
<td>Coinflip</td> <td>Random Capy Emoji</td>
<td>#coinflip</td> <td>:capyrandom:</td>
<td>Heads, Tails, or Edge.</td> <td>???</td>
</tr> </tr>
{%- endif %} <tr>
</tbody> <td>Random Carp Emoji</td>
</table> <td>:carprandom:</td>
</div> <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> <ul>
{% for tag in allowed_tags %} {% for tag in allowed_tags %}
<li>{{tag}}</li> <li>{{tag}}</li>
{% endfor %} {% endfor %}
</ul> </ul>
<h5 class="mt-4">Allowed Styles</h5> <h5 class="mt-4">Allowed Styles</h5>
<ul> <ul>
{% for style in allowed_styles %} {% for style in allowed_styles %}
<li>{{style}}</li> <li>{{style}}</li>
{% endfor %} {% endfor %}
</ul> </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"> <ul class="mt-3">
{% for host in approved_embed_hosts %} {% for host in approved_embed_hosts %}
<li>{{host}}</li> <li>{{host}}</li>
{% endfor %} {% endfor %}
</ul> </ul>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000"> <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"> <div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Text copied to clipboard <i class="fas fa-check-circle text-success mr-2"></i>Text copied to clipboard
</div> </div>
</div> </div>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script> <script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
<script defer src="{{'js/formatting.js' | asset}}"></script> <script defer src="{{'js/formatting.js' | asset}}"></script>
{% endblock %} {% endblock %}

View File

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

View File

@ -1,96 +1,94 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}!{{group}}{% endblock %} {% block pagetitle %}!{{group}}{% endblock %}
{% block content %} {% 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="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>
<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')"> {% endif %}
{%- 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> <br>
{% endif %} {% macro process_memberships(memberships, name) %}
<h5 class="my-3">!{{group}} {{name}}</h5>
<br> <div class="overflow-x-auto mt-1">
{% macro process_memberships(memberships, name) %} <table class="table table-striped mb-5 ping-groups">
<h5 class="my-3">!{{group}} {{name}}</h5> <thead class="bg-primary text-white">
<tr>
<div class="overflow-x-auto mt-1"> <th>#</th>
<table class="table table-striped mb-5 ping-groups"> <th>Name</th>
<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>
{% if name == 'members' %} {% if name == 'members' %}
<td id="time-{{membership.user_id}}" data-time="{{membership.approved_utc}}"></td> <th>Approved on</th>
{% else %} {% else %}
<td id="time-{{membership.user_id}}" data-time="{{membership.created_utc}}"></td> <th>Applied on</th>
{% endif %} {% endif %}
{% if v.mods_group(group) %} {% if v.mods_group(group) %}
<td> <th class="disable-sort-click"></th>
{% 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 %} {% endif %}
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody id="{{name}}_tbody">
</table> {% for membership in memberships %}
</div> <tr id="{{membership.user_id}}">
{% endmacro %} <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) %} {% if name == 'members' %}
{{process_memberships(applications, 'applications')}} <td id="time-{{membership.user_id}}" data-time="{{membership.approved_utc}}"></td>
{{process_memberships(members, 'members')}} {% else %}
<script defer src="{{'js/group_members_owner.js' | asset}}"></script> <td id="time-{{membership.user_id}}" data-time="{{membership.created_utc}}"></td>
{% else %} {% endif %}
{{process_memberships(members, 'members')}}
{{process_memberships(applications, 'applications')}}
{% 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 %} {% endblock %}

View File

@ -1,66 +1,65 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}Ping Groups{% endblock %} {% block pagetitle %}Ping Groups{% endblock %}
{% block content %} {% block content %}
<div class="px-3"> <div class="px-3">
<h3 class="mt-3">Create Ping Group</h3> <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)"> <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="container pb-0" style="background-color: transparent !important">
<div class="row"> <div class="row">
<div class="col col-md-6 px-0 py-3 py-md-0"> <div class="col col-md-6 px-0 py-3 py-md-0">
<div class="body"> <div class="body">
<input hidden name="formkey" value="{{v|formkey}}"> <input hidden name="formkey" value="{{v|formkey}}">
<label for="title">Group Name</label> <label for="title">Group Name</label>
<input minlength="3" maxlength="25" pattern='[a-zA-Z0-9_\-]*' class="form-control" type="text" name="name" required> <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> <small class="form-text text-muted">3-25 characters, including letters, numbers, _ , and -</small>
<div class="footer"> <div class="footer">
<div class="d-flex"> <div class="d-flex">
<button type="submit" class="btn btn-primary ml-auto" {% if v.marseybux + v.coins < cost %}disabled{% endif %}>Create Group</button> <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> </div>
<p class="mt-2 mr-1" style="float: right"><b>Cost</b>: {{cost}} coins or marseybux</p>
</div> </div>
</div> </div>
</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> </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>
</div>
{% endblock %} {% endblock %}

View File

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

View File

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

View File

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

View File

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

View File

@ -1,37 +1,34 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}Hole List{% endblock %} {% block pagetitle %}Hole List{% endblock %}
{% block content %} {% block content %}
<h5 class="mt-3 mb-1">Hole List</h5> <h5 class="mt-3 mb-1">Hole List</h5>
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="table table-striped mb-5"> <table class="table table-striped mb-5">
<thead class="bg-primary text-white"> <thead class="bg-primary text-white">
<tr> <tr>
<th>#</th> <th>#</th>
<th>Name</th> <th>Name</th>
<th>Posts</th> <th>Posts</th>
<th>Followers</th> <th>Followers</th>
<th>Blockers</th> <th>Blockers</th>
<th>Created on</th> <th>Created on</th>
</tr> </tr>
</thead> </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>
{% 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 %} {% endblock %}

View File

@ -1,44 +1,42 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}/h/{{hole}} Mods{% endblock %} {% block pagetitle %}/h/{{hole}} Mods{% endblock %}
{% block content %} {% 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> </table>
<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 %}
{% 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 %} {% endblock %}

View File

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

View File

@ -1,4 +1,5 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block title %} {% block title %}
{% if hole %} {% if hole %}
<title>/h/{{hole.name}}</title> <title>/h/{{hole.name}}</title>
@ -12,119 +13,119 @@
{{super()}} {{super()}}
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block pagetitle %}{{SITE_NAME if not hole else '/h/' ~ hole.name}}{% endblock %} {% block pagetitle %}{{SITE_NAME if not hole else '/h/' ~ hole.name}}{% endblock %}
{% block head_final %} {% block head_final %}
{% set preview = hole.siderbarurl if hole and hole.sidebarurl else hole.bannerurl %} {% 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}}">
<meta name="twitter:card" content="summary_large_image"> {% if hole %}
<meta name="twitter:site" content="{{SITE_FULL}}"> <meta property="og:type" content="article">
<meta name="twitter:title" content="/h/{{hole.name}}"> <meta property="og:title" content="/h/{{hole}}">
<meta name="twitter:creator" content="{{SITE_FULL}}"> <meta property="og:site_name" content="{{SITE}}">
<meta name="twitter:image" content="{{preview}}"> <meta property="og:image" content="{{preview}}">
<meta name="twitter:url" content="{{request.full_path}}"> <meta property="og:url" content="{{request.full_path}}">
{% endif %} <meta property="og:author" name="author" content="{{SITE_FULL}}">
{% if hole.sidebar %}
<meta property="og:description" name="description" content="{{hole.sidebar}}"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:description" content="{{hole.sidebar}}"> <meta name="twitter:site" content="{{SITE_FULL}}">
{% endif %} <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 %} {% endblock %}
{% block desktopBanner %} {% block desktopBanner %}
{%- set search_placeholder = "Search" -%} {%- set search_placeholder = "Search" -%}
{%- if hole -%} {%- if hole -%}
{%- set search_placeholder = "Search (try 'hole:" ~ hole.name ~ "')" -%} {%- set search_placeholder = "Search (try 'hole:" ~ hole.name ~ "')" -%}
{%- endif -%} {%- endif -%}
<div class="row" style="overflow: visible;padding-top:5px"> <div class="row" style="overflow: visible;padding-top:5px">
<div class="col"> <div class="col">
<form id="searchform" class="form-inline d-md-none search flex-nowrap mt-2" action="/search/posts" method="get"> <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"> <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-append">
<span class="input-group-text border-0 bg-transparent" style="margin-left: -2.5rem" data-nonce="{{g.nonce}}" onclick_submit> <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> <i class="fa fa-search"></i>
</span>
</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 hole %}
{% if v %} {% if v %}
{% if hole.stealth %} {% 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="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> <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 %} {% 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> <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>
<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-bell mr-2"></i>Follow /h/{{hole.name}}</a>
{% endif %} {% 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 %}
{% 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 %} {% block navbar %}
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
{% set pcolor = "primary" if pins else "secondary" %} {% set pcolor = "primary" if pins else "secondary" %}
<form action="/toggle_pins/{{hole}}/{{sort}}" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)"> <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> <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> </form>
{%- import 'util/macros.html' as macros with context -%} {%- import 'util/macros.html' as macros with context -%}
{{- macros.time_filter_buttons() -}} {{- macros.time_filter_buttons() -}}
{{- macros.sorting_buttons(POST_SORTS, True) -}} {{- macros.sorting_buttons(POST_SORTS, True) -}}
</div> </div>
{% endblock %} {% endblock %}
</div>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}
{% block PseudoSubmitForm %}{% endblock %} {% block PseudoSubmitForm %}{% endblock %}
{% block content %} {% block content %}
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %}">
<div class="row no-gutters {% if listing %}mt-md-3{% elif not listing %}my-md-3{% endif %}"> <div class="col-12">
<div class="col-12"> <div class="posts">
<div class="posts"> {% include "post_listing.html" %}
{% include "post_listing.html" %} </div>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}
{% block pagenav %} {% block pagenav %}
{% if listing %} {% if listing %}
{% include "pagination.html" %} {% include "pagination.html" %}
{% endif %} {% endif %}
{% if request.path == '/' and v %} {% if request.path == '/' and v %}
<script defer src="{{'js/register_service_worker.js' | asset}}"></script> <script defer src="{{'js/register_service_worker.js' | asset}}"></script>
{% endif %} {% endif %}
{% if request.path == '/' and g.browser != 'webview' and time.time() > session.get('tooltip_dismissed',0)+86400*30 %} {% 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-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 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> </div>
<script defer src="{{'js/mobile_prompt.js' | asset}}"></script> <script defer src="{{'js/mobile_prompt.js' | asset}}"></script>
{% endif %} {% endif %}
{% if FP and request.path == '/' and v and not v.fp %}
<script defer src="{{'js/fp.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 %} {% endblock %}

View File

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

View File

@ -24,30 +24,30 @@
{% endmacro %} {% endmacro %}
{% macro leaderboard_table(lb) %} {% 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> <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"> <div class="overflow-x-auto">
<table class="table table-striped mb-5"> <table class="table table-striped mb-5">
<thead class="bg-primary text-white"> <thead class="bg-primary text-white">
<tr> <tr>
<th>#</th> <th>#</th>
<th>Name</th> <th>Name</th>
<th>{{lb.table_column_name}}</th> <th>{{lb.table_column_name}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for user in lb.all_users %} {% for user in lb.all_users %}
{% set user2 = lb.user_func(user) %} {% set user2 = lb.user_func(user) %}
{% if v.id == user2.id %} {% if v.id == user2.id %}
{% set style="class=\"self\"" %} {% 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 %} {% endif %}
{{format_user_in_table(user2, style, loop.index, lb.value_func(user), lb.user_relative_url)}} </tbody>
{% endfor %} </table>
{% if lb.v_position and not lb.v_appears_in_ranking %} </div>
{{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>
{% endmacro %} {% endmacro %}
{% for lb in leaderboards %} {% for lb in leaderboards %}

View File

@ -1,92 +1,92 @@
{% extends "settings2.html" %} {% extends "settings2.html" %}
{% block pagetitle %}Moderation Log{% endblock %} {% block pagetitle %}Moderation Log{% endblock %}
{% block content %} {% block content %}
<div class="row justify-content-around"> <div class="row justify-content-around">
<div class="col h-100"> <div class="col h-100">
<div class="justify-content-between"> <div class="justify-content-between">
<div> <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> <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> </div>
</div> </div>
</div>
<div class="rounded border mx-auto"> <div class="row" style="overflow: visible;padding-top:5px">
{% for ma in actions %} <div class="col">
<div id="action-{{ma.id}}" class="modlog-action{% if ma.unread %} unread{% endif %}"> <div class="d-flex justify-content-between align-items-center">
<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> {% block navbar %}
<div class="d-flex align-items-center"> <div class="d-flex align-items-center mb-3 ml-auto">
<span class="rounded"> <div class="dropdown dropdown-actions">
<div class="profile-pic-35-wrapper">
<img loading="lazy" src="{{ma.user.profile_url}}" alt="avatar" class="profile-pic-35"> <button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuButton" data-bs-toggle="dropdown">
{% if ma.user.hat_active(v)[0] -%} {% 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 %}
<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]}}"> </button>
{%- endif %} <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> </div>
</span> {% endblock %}
<div class="text-muted pl-3"> </div>
<div> </div>
<a href="{{ma.user.url}}" class="font-weight-bold text-black" target="_self">@{{ma.user.username}}</a> </div>
<span>{{ma.string | safe}}</span>
</div> <div class="rounded border mx-auto">
<div class="text-gray-500"> {% for ma in actions %}
<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> <div id="action-{{ma.id}}" class="modlog-action{% if ma.unread %} unread{% endif %}">
<a href="{{ma.permalink}}"><i class="fas fa-link ml-3 text-muted"></i></a> <div class="d-flex flex-grow-1 align-items-center">
<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 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>
</div> </div>
</div> </div>
{% else %}
<div class="p-3">There's nothing here right now.</div>
{% endfor %}
</div> </div>
{% else %} {% include "pagination.html" %}
<div class="p-3">There's nothing here right now.</div>
{% endfor %}
</div> </div>
{% include "pagination.html" %}
</div> </div>
</div>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000"> <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"> <div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard <i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
</div>
</div> </div>
</div> <script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
{% endblock %} {% endblock %}

View File

@ -3,13 +3,13 @@
{% block authtitle %}Reset your password.{% endblock %} {% 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 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 %} {% block content %}
<div id="login-form"> <div id="login-form">
<form action="/forgot" method="post" class="mt-3"> <form action="/forgot" method="post" class="mt-3">
<label for="username" class="mt-3">Username</label> <label for="username" class="mt-3">Username</label>
<input autocomplete="off" class="form-control" id="username" type="text" name="username" required> <input autocomplete="off" class="form-control" id="username" type="text" name="username" required>
<label for="email" class="mt-3">Email</label> <label for="email" class="mt-3">Email</label>
<input type="email" autocomplete="off" class="form-control" id="password" name="email" required> <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"> <input autocomplete="off" class="btn btn-primary login w-100 mt-3" type="submit" value="Send recovery link">
</form> </form>
</div> </div>
{% endblock %} {% endblock %}

View File

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

View File

@ -6,20 +6,20 @@
{% set root_scope.include_cf_2fa_verify = false %} {% set root_scope.include_cf_2fa_verify = false %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="login-form"> <div id="login-form">
<h2>Two-step login</h2> <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> <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 %} {% if failed %}{{macros.alert('Invalid verification code. Please try again.', true)}}{% endif %}
</div> </div>
<form action="/login" method="post" class="mt-md-3" id="login"> <form action="/login" method="post" class="mt-md-3" id="login">
<input hidden name="username" value="{{v.username}}"> <input hidden name="username" value="{{v.username}}">
<input hidden name="redirect" value="{{redirect}}"> <input hidden name="redirect" value="{{redirect}}">
<input hidden name="time" value="{{time}}"> <input hidden name="time" value="{{time}}">
<input hidden name="hash" value="{{hash}}"> <input hidden name="hash" value="{{hash}}">
<label for="2fa_token" class="mt-3">Your verification code</label> <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"> <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> <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> <button type="submit" class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
</form> </form>
<script defer src="{{'js/login_2fa.js' | asset}}"></script> <script defer src="{{'js/login_2fa.js' | asset}}"></script>
{% endblock %} {% endblock %}

View File

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

View File

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

View File

@ -1,7 +1,8 @@
{%- extends 'login/authforms.html' -%} {%- extends 'login/authforms.html' -%}
{% block pagetitle -%} {% 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 %} {%- endblock %}
{% block pagetype %}login{% endblock %} {% block pagetype %}login{% endblock %}
{% block template_config %} {% block template_config %}
@ -27,98 +28,99 @@
{% endif %} {% endif %}
{% block content %} {% block content %}
<div id="register-form"> <div id="register-form">
{% if not ref_user and SITE_NAME == 'rDrama' and login_required %} {% 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> <img loading="lazy" id="logo" alt="logo" src="{{'logo.webp' | asset_siteimg}}" width=70>
<hr> <hr>
<p class="text-muted text-justify mb-3" style="line-height: 1.2em"> <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: 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> </p>
<ol style="padding-left: 1.5em"> <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>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>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> <li>Someone clicked the toggle by mistake lol oops sorry!</li>
</ol> </ol>
<p class="text-muted text-justify mb-1" style="line-height: 1.2em"> <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> 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! Remember to click “Follow” on my profile!
</p> </p>
<p class="text-muted mb-md-2"> <p class="text-muted mb-md-2">
I love you.<br> I love you.<br>
<em>xoxo carp</em> 💋 <em>xoxo carp</em> 💋
</p> </p>
<hr> <hr>
{% elif not ref_user and SITE_NAME == 'WPD' and login_required %} {% 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> <img loading="lazy" id="logo" alt="logo" src="{{'logo.webp' | asset_siteimg}}" width=70>
<hr> <hr>
<p class="text-muted text-justify mb-1" style="line-height: 1.2em"> <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> <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>
<p class="text-muted mb-md-2"> <p class="text-muted mb-md-2">
We WANT you with us &#128150;<br> We WANT you with us &#128150;<br>
Please join! Please join!
</p> </p>
<hr> <hr>
{% endif %} {% endif %}
<form action="/signup" method="post" class="mt-md-3" id="signup"> <form action="/signup" method="post" class="mt-md-3" id="signup">
<input hidden name="formkey" value="{{formkey}}"> <input hidden name="formkey" value="{{formkey}}">
<input hidden name="now" value="{{now}}"> <input hidden name="now" value="{{now}}">
{% if redirect %}<input hidden name="redirect" value="{{redirect}}">{% endif %} {% if redirect %}<input hidden name="redirect" value="{{redirect}}">{% endif %}
{% if ref_user %}<input hidden name="referred_by" value="{{ref_user.id}}">{% 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 %}> <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> <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> <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="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 id="passwordHelpSuccess" class="form-text font-weight-bold text-success d-none mt-1">Your password meets the requirements.
</small> </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> <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"> <div class="custom-control custom-checkbox mt-4">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="termsCheck" required> <input autocomplete="off" type="checkbox" class="custom-control-input" id="termsCheck" required>
<label class="custom-control-label terms" for="termsCheck"> <label class="custom-control-label terms" for="termsCheck">
{%- if SITE_NAME == 'rDrama' -%} {%- if SITE_NAME == 'rDrama' -%}
I swear lifelong allegiance to the state of Israel. I swear lifelong allegiance to the state of Israel.
{%- else -%} {%- else -%}
I accept the <a href="/sidebar">rules</a> and I'm 18 or older. I accept the <a href="/sidebar">rules</a> and I'm 18 or older.
{%- endif -%} {%- endif -%}
</label> </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> </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 %} {% endblock %}
{% block scripts %} {% block scripts %}
<script defer src="{{'js/signup.js' | asset}}"></script> <script defer src="{{'js/signup.js' | asset}}"></script>
{% if turnstile != DEFAULT_CONFIG_VALUE %} {% if turnstile != DEFAULT_CONFIG_VALUE %}
<script defer src="https://challenges.cloudflare.com/turnstile/v0/api.js"></script> <script defer src="https://challenges.cloudflare.com/turnstile/v0/api.js"></script>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

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

View File

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

View File

@ -3,19 +3,19 @@
{% block pagetype %}message{% endblock %} {% block pagetype %}message{% endblock %}
{% block customPadding %}{% endblock %} {% block customPadding %}{% endblock %}
{% block content %} {% block content %}
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-10 col-md-5"> <div class="col-10 col-md-5">
<div class="text-center py-6 py-md-8"> <div class="text-center py-6 py-md-8">
<span class="fa-stack fa-2x text-muted mb-4"> <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 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> <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>
<h5>{{title}}</h1> <h5>{{title}}</h1>
<div class="text-small text-muted mb-3">{{message if message else error}}</div> <div class="text-small text-muted mb-3">{{message if message else error}}</div>
<a href="/" class="btn btn-primary ">Go to homepage</a> <a href="/" class="btn btn-primary ">Go to homepage</a>
</div>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

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

View File

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

View File

@ -3,149 +3,143 @@
{% block pagetype %}notifications{% endblock %} {% block pagetype %}notifications{% endblock %}
{% block PseudoSubmitForm %}{% endblock %} {% block PseudoSubmitForm %}{% endblock %}
{% block navbar %} {% block navbar %}
<div class="font-weight-bold py-3"></div> <div class="font-weight-bold py-3"></div>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="row border-bottom w-200 pr-0" style="overflow: visible">
<div class="row border-bottom w-200 pr-0" style="overflow: visible"> <div class="col p-0 w-100">
<div class="col p-0 w-100"> <ul class="nav settings-nav" style="padding:0 0 0 20px" id="notifications--nav-list">
<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 %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/modactions' %} active{% endif %}" href="/notifications/modactions"> <a class="nav-link py-3{% if request.path == '/notifications' or request.path.startswith('/notification/') %} active{% endif %}" href="/notifications">
Modactions {% if v.modaction_notifications_count %}<span class="font-weight-bold" style="color:#1ad80d">({{v.modaction_notifications_count}})</span>{% endif %} All {% if v.normal_notifications_count %}<span class="font-weight-bold" style="color:#dc3545">({{v.normal_notifications_count}})</span>{% endif %}
</a> </a>
</li> </li>
{% endif %}
{% if v.admin_level >= PERMS['VIEW_MODMAIL'] %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/modmail' %} active{% endif %}" href="/notifications/modmail"> <a class="nav-link py-3{% if request.path == '/notifications/messages' %} active{% endif %}" href="/notifications/messages">
Modmail Messages {% if v.message_notifications_count %}<span class="font-weight-bold" style="color:#d8910d">({{v.message_notifications_count}})</span>{% endif %}
</a> </a>
</li> </li>
{% endif %}
{% if v.can_view_offsitementions %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link py-3{% if request.path == '/notifications/reddit' %} active{% endif %}" href="/notifications/reddit"> <a class="nav-link py-3{% if request.path == '/notifications/posts' %} active{% endif %}" href="/notifications/posts">
Reddit {% if v.reddit_notifications_count %}<span class="font-weight-bold" style="color:#805ad5">({{v.reddit_notifications_count}})</span>{% endif %} Posts {% if v.post_notifications_count %}<span class="font-weight-bold" style="color:#0000ff">({{v.post_notifications_count}})</span>{% endif %}
</a> </a>
</li> </li>
{% endif %} {% if v.admin_level >= PERMS['NOTIFICATIONS_MODERATOR_ACTIONS'] or v.moderated_holes %}
</ul> <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>
</div>
{% if request.path.startswith('/notification/') %} {% 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> <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 %} {% 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> <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 %} {% 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' %} <div class="d-flex flex-grow-1 align-items-center">
{% with listing=notifications %} <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="mt-4 posts"> <div class="d-flex align-items-center">
{% include "post_listing.html" %} <span class="rounded">
</div> <div class="profile-pic-35-wrapper">
{% endwith %} <img loading="lazy" src="{{ma.user.profile_url}}" alt="avatar" class="profile-pic-35">
{% elif request.path == '/notifications/modactions' %} {% if ma.user.hat_active(v)[0] -%}
<div class="rounded border mx-auto mt-4"> <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]}}">
{% for ma in notifications %} {%- endif %}
</div>
<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 %}"> </span>
<div class="text-muted pl-3">
<div class="d-flex flex-grow-1 align-items-center"> <div>
<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> {% if ma.hole %}
<div class="d-flex align-items-center"> <a href="/h/{{ma.hole}}">/h/{{ma.hole}}</a>
<span class="rounded"> -
<div class="profile-pic-35-wrapper"> {% endif %}
<img loading="lazy" src="{{ma.user.profile_url}}" alt="avatar" class="profile-pic-35"> <a href="{{ma.user.url}}" class="font-weight-bold text-black" target="_self">@{{ma.user.username}}</a>
{% if ma.user.hat_active(v)[0] -%} <span>{{ma.string | safe}}</span>
<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]}}"> </div>
{%- endif %} <div class="text-gray-500">
</div> <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>
</span> <a href="{{ma.permalink}}"><i class="fas fa-link ml-3 text-muted"></i></a>
<div class="text-muted pl-3"> <button type="button" class="copy-link ml-3" data-clipboard-text="{{ma.permalink}}"><i class="fas fa-copy text-muted"></i></button>
<div> </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> </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> </div>
<script defer src="{{'js/vendor/clipboard.js' | asset}}"></script>
{% else %}
{% with comments=notifications %}
{% include "comments.html" %}
{% endwith %}
{% endif %}
{% else %} {% if not notifications %}
<div class="p-3">There's nothing here right now.</div> <div class="text-center py-6 py-md-8">
{% endfor %} <span class="fa-stack fa-2x text-muted mb-4">
</div> <i class="fas fa-square text-gray-400 fa-stack-2x"></i>
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000"> <i class="fas text-gray-600 fa-envelope fa-stack-1x text-lg"></i>
<div class="toast-body text-center"> </span>
<i class="fas fa-check-circle text-success mr-2"></i>Link copied to clipboard
<h5>No notifications</h5>
</div> </div>
</div> {% endif %}
</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>
{% endblock %} {% endblock %}
{% block pagenav %} {% block pagenav %}
{% if notifications %} {% if notifications %}
{% include "pagination.html" %} {% include "pagination.html" %}
{% endif %} {% endif %}
<link rel="stylesheet" href="{{('css/notifications.css') | asset}}"> <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 %}
{% 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 %} {% endblock %}
{% block GIFpicker %}{% endblock %} {% block GIFpicker %}{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "login.html" %} {% extends "login.html" %}
{% block pagetitle %}Application Request for Access{% endblock %} {% block pagetitle %}Application Request for Access{% endblock %}
{% block content %} {% block content %}
<div id="auth-form"> <div id="auth-form">
<h2>{{application.app_name}}</h2> <h2>{{application.app_name}}</h2>
<p class="mb-md-5">wants to access your @{{v.username}} account.</p> <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> <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}}"> <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> <a href="/" class="btn btn-secondary">No, back to {{SITE_NAME}}</a>
</form> </form>
</div> </div>
{% endblock %} {% endblock %}

View File

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

View File

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

View File

@ -1,10 +1,10 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %} {% block pagetitle %}
{%- if comment_info -%} {%- if comment_info -%}
@{{comment_info.author_name}} comments on '{{p.plaintitle(v)}}' @{{comment_info.author_name}} comments on '{{p.plaintitle(v)}}'
{%- else -%} {%- else -%}
{{p.plaintitle(v)}} {{p.plaintitle(v)}}
{%- endif -%} {%- endif -%}
{% endblock %} {% endblock %}
{% block pagetype %}thread{% endblock %} {% block pagetype %}thread{% endblock %}
@ -36,326 +36,323 @@
{% endif %} {% 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) %} {% 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 %} {% 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 %} {% include "post_actions_mobile.html" %}
<div class="modal fade d-md-none" id="actionsModal" tabindex="-1"> </ul>
<div class="modal-dialog modal-dialog-centered"> </div>
<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>
</div> </div>
</div> </div>
</div> </div>
</div> {% endif %}
{% endif %}
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% include "post_admin_actions_mobile.html" %}
{% endif %}
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% include "post_admin_actions_mobile.html" %}
{% endif %}
{% endblock %} {% endblock %}
{% block content %} {% 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 %}"> {% 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 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-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 id="post-content" class="card-block w-100 my-md-auto">
<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 class="post-meta text-left mb-2">
{{macros.post_meta(p)}}
</div>
<div class="post-meta text-left mb-2"> {{macros.reports(p, 'post')}}
{{macros.post_meta(p)}}
</div>
{{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 %}
<h1 id="post-title" class="{{p.award_classes(v, True)}} card-title post-title text-left mb-md-3"> <a class="no-visited" {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
{% if p.realurl(v) and not v_forbid_deleted %} {% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
<a class="no-visited" {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}"> {{p.realtitle(v) | safe}}
</a>
{% else %}
{% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %} {% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}} {{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 %} {% endif %}
</h1>
{% if p.embed %} {% if not v_forbid_deleted %}
{% if p.domain == "twitter.com" %} <div id="post-body" class="post-body mt-3 {% if p.award_count('tilt', v) %}tilt-post{% endif %}">
{{p.embed | safe}} {% if p.realurl(v) and not p.is_image and not p.is_video and not p.is_audio %}
{% if v and v.theme in LIGHT_THEMES %} <a rel="nofollow noopener" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
<script defer src="{{'js/vendor/twitterlight.js' | asset}}"></script> <div class="d-flex justify-content-between align-items-center border rounded p-2 mb-3">
{% else %} <span>{{p.realurl(v)}}</span>
<script defer src="{{'js/vendor/twitter.js' | asset}}"></script> <i class="fas fa-external-link-alt text-small"></i>
{% endif %} </div>
{% elif p.domain in ['youtu.be','youtube.com'] and p.embed and p.embed.startswith('<lite-youtube') %} </a>
<p class="resizable yt" style="width:100%"> {% endif %}
{% if p.embed %}
{% if p.domain == "twitter.com" %}
{{p.embed | safe}} {{p.embed | safe}}
</p> {% if v and v.theme in LIGHT_THEMES %}
{% else %} <script defer src="{{'js/vendor/twitterlight.js' | asset}}"></script>
<div id="crosspost-embed" class="mb-3"> {% else %}
<div class="row no-gutters"> <script defer src="{{'js/vendor/twitter.js' | asset}}"></script>
<div id="frontpage" class="col-12 pt-0"> {% endif %}
<div class="posts"> {% elif p.domain in ['youtu.be','youtube.com'] and p.embed and p.embed.startswith('<lite-youtube') %}
{{p.embed | post_embed(v) | safe}} <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>
</div> </div>
</div> {% endif %}
{% endif %} {% endif %}
{% endif %}
<div id="post-text" class="{{p.award_classes(v)}}"> <div id="post-text" class="{{p.award_classes(v)}}">
{% if p.is_image %} {% if p.is_image %}
<div class="row no-gutters mb-4"> <div class="row no-gutters mb-4">
<div class="col"> <div class="col">
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}"> <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"> <img data-nonce="{{g.nonce}}" data-onclick="expandImage()" src="{{p.realurl(v)}}" class="post-linked-img" alt="Unable to load image">
</a> </a>
</div>
</div> </div>
</div> {% elif p.is_video %}
{% elif p.is_video %} <div class="row no-gutters mb-4">
<div class="row no-gutters mb-4"> <div class="col">
<div class="col"> <p class="resizable">
<p class="resizable"> <video {% if p.poster_url %}poster="{{p.poster_url}}"{% endif %} controls preload="none" src="{{p.realurl(v)}}"></video>
<video {% if p.poster_url %}poster="{{p.poster_url}}"{% endif %} controls preload="none" src="{{p.realurl(v)}}"></video> </p>
</p> </div>
</div> </div>
</div> {% elif p.is_audio %}
{% elif p.is_audio %} <div class="row no-gutters mb-4">
<div class="row no-gutters mb-4"> <div class="col">
<div class="col"> <audio controls preload="none" src="{{p.realurl(v)}}"></audio>
<audio controls preload="none" src="{{p.realurl(v)}}"></audio> </div>
</div> </div>
</div> {% endif %}
{% endif %} {{p.realbody(v) | safe}}
{{p.realbody(v) | safe}}
{% if p.is_banned %} {% if p.is_banned %}
<div class="text-removed mb-0">Removed by @{{p.ban_reason}} (Site Admin)</div> <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 %} {% endif %}
</div> </div>
{% if not p.ghost %} {% else %}
{{p.author.rendered_sig(v) | safe}} <div id="post-body" class="post-body mt-3">
{% endif %} <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> </div>
{% else %} {% else %}
<div id="post-body" class="post-body mt-3"> <div id="voting" class="voting d-mob-none mb-auto mt-1">
<div id="post-text"><code>[Deleted by author.]</code></div> <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> </div>
{% endif %} {% 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> </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> </div>
</div>
<div class="row mb-3 d-md-none"> <div class="row mb-3 d-md-none">
<div class="col-12"> <div class="col-12">
<div class="post-actions"> <div class="post-actions">
<ul class="list-inline text-right d-flex"> <ul class="list-inline text-right d-flex">
<li class="list-inline-item mr-auto"> <li class="list-inline-item mr-auto">
<a href="{{p.permalink}}"> <a href="{{p.permalink}}">
<i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}} <i class="fas fa-comment-dots mr-2"></i>{{p.comment_count}}
<span class="text-info d-none {{p.id}}-new-comments"></span> <span class="text-info d-none {{p.id}}-new-comments"></span>
</a> </a>
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} {% 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}}"> <button type="button" class="ml-2" data-bs-toggle="modal" data-bs-target="#adminModal-{{p.id}}">
<i class="fas fa-broom"></i> <i class="fas fa-broom"></i>
</button> </button>
{% endif %} {% 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>
</li> </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 %} {% 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> <li class="list-inline-item">
{% else %} <button type="button" data-bs-toggle="modal" data-bs-target="#actionsModal">
<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-ellipsis-h"></i>
<i class="fas fa-arrow-alt-down mx-0"></i> </button>
</a> </li>
{% endif %} {% endif %}
</li> <li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
</ul> {% 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> </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'] %} {% 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> <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>
{% endif %} {% endif %}
{% elif not p.replies and p.deleted_utc == 0 %}
<div class="comment-section no-replies" id="replies-of-{{p.fullname}}"> <div class="row border-md-0 comment-section pb-3">
{% if v %} <div class="col border-top">
{% set ghost_town = 'This comment section is a ghost town...' %} <div class="comments-count py-3">
{% else %} {%- import 'util/macros.html' as macros with context -%}
{% set ghost_town = 'This comment section is a ghost town... <a href="/login?redirect={{request.full_path | urlencode}}">Sign in</a></p> '%} {{- 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 %} {% 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> </div>
{% endif %}
</div>
</div>
{% if v %} {% if v %}
{% if v.id == p.author_id %}{% include "modals/delete_post.html" %}{% endif %} {% if v.id == p.author_id %}{% include "modals/delete_post.html" %}{% endif %}
{% include "modals/report_post.html" %} {% include "modals/report_post.html" %}
{% if v.can_edit(p) %} {% if v.can_edit(p) %}
<script defer src="{{'js/edit_post.js' | asset}}"></script> <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 %} {% 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 %}
{% 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 %} {% 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> <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'] -%} {% 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 %} {%- 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> <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" %} {% extends "post.html" %}
{% set score=p.score %} {% set score=p.score %}
{% if v %} {% if v %}
{% set voted=p.voted %} {% set voted=p.voted %}
{% set adjust=voted %} {% set adjust=voted %}
{% else %} {% else %}
{% set voted=-2 %} {% set voted=-2 %}
{% set adjust=0 %} {% set adjust=0 %}
{% endif %} {% endif %}
{% block title %} {% block title %}
<title>{{p.plaintitle(v)}}</title> <title>{{p.plaintitle(v)}}</title>
{% if p.is_banned %}
{% else %}
{% endif %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="mb-2 p-3"> <div class="mb-2 p-3">
<div class="col-12"> <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 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="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> <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> <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 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> </div>
<span class="post-{{p.id}}-score-up score-up text-muted{% if voted!=1 %} d-none{% endif %}"></span> <div id="voting" class="d-md-block my-auto mr-3 text-center">
<span class="post-{{p.id}}-score-none score text-muted{% if voted!=0 and voted!=-2 %} d-none{% endif %}"></span> <div class="post-{{p.id}}-up arrow-up mx-auto">
<span class="post-{{p.id}}-score-down score-down text-muted{% if voted!=-1 %} d-none{% endif %}"></span> </div>
<div class="post-{{p.id}}-down arrow-down mx-auto"> <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>
</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> </div>
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] and p.body_html %} </div>
<div class="post-body mt-4 mb-2">
{{p.body_html | safe}} <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>
{% 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>
</div>
<div class="comments-count py-3"> <div class="comments-count py-3">
{%- import 'util/macros.html' as macros with context -%} {%- import 'util/macros.html' as macros with context -%}
{{- macros.sorting_buttons(COMMENT_SORTS, True) -}} {{- macros.sorting_buttons(COMMENT_SORTS, True) -}}
</div> </div>
<div class="comment-section"> <div class="comment-section">
{% with comments=p.replies %} {% with comments=p.replies %}
{% include "comments.html" %} {% include "comments.html" %}
{% endwith %} {% endwith %}
</div> </div>
{% if offset %}
<script defer src="{{'js/view_more.js' | asset}}"></script>
{% endif %}
{% if offset %}
<script defer src="{{'js/view_more.js' | asset}}"></script>
{% endif %}
{% endblock %} {% endblock %}
{% block mobileactions %} {% 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'] %} {% 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) %} {% 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 %} {% if v %}
{% set downs=p.downvotes %} {% set voted= p.voted %}
{% set score=ups-downs %} {% else %}
{% set voted=-2 %}
{% endif %}
{% if v %} {% 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 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) %} {{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 {% 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>
<div class="voting my-2 d-none d-md-flex pr-2"> {% else %}
{% if v %} <a tabindex="0" data-nonce="{{g.nonce}}" class="post-{{p.id}}-up mx-auto arrow-up" href="/login?redirect={{request.full_path | urlencode}}"></a>
<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>
<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> <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>
{% 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>
{% endif %} {% endif %}
</li> </div>
{% if p.realbody(v) %} <div class="card-header bg-transparent border-0 d-flex flex-row flex-nowrap pl-2 pl-md-0 p-0 mr-md-2">
<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 %} {% if not v_forbid_deleted %}
<li class="list-inline-item"> <div class="card-thumbnail mt-3">
<button type="button" data-bs-toggle="modal" data-bs-target="#actionsModal-{{p.id}}"> {% if not p.url %}
<i class="fas fa-ellipsis-h"></i> <a {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}">
</button> <img alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</li> </a>
{% endif %} {% elif p.is_image %}
{% if v %} <a href="{{p.realurl(v)}}" rel="nofollow noopener">
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none"> <img data-nonce="{{g.nonce}}" data-onclick="expandImage('{{p.realurl(v)}}')" alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
<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> </a>
{% elif p.is_video or p.is_audio %}
<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> <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">
<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> {% if p.is_video %}
</li> <i class="video-play fas fa-play"></i>
{% else %} {% endif %}
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none"> </a>
<a tabindex="0" class="arrow-{{p.id}}-mobile-up mx-0 pr-1 arrow-mobile-up" href="/login?redirect={{request.full_path | urlencode}}"> {% elif p.is_youtube %}
<i class="fas fa-arrow-alt-up mx-0"></i> <a href="{{p.realurl(v)}}" rel="nofollow noopener">
</a> <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>
<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>
{% else %}
<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}}"> <a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<i class="fas fa-arrow-alt-down mx-0"></i> <img alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a> <i class="ext-link fas fa-external-link"></i>
</li> </a>
{% endif %} {% endif %}
</ul> </div>
</div> {% endif %}
</div> </div>
<div class="card-block text-left x-scroll-parent w-100">
{% if v %} <div class="post-meta text-left x-scroll hide-scrollbar mb-md-2">
<div class="modal fade d-md-none" id="actionsModal-{{p.id}}" tabindex="-1"> {{macros.post_meta(p)}}
<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>
<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> </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> </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 %} {% else %}
<div class="row no-gutters"> <div class="row no-gutters">
<div class="col"> <div class="col">

View File

@ -2,7 +2,7 @@
{% block pagetype %}search{% endblock %} {% block pagetype %}search{% endblock %}
{% block pagetitle %}Search for "{{query}}"{% endblock %} {% block pagetitle %}Search for "{{query}}"{% endblock %}
{% block head_final %} {% 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 %} {% endblock %}
{% block PseudoSubmitForm %} {% block PseudoSubmitForm %}
@ -18,133 +18,133 @@
{% endblock %} {% endblock %}
{% block navbar %}{% endblock %} {% block navbar %}{% endblock %}
{% block content %} {% block content %}
<div class="row no-gutters my-md-3"> <div class="row no-gutters my-md-3">
<div class="col"> <div class="col">
<div class="card search-results"> <div class="card search-results">
<div class="card-header bg-white d-none"> <div class="card-header bg-white d-none">
<ul class="list-inline no-bullets mb-0"> <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 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> <li class="list-inline-item"><i class="fas fa-link text-gray-400"></i></li>
</ul> </ul>
</div> </div>
<div class="card-body pb-2"> <div class="card-body pb-2">
<div> <div>
<div id="searchparams-dropdown" class="dropdown dropdown-actions"> <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> <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 class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px)">
<div> <div>
<div style="display: inline-block; width: 150px; text-align: center">Before Date:</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> <button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">before:2022-12-30</button>
</div> </div>
<div> <div>
<div style="display: inline-block; width: 150px; text-align: center">After Date:</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> <button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">after:2022-12-30</button>
</div> </div>
{% if not request.path.startswith('/search/users') %} {% if not request.path.startswith('/search/users') %}
<div> <div>
<div style="display: inline-block; width: 150px; text-align: center">Author:</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> <button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">author:quadnarca</button>
</div> </div>
{% endif %} {% endif %}
{% if request.path.startswith('/search/messages') %} {% 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') %}
<div> <div>
<div style="display: inline-block; width: 150px; text-align: center">Post ID:</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">post:504</button> <button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">sentto:carpathianflorist</button>
</div> </div>
{% elif request.path.startswith('/search/posts') %} {% elif request.path.startswith('/search/posts') or request.path.startswith('/search/comments') %}
<div> <div>
<div style="display: inline-block; width: 150px; text-align: center">Domain:</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">domain:reddit.com</button> <button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this)" class="searchparam mb-1">hole:music</button>
</div> </div>
<div> {% if request.path.startswith('/search/comments') %}
<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>
<div style="display: inline-block; width: 150px; text-align: center">Subreddit:</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">subreddit:menslib</button> <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> </div>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if FEATURES['NSFW_MARKING'] %} </div>
<div> </div>
<div style="display: inline-block; width: 150px; text-align: center">NSFW Only:</div> <br>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">nsfw:true</button> <script defer src="{{'js/search.js' | asset}}"></script>
</div>
<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 %}
{% endif %} </div>
</div> {% endif %}
</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 %}
</div>
{% endif %}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> <div class="row no-gutters">
<div class="row no-gutters"> <div class="col">
<div class="col"> <div class="flex-row box-shadow-bottom d-flex justify-content-center justify-content-md-between align-items-center">
<div class="flex-row box-shadow-bottom d-flex justify-content-center justify-content-md-between align-items-center"> <ul class="nav settings-nav">
<ul class="nav settings-nav"> <li class="nav-item">
<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>
<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> <li class="nav-item">
<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>
<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> <li class="nav-item">
<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>
<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> <li class="nav-item">
<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>
<a class="nav-link{% if '/messages' in request.path %} active{% endif %}" href="/search/messages/?sort={{sort}}&q={{query | urlencode}}&t={{t}}">Messages</a> </li>
</li> </ul>
</ul> </div>
</div> </div>
</div> </div>
</div> <div class="row no-gutters">
<div class="row no-gutters"> <div class="col-12">
<div class="col-12"> <div class="posts">
<div class="posts"> {% block listing_template %}
{% block listing_template %} {% include "post_listing.html" %}
{% include "post_listing.html" %} {% endblock %}
{% endblock %} </div>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}
{% block pagenav %} {% block pagenav %}
{% include "pagination.html" %} {% include "pagination.html" %}
{% endblock %} {% endblock %}

View File

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

View File

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

View File

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

View File

@ -1,159 +1,159 @@
{% extends "settings.html" %} {% extends "settings.html" %}
{% block pagetitle %}Advanced Settings{% endblock %} {% block pagetitle %}Advanced Settings{% endblock %}
{% block content %} {% block content %}
<div class="row settings-page" id="settings-page-advanced"> <div class="row settings-page" id="settings-page-advanced">
<div class="col col-lg-8"> <div class="col col-lg-8">
<div class="settings"> <div class="settings">
{# toggle_section(title, id, name, flag, below_text) #} {# 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 #} <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> <h5>Poor Mode</h5>
<div class="settings-section rounded"> <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="d-lg-flex border-bottom"> <div class="d-lg-flex border-bottom">
<div class="title w-lg-25"> <div class="title w-lg-25">
<label for="frontsize">Frontpage Size</label> <label for="poor">Poor Mode</label>
</div> </div>
<div class="body w-lg-100"> <div class="body w-lg-100 pt-1 pt-lg-3">
<p>Change how many posts appear on every page.</p> <div class="custom-control custom-switch">
<div class="input-group"> <input autocomplete="off" type="checkbox" class="custom-control-input setting_switch" data-nonce="{{g.nonce}}" id="poor" name="poor"{% if v.poor %} checked{% endif %}>
<select autocomplete="off" id='frontsize' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="frontsize"> <label class="custom-control-label" for="poor"></label>
{% for entry in PAGE_SIZES %} </div>
<option value="{{entry}}"{{' selected' if v.frontsize==entry}}>{{entry}}</option> <span class="text-small text-muted">Makes the site faster for low-end devices:</span>
{% endfor %} <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> </select>
</div>
</div> </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>
<div class="d-lg-flex border-bottom"> <div class="d-lg-flex border-bottom">
<div class="title w-lg-25"> <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>
<div class="body w-lg-100"> <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"> <div class="input-group">
<select autocomplete="off" id='defaultsortingcomments' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaultsortingcomments"> <select autocomplete="off" id='defaulttime' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaulttime">
{% for entry in COMMENT_SORTS.keys() %} {% for entry in TIME_FILTERS.keys() %}
<option value="{{entry}}"{{' selected' if v.defaultsortingcomments==entry}}>{{entry}}</option> <option value="{{entry}}"{{' selected' if v.defaulttime==entry}}>{{entry}}</option>
{% endfor %} {% endfor %}
</select> </select>
</div> </div>
</div> </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="d-lg-flex border-bottom">
<div class="title w-lg-25"> <div class="title w-lg-25">
<label for="defaultsorting">Default Sorting for Posts</label> <label for="reddit">Reddit Domain</label>
</div> </div>
<div class="body w-lg-100"> <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"> <div class="input-group">
<select autocomplete="off" id='defaultsorting' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaultsorting"> <select autocomplete="off" id='reddit' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="reddit">
{% for entry in POST_SORTS.keys() %} {% for entry in ['old.reddit.com', 'reddit.com', 'teddit.net', 'libreddit.hu', 'undelete.pullpush.io'] %}
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry}}>{{entry}}</option> <option value="{{entry}}"{{' selected' if v.reddit==entry}}>{{entry}}</option>
{% endfor %} {% endfor %}
</select> </select>
</div> </div>
</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>
<div class="body w-lg-100"> {{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)}}
<p>Change the default time filter for posts.</p> </div>
<div class="input-group"> </section>
<select autocomplete="off" id='defaulttime' class="form-control setting_select" data-nonce="{{g.nonce}}" form="profile-settings" name="defaulttime"> <section id="site-settings-content-filters" class="settings-section-section">
{% for entry in TIME_FILTERS.keys() %} <h5>Content Filters</h5>
<option value="{{entry}}"{{' selected' if v.defaulttime==entry}}>{{entry}}</option> <div class="settings-section rounded">
{% endfor %} {{common.toggle_section('User Signatures', 'show_sigs', 'show_sigs', v.show_sigs, 'Show user signatures.', false)}}
</select> {% 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>
</div> </div>
</div> </section>
</section> </div>
<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>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,138 +1,139 @@
{% extends "settings.html" %} {% extends "settings.html" %}
{% block pagetitle %}Apps/Bots{% endblock %} {% block pagetitle %}Apps/Bots{% endblock %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col col-lg-8"> <div class="col col-lg-8">
<div class="settings"> <div class="settings">
<h5>API Guide</h5> <h5>API Guide</h5>
<a style="font-size:18px" href="/api">{{SITE_FULL}}/api</a> <a style="font-size:18px" href="/api">{{SITE_FULL}}/api</a>
<h5 class="mt-6">Your API Applications</h5> <h5 class="mt-6">Your API Applications</h5>
{% for app in v.applications if app.client_id %} {% 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)"> <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="settings-section rounded">
<div class="d-lg-flex"> <div class="d-lg-flex">
<div class="title w-lg-25"> <div class="title w-lg-25">
<label for="name-{{app.id}}">{{app.app_name}}</label> <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>
<div class="body w-lg-100"> {% else %}
<input hidden name="formkey" value="{{v|formkey}}"> <p>None</p>
<label for="edit-{{app.id}}-name" class="mb-0 w-lg-25">App Name</label> {% endfor %}
<input autocomplete="off" id="edit-{{app.id}}-name" class="form-control" type="text" name="name" value="{{app.app_name}}">
{% if app.client_id %} <h5 class="mt-6">Request API Keys</h2>
<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> <form id="api-key-request-form" action="/api_keys" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHRReload(this)">
<input autocomplete="off" id="edit-{{app.id}}-redirect" class="form-control" type="text" name="redirect_uri" value="{{app.redirect_uri}}"> <div class="settings-section rounded">
<label for="edit-{{app.id}}-desc" class="mb-0 w-lg-25">Description</label> <div class="d-lg-flex">
<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 class="body w-lg-100">
</div> <input hidden name="formkey" value="{{v|formkey}}">
</div> <label for="form-username">Username</label>
<div class="footer"> <input autocomplete="off" type="text" id="form-username" class="form-control" name="username" value="{{v.username}}" readonly>
<div class="d-flex"> <label for="form-appname">Application Name</label>
<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 autocomplete="off" type="text" id="form-appname" class="form-control" name="name" maxlength="50" required>
<input type="submit" class="btn btn-primary ml-2" value="Save Changes"> <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> </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 %} {% endblock %}
{% block clipboard %} {% block clipboard %}
<div class="toast clipboard" id="toast-success" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000"> <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"> <div class="toast-body text-center">
<i class="fas fa-check-circle text-success mr-2"></i>Token copied to clipboard <i class="fas fa-check-circle text-success mr-2"></i>Token copied to clipboard
</div>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,55 +1,55 @@
{%- import 'util/macros.html' as macros with context -%} {%- import 'util/macros.html' as macros with context -%}
{% macro toggle_section(title, id, name, flag, below_text, disabled) %} {% macro toggle_section(title, id, name, flag, below_text, disabled) %}
<div id="{{id}}_toggle" class="d-lg-flex border-bottom"> <div id="{{id}}_toggle" class="d-lg-flex border-bottom">
<div class="title w-lg-25"> <div class="title w-lg-25">
<label for="{{id}}">{{title}}</label> <label for="{{id}}">{{title}}</label>
</div> </div>
<div class="body w-lg-100 pt-1 pt-lg-3"> <div class="body w-lg-100 pt-1 pt-lg-3">
<div class="custom-control custom-switch"> <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 %}> <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> <label class="custom-control-label" for="{{id}}"></label>
</div>
{% if below_text %}
<span class="text-small text-muted">{{below_text|safe}}</span>
{% endif %}
</div> </div>
{% if below_text %}
<span class="text-small text-muted">{{below_text|safe}}</span>
{% endif %}
</div> </div>
</div>
{% endmacro %} {% endmacro %}
{% macro color_section(id, form_action, form_name, section_title, current_color) %} {% macro color_section(id, form_action, form_name, section_title, current_color) %}
<div class="d-lg-flex border-bottom"> <div class="d-lg-flex border-bottom">
<div class="title w-lg-25"> <div class="title w-lg-25">
<label for="{{id}}">{{section_title}}</label> <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> </div>
<p class="text-small mb-2">Or type a color hex code:</p> <div class="body w-lg-100 d-lg-flex">
<div class="d-flex"> <div class="d-flex">
<form action="{{form_action}}" id="{{id}}-color-code-form" method="post"> <form action="{{form_action}}" id="{{id}}-form" method="post" class="color-picker" style="line-height: 0">
<input hidden name="formkey" value="{{v|formkey}}"> <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 %}"> {% for themecolor in COLORS %}
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="submit" for="{{id}}-color-code" hidden></label> <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>
</form> <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> </div>
</div>
{% endmacro %} {% 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) %} {% 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 %} {% endmacro %}
{% macro text_area_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, show_extras, maxlength) %} {% 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"> <div class="body d-lg-flex border-bottom">
<label class="text-black w-lg-25">{{section_title}}</label> <label class="text-black w-lg-25">{{section_title}}</label>
<div class="w-lg-100"> <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)"> <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}}"> <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> <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 %} {% if show_extras %}
<div class="format-btns"> <div class="format-btns">
{{macros.emoji_btn(id ~ '-text')}} {{macros.emoji_btn(id ~ '-text')}}
{{macros.gif_btn(id ~ '-text')}} {{macros.gif_btn(id ~ '-text')}}
{{macros.file_btn('file-upload-common-' ~ id)}} {{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> </div>
{% endif %} </form>
</div>
<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>
</div> </div>
</div>
{% endmacro %} {% endmacro %}

View File

@ -1,45 +1,44 @@
{% extends "settings.html" %} {% extends "settings.html" %}
{% block pagetitle %}Custom CSS{% endblock %} {% block pagetitle %}Custom CSS{% endblock %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="settings col col-md-8"> <div class="settings col col-md-8">
<section> <section>
<h5>Custom CSS</h5> <h5>Custom CSS</h5>
<div id="settings-custom-css" class="settings-section rounded mb-0"> <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> <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="body d-lg-flex border-bottom">
<div class="w-lg-100"> <div class="w-lg-100">
<form id="profile-settings-css" action="/settings/css" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)"> <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}}"> <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> <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> <small>Limit of {{CSS_LENGTH_LIMIT}} characters</small>
<div class="d-flex mt-2"> <div class="d-flex mt-2">
<input autocomplete="off" id="submit-btn" class="btn btn-primary ml-auto" type="submit" value="Save"> <input autocomplete="off" id="submit-btn" class="btn btn-primary ml-auto" type="submit" value="Save">
</div> </div>
</form> </form>
</div>
</div> </div>
</div> </div>
</div> </section>
</section> <section>
<section> <h5>Profile CSS</h5>
<h5>Profile CSS</h5> <div id="settings-profile-css" class="settings-section rounded mb-0">
<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>
<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="body d-lg-flex border-bottom"> <div class="w-lg-100">
<div class="w-lg-100"> <form id="profile-settings-profilecss" action="/settings/profilecss" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<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}}">
<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>
<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>
<small>Limit of {{CSS_LENGTH_LIMIT}} characters</small> <div class="d-flex mt-2">
<div class="d-flex mt-2"> <input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Save"> </div>
</div> </form>
</form> </div>
</div> </div>
</div> </div>
</div> </section>
</section> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,108 +1,37 @@
{% extends "settings.html" %} {% extends "settings.html" %}
{% block pagetitle %}Personal Settings{% endblock %} {% block pagetitle %}Personal Settings{% endblock %}
{% block content %} {% block content %}
<div class="row settings-page" id="settings-page-personal"> <div class="row settings-page" id="settings-page-personal">
<div class="col col-lg-10"> <div class="col col-lg-10">
<div class="settings"> <div class="settings">
<section id="site-settings-experience-section" class="settings-section-section"> <section id="site-settings-experience-section" class="settings-section-section">
<h5>Site Experience</h5> <h5>Site Experience</h5>
<div class="settings-section rounded" id="site-settings-experience"> <div class="settings-section rounded" id="site-settings-experience">
{% if IS_EVENT() and v.can_toggle_event_music %} {% 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)}} {{common.toggle_section('Event Music', 'event_music_switch', 'event_music', v.event_music, 'Toggle event music.', false)}}
{% endif %} {% 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="d-lg-flex border-bottom"> <div class="d-lg-flex border-bottom">
<div class="title w-lg-25"> <div class="title w-lg-25">
<label for="theme">House</label> <label for="patron-status">{{patron}} Status</label>
</div> </div>
<div class="body w-lg-100"> <div class="body w-lg-100">
{% if v.house %} <p>You're a {{TIER_TO_NAME[v.patron] if v.patron else "freeloader"}}!</p>{% if v.patron %} Thanks ily! &lt;3{% endif %}
{% set cost = HOUSE_SWITCH_COST %} {% if not v.patron and v.truescore >= TRUESCORE_MINIMUM and DONATE_LINK != DEFAULT_CONFIG_VALUE %}
<p>Change your house (cost: {{cost}} coins or marseybux).</p> <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>
{% if ' Founder' in v.house %} {% elif not v.patron %}
<p>Warning: you'll lose your founder status if you join a different house</p> <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 %}
{% else %}
{% set cost = HOUSE_JOIN_COST %}
<p>Join a house (cost: {{cost}} coins or marseybux).</p>
{% endif %} {% 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"> <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}}"> <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 HOUSES %} {% for entry in THEMES %}
<option value="{{entry}}" {% if v.house.startswith(entry) %}selected{% endif %}> <option value="{{entry}}" {% if v.theme==entry %} selected {% endif %}>
{{entry}} {{entry}}
</option> </option>
{% endfor %} {% endfor %}
@ -110,43 +39,92 @@
</div> </div>
</div> </div>
</div> </div>
{%- endif %} {{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="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'] -%}
<div class="d-lg-flex border-bottom"> <div class="d-lg-flex border-bottom">
<div class="title w-lg-25"> <div class="title w-lg-25">
<label for="banner">Banner</label> <label for="background">Website Backgrounds</label>
</div> </div>
<div class="title w-lg-75 text-md-center"> <div class="body w-lg-100">
<img loading="lazy" alt="your banner" src="{{v.banner_url}}" class="banner-pic"> <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>
<div class="body w-lg-100 my-auto"> <div class="body w-lg-100 my-auto">
<div class="d-flex"> <div class="d-flex">
<div> <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}}"> <input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary text-capitalize mr-2 mb-0"> <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> </label>
</form> </form>
</div> </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 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> </div>
{%- endif %} {% if FEATURES['USERS_PROFILE_BANNER'] -%}
<div class="d-lg-flex border-bottom">
<div class="d-lg-flex border-bottom"> <div class="title w-lg-25">
<div class="title w-lg-25"> <label for="banner">Banner</label>
<label for="profile_background">Profile Background</label> </div>
</div> <div class="title w-lg-75 text-md-center">
{% if v.profile_background %} <img loading="lazy" alt="your banner" src="{{v.banner_url}}" class="banner-pic">
<div class="title w-lg-75 text-md-center"> </div>
<img loading="lazy" alt="your profile background" src="{{v.profile_background}}" class="profile-background-pic"> <div class="body w-lg-100 my-auto">
</div> <div class="d-flex">
{% endif %} <div>
<div class="body w-lg-100 my-auto"> <form action="/settings/images/banner" method="post" enctype="multipart/form-data">
<div class="d-flex"> <input hidden name="formkey" value="{{v|formkey}}">
<div> <label class="btn btn-secondary text-capitalize mr-2 mb-0">
<form action="/settings/images/profile_background" method="post" enctype="multipart/form-data"> Upload<input autocomplete="off" type="file" {% if g.is_tor %}disabled{% endif %} accept="image/*" hidden name="banner" data-nonce="{{g.nonce}}" onchange_submit>
<input hidden name="formkey" value="{{v|formkey}}"> </label>
<label class="btn btn-secondary text-capitalize mr-2 mb-0"> </form>
Upload<input autocomplete="off" type="file" {% if g.is_tor %}disabled{% endif %} accept="image/*" hidden name="profile_background" data-nonce="{{g.nonce}}" onchange_submit> </div>
</label> </div>
</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>
</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> {%- endif %}
</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>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="d-lg-flex border-bottom">
<div class="title w-lg-25"> <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>
<div class="body w-lg-100"> <div class="body w-lg-100">
<p>You can use an MP3 file or a YouTube video.</p> <p>Your original username will always stay reserved for you: <code>{{v.original_username}}</code></p>
<form action="/settings/song_change_mp3" method="post" enctype="multipart/form-data"> <form action="/settings/name_change" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendFormXHR(this)">
<input hidden name="formkey" value="{{v|formkey}}"> <input hidden name="formkey" value="{{v|formkey}}">
<label class="btn btn-secondary d-inline-block m-0 mb-3"> {% if v.patron %}
<div><i class="fas fa-file"></i> {% set minlength = 1 %}
{% if v.song and v.song|length in (1,2,3,4,5,17) %} {% else %}
{{v.song}}.mp3 {% set minlength = 3 %}
{% else %} {% endif %}
Use an MP3 file (Max size is 8MB) <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 %}>
{% endif %} <small>{{minlength}}-25 characters, including letters, numbers, _ , and -</small>
</div> <div class="d-flex mt-2">
<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> <input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Change Display Name" {% if v.namechanged %}disabled{% endif %}>
</label> </div>
</form> </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> </div>
{%- endif %} {{common.color_section('namecolor', '/settings/namecolor', 'namecolor', 'Name Color', v.name_color)}}
{% if FEATURES['USERS_PROFILE_BODYTEXT'] %} {% if FEATURES['PRONOUNS'] %}
{{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)}} {{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.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 %} {% endif %}
{% if v.profanityreplacer > 1 %} {{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)}}
{% set profanitytext = "You've enabled the profanity replacer permanently! 😇" %}
{% else %} {{common.color_section('flaircolor', '/settings/flaircolor', 'flaircolor', 'Flair Color', v.flaircolor)}}
{% 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 %} {% if FEATURES['USERS_PROFILE_SONG'] -%}
{% endif %} <div class="d-lg-flex border-bottom">
{{common.toggle_section("Slur Replacer", "slurreplacerswitch", 'slurreplacer', v.slurreplacer, slurtext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.slurreplacer > 1)}} <div class="title w-lg-25">
{{common.toggle_section("Profanity Replacer", "profanityreplacerswitch", 'profanityreplacer', v .profanityreplacer, profanitytext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.profanityreplacer > 1)}} <label for="anthem">Profile Anthem</label>
</div> </div>
</section> <div class="body w-lg-100">
<section id="site-settings-referral-section" class="settings-section-section"> <p>You can use an MP3 file or a YouTube video.</p>
<h5>Refer a Friend!</h5> <form action="/settings/song_change_mp3" method="post" enctype="multipart/form-data">
<div class="settings-section rounded" id="site-settings-referral"> <input hidden name="formkey" value="{{v|formkey}}">
<div class="d-lg-flex border-bottom"> <label class="btn btn-secondary d-inline-block m-0 mb-3">
<div class="title w-lg-25"> <div><i class="fas fa-file"></i>
<label for="referral_code">Referral Code</label> {% if v.song and v.song|length in (1,2,3,4,5,17) %}
</div> {{v.song}}.mp3
<div class="body w-lg-100"> {% else %}
<div class="input-group"> Use an MP3 file (Max size is 8MB)
<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}}"> {% endif %}
<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 %}"> </div>
<span class="input-group-text border-0 font-weight-bold"><i class="fas fa-user mr-1"></i>{{v.referral_count}}</span> <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>
</span> </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>
<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> </div>
<div class="d-lg-flex border-bottom px-3"> </section>
<div class="title w-lg-25 px-0"> </div>
<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>
</div> </div>
</div> </div>
</div> {% include "modals/emoji.html" %}
{% include "modals/emoji.html" %} {% include "modals/gif.html" %}
{% include "modals/gif.html" %}
{% if v.flairchanged %} {% if v.flairchanged %}
<input hidden id="flairchanged" value="{{v.flairchanged}}"> <input hidden id="flairchanged" value="{{v.flairchanged}}">
<script defer src="{{'js/flairchanged.js' | asset}}"></script> <script defer src="{{'js/flairchanged.js' | asset}}"></script>
{% endif %} {% endif %}
{% if v.namechanged %} {% if v.namechanged %}
<input hidden id="namechanged" value="{{v.namechanged}}"> <input hidden id="namechanged" value="{{v.namechanged}}">
<script defer src="{{'js/namechanged.js' | asset}}"></script> <script defer src="{{'js/namechanged.js' | asset}}"></script>
{% endif %} {% 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) %} {% macro permanent_filter_modal(id, form_action, field, friendly_name, badge_name) %}
{% if FEATURES['USERS_PERMANENT_WORD_FILTERS'] -%} {% if FEATURES['USERS_PERMANENT_WORD_FILTERS'] -%}
<div class="modal fade" id="modal-{{id}}" tabindex="-1"> <div class="modal fade" id="modal-{{id}}" tabindex="-1">
<div class="modal-dialog modal-dialog-centered"> <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)"> <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-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Make {{friendly_name}} Permanent</h5> <h5 class="modal-title">Make {{friendly_name}} Permanent</h5>
<button type="button" class="close" data-bs-dismiss="modal"> <button type="button" class="close" data-bs-dismiss="modal">
<span><i class="fas fa-times"></i></span> <span><i class="fas fa-times"></i></span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<input hidden name="{{field}}" value="true"> <input hidden name="{{field}}" value="true">
<input hidden name="permanent" value="true"> <input hidden name="permanent" value="true">
<input hidden name="formkey" value="{{v|formkey}}"> <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> <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> <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>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-link text-muted" data-bs-dismiss="modal">Cancel</button> <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> <button type="submit" class="btn btn-danger" id="submit-{{id}}-form">Make Permanent</button>
</div>
</div>
</form>
</div> </div>
</div> </div>
</form> {%- endif %}
</div> {% endmacro %}
</div>
{%- endif %} {{permanent_filter_modal('slurreplacer', '/settings/personal', 'slurreplacer', 'Slur Replacer', 'Social Justice Berserker')}}
{% endmacro %} {{permanent_filter_modal('profanityreplacer', '/settings/personal', 'profanityreplacer', 'Profanity Replacer', 'Soapy-Mouthed Angel')}}
{{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 %} {% endblock %}

View File

@ -1,190 +1,190 @@
{% extends "settings.html" %} {% extends "settings.html" %}
{% block pagetitle %}Security Settings{% endblock %} {% block pagetitle %}Security Settings{% endblock %}
{% block content %} {% block content %}
<script defer src="{{'js/settings_security.js' | asset}}"></script> <script defer src="{{'js/settings_security.js' | asset}}"></script>
<div class="row settings-page" id="settings-page-security"> <div class="row settings-page" id="settings-page-security">
<div class="col col-lg-8"> <div class="col col-lg-8">
<div class="settings"> <div class="settings">
<section id="site-settings-email-section" class="settings-section-section"> <section id="site-settings-email-section" class="settings-section-section">
<h5>Email</h5> <h5>Email</h5>
<div class="settings-section rounded"> <div class="settings-section rounded">
<form action="/settings/security" method="post"> <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="formkey" value="{{v|formkey}}">
<input hidden name="now" value="{{now}}"> <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"> <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>
</div> </div>
</form> </form>
</div> </section>
</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>
</div> </div>
</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>
<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 %} {% endblock %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,11 +3,11 @@
{% block PseudoSubmitForm %}{% endblock %} {% block PseudoSubmitForm %}{% endblock %}
{% block customPadding %}{% endblock %} {% block customPadding %}{% endblock %}
{% block content %} {% block content %}
<div class="row mt-3 p-md-4"> <div class="row mt-3 p-md-4">
{% include "user_listing.html" %} {% include "user_listing.html" %}
</div> </div>
{% endblock %} {% endblock %}
{% block pagenav %} {% block pagenav %}
{% include "pagination.html" %} {% include "pagination.html" %}
{% endblock %} {% endblock %}
{% block navbar %}{% 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 pagetype %}userpage{% endblock %}
{% block pagetitle %}@{{u.username}}{% endblock %} {% block pagetitle %}@{{u.username}}{% endblock %}
{% block content %} {% block content %}
<div class="row no-gutters"> <div class="row no-gutters">
<div class="col-12"> <div class="col-12">
<div class="text-center py-6 py-md-8"> <div class="text-center py-6 py-md-8">
<span class="fa-stack fa-2x text-muted mb-2"> <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 fa-square text-danger opacity-25 fa-stack-2x"></i>
<i class="fas text-danger fa-user-cog fa-stack-1x text-lg"></i> <i class="fas text-danger fa-user-cog fa-stack-1x text-lg"></i>
</span> </span>
<h5>You are blocking @{{u.username}}.</h5> <h5>You are blocking @{{u.username}}.</h5>
<p class="text-muted">So we aren't going to show you their profile.</p> <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> <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> </div>
</div>
{% endblock %} {% endblock %}
{% block pagenav %}{% endblock %} {% block pagenav %}{% endblock %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,10 @@
{%- extends 'userpage/userpage.html' -%} {%- extends 'userpage/userpage.html' -%}
{% block userpage_content %} {% 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="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="col">
<div class="posts"> <div class="posts">
{% include "post_listing.html" %} {% include "post_listing.html" %}
</div>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

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

View File

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

View File

@ -1,28 +1,30 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}@{{u.username}}'s Profile Views{% endblock %} {% 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 %} {% endblock %}
{% block pagenav %} {% block pagenav %}
{% include "pagination.html" %} {% include "pagination.html" %}
{% endblock %} {% endblock %}

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