remotes/1693045480750635534/spooky-22
Aevann1 2021-09-28 05:44:31 +02:00
parent 35e3038e20
commit ca3f232a45
42 changed files with 179 additions and 370 deletions

View File

@ -56,7 +56,6 @@
</div>
</div>
<!----posttoast--->
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" 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="toast-post-success-text"></span>

View File

@ -56,7 +56,6 @@
</div>
</div>
<!----posttoast--->
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" 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="toast-post-success-text"></span>

View File

@ -41,7 +41,6 @@
{% block content %}
<!-- Post filters bar visible only on medium devices or larger-->
<div class="row no-gutters">

View File

@ -7,7 +7,6 @@
{% endblock %}
{% block content %}
<!-- Post filters bar visible only on medium devices or larger-->
<div class="row justify-content-around mx-lg-5 d-lg-none no-gutters">
<div class="col bg-light border-bottom rounded-md p-3">

View File

@ -68,7 +68,6 @@
{% endblock %}
{% block content %}
<!-- Post filters bar visible only on medium devices or larger-->
<div class="row no-gutters">

View File

@ -13,8 +13,7 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<!-- {{'SITE_NAME' | app_config}} CSS -->
{% if v %}
{% if v %}
<link rel="stylesheet" href="/assets/css/{{v.theme}}_{{v.themecolor}}.css">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
@ -25,8 +24,7 @@
<body id="login">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
<div class="container-fluid">
<button class="navbar-toggler d-none" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
@ -35,8 +33,7 @@
</div>
</nav>
<!-- Page Content -->
<div class="container-fluid position-absolute h-100 p-0">
<div class="row no-gutters h-100">

View File

@ -35,10 +35,9 @@
<script src="/assets/js/comments_admin.js"></script>
{% endif %}
{% include 'embeds/new_comments_count.html' %}
<script src="/assets/js/new_comments_count.js"></script>
<script>
function collapse_comment(comment_id) {
const comment = "comment-" + comment_id
const element = document.getElementById(comment)
@ -64,10 +63,13 @@
});
</script>
{% macro single_comment(c, level=1) %}
<!---beginning of comment {{c.id}}--->
<script>
(() => {
const date = new Date('{{c.created_datetime}}');
document.getElementById('timestamp-{{c.id}}').title = date.toString();
})()
</script>
{% set ups=c.upvotes %}
{% set downs=c.downvotes %}
{% set score=ups-downs %}
@ -78,7 +80,6 @@
{% set replies=c.replies %}
{% endif %}
<!--conditions under which a comment might be hidden-->
{% if (c.is_banned or c.deleted_utc > 0 or c.is_blocking or c.is_blocked) and not (v and v.admin_level>0) and not (v and v.id==c.author_id) %}
@ -203,8 +204,7 @@
{% if c.author.customtitle %}&nbsp;<bdi style="color: #{{c.author.titlecolor}}">&nbsp;{% if c.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/PCM/quadrants/{{c.author.quadrant}}.webp">{% endif %}{{c.author.customtitle | safe}}</bdi>{% endif %}
<!-- {% if c.parent_comment_id and not standalone and level<=7 %}<a href="#comment-{{ c.parent_comment_id }}" class="text-muted ml-2"><i class="fas fa-reply fa-sm fa-fw fa-flip-horizontal mr-1"></i>{{ c.parent_comment.author.username }}</a>{% endif %} -->
<span id="timestamp-{{c.id}}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" class="time-stamp">&nbsp;{{c.age_string}}</span>
{% if c.edited_utc %}
<span class="time-edited"><span>&#183;</span> <span class="font-italic">Edited {{c.edited_string}}</span></span>
@ -464,7 +464,6 @@
</div>
<!-- Comment Actions Modal -->
<div class="modal fade d-md-none" id="actionsModal-{{c.id}}" tabindex="-1" role="dialog" aria-labelledby="actionsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
@ -550,13 +549,6 @@
</div>
<script>
(() => {
const date = new Date('{{c.created_datetime}}');
document.getElementById('timestamp-{{c.id}}').title = date.toString();
})()
</script>
{% endif %}
{% endmacro %}
@ -585,8 +577,7 @@
{% include "ban_modal.html" %}
{% endif %}
<!-- Delete Comment Modal -->
<div class="modal fade" id="deleteCommentModal" tabindex="-1" role="dialog" aria-labelledby="deleteCommentModalTitle" aria-hidden="true">
<div class="modal fade" id="deleteCommentModal" tabindex="-1" role="dialog" aria-labelledby="deleteCommentModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
@ -620,8 +611,7 @@
<span aria-hidden="true"><i class="far fa-times"></i></span>
</button>
</div>
<!-- Before report is made, show this -->
<div class="" id="reportCommentFormBefore">
<div class="" id="reportCommentFormBefore">
<form id="report-comment-form" method="post">
<div class="modal-body">
<div class="h6">We're sorry something here is wrong.</div>
@ -635,8 +625,7 @@
</div>
</form>
</div>
<!-- After report is made, show this -->
<div class="d-none" id="reportCommentFormAfter">
<div class="d-none" id="reportCommentFormAfter">
<div class="modal-body">
<div class="h6">Thank you for reporting this comment!</div>
<small class="form-text text-muted">We'll take it from here.</small>

View File

@ -66,7 +66,7 @@
{% endif %}
{% if v %}
<script src="https://js.pusher.com/beams/1.0/push-notifications-cdn.js"></script>
<script>function formkey() {return '{{v.formkey}}';}</script>
<script src="/assets/js/default.js"></script>
{% endif %}
@ -98,8 +98,7 @@
<meta name="twitter:url" content="{{request.path | full_link}}" />
{% endblock %}
<!-- iOS webapp -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
@ -256,18 +255,10 @@
{% endblock %}
<!-- Font Awesome -->
<link href="/assets/css/fa.css" rel="stylesheet"> <!--load all styles -->
<link href="/assets/css/fa.css" rel="stylesheet">
{% block fixedMobileBarJS %}
{% endblock %}
{% if v %}
<script>
function formkey() {return '{{v.formkey}}';}
</script>
{% endif %}
</head>
<body id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %} {% if 'rdrama' in request.host %}margin-top: 29px!important;{% endif %}">
@ -280,7 +271,6 @@
{% include "header.html" %}
<!-- Page Content -->
{% block mobileUserBanner %}
{% endblock %}
@ -334,7 +324,6 @@
{% block GIFpicker %}
{% endblock %}
<!-- Clipboard Toast -->
<div class="toast clipboard" id="toast-success" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">

View File

@ -36,7 +36,6 @@
};
</script>
<!-- Delete Post Modal -->
<div class="modal fade modal-sm-bottom" id="deletePostModal" tabindex="-1" role="dialog" aria-labelledby="deletePostModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">

View File

@ -9,8 +9,7 @@
{% block content %}
<p>We received a request to remove two-factor authentication from your account. In 72 hours, click the link below.</p>
<p>If you didn't make this request, change your password and use the Log Out Everywhere feature in your <a href="/settings/security">Security Settings</a> to permanently invalidate the link.</p>
<!-- Action -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<!-- Border based button

View File

@ -387,12 +387,10 @@
</a>
</td>
</tr>
<!-- Email Body -->
<tr>
<tr>
<td class="email-body" width="100%" cellpadding="0" cellspacing="0">
<table class="email-body_inner" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
<!-- Body content -->
<tr>
<tr>
<td class="content-cell">
<div class="f-fallback">
<h1>{% block title %}Title Goes Here{% endblock %}</h1>

View File

@ -6,8 +6,7 @@
{% block content %}
<p>You told us you wanted to change your {{'SITE_NAME' | app_config}} account email. To finish this process, please verify your new email address:</p>
<!-- Action -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<!-- Border based button

View File

@ -4,8 +4,7 @@
{% block content %}
<p>Thanks for joining {{'SITE_NAME' | app_config}}. Were happy to have you on board. To get the most out of {{'SITE_NAME' | app_config}}, please verify your account email:</p>
<!-- Action -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<!-- Border based button
@ -44,8 +43,7 @@
</tr>
</table>
<p>Please note that {{'SITE_NAME' | app_config}} will never ask you for your email, password, or two-factor token via email, text, or phone.</p>
<!-- Sub copy -->
<table class="body-sub" role="presentation">
<table class="body-sub" role="presentation">
<tr>
<td>
<p class="f-fallback sub">If youre having trouble with the button above, copy and paste the URL below into your web browser.</p>

View File

@ -5,8 +5,7 @@
{% block content %}
<p>To reset your password, click the button below:</p>
<!-- Action -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<!-- Border based button

View File

@ -1,80 +0,0 @@
<script>
// only allows the script to execute once
if (typeof showNewCommentCounts === 'undefined') {
// localstorage comment counts format: {"<postId>": {c: <totalComments>, t: <timestampUpdated>}}
const COMMENT_COUNTS_ID = "comment-counts"
/**
* Display the number of new comments present since the last time the post was opened
*/
function showNewCommentCounts(postId, newTotal) {
const comments = JSON.parse(localStorage.getItem(COMMENT_COUNTS_ID)) || {}
const lastCount = comments[postId]
if (lastCount) {
const newComments = newTotal - lastCount.c
if (newComments > 0) {
document.querySelectorAll(`#post-${postId} .new-comments`).forEach(elem => {
elem.textContent = ` (+${newComments})`
elem.classList.remove("d-none")
})
}
}
}
function incrementCommentCount(postId) {
saveCommentsCount(postId)
}
/**
* Saves the comment count to the localStorage
*
* @param postId The id of the post associated with the comments
* @param lastTotalComs The new amount, If null it will just increment the previous amount
*/
function saveCommentsCount(postId, lastTotalComs = null) {
const comments = JSON.parse(localStorage.getItem(COMMENT_COUNTS_ID)) || {}
const newTotal = lastTotalComs || ((comments[postId] || { c: 0 }).c + 1)
comments[postId] = { c: newTotal, t: Date.now() }
window.localStorage.setItem(COMMENT_COUNTS_ID, JSON.stringify(comments))
}
/**
* Cleans the expired entries (5 days). It runs every hour.
*/
function cleanCommentsCache() {
const LAST_CACHE_CLEAN_ID = "last-cache-clean"
const EXPIRE_INTERVAL_MILLIS = 5 * 24 * 60 * 60 * 1000
const CACHE_CLEAN_INTERVAL = 60 * 60 * 1000 // 1 hour
function cleanCache() {
const lastCacheClean = JSON.parse(localStorage.getItem(LAST_CACHE_CLEAN_ID)) || Date.now()
const now = Date.now()
if (now - lastCacheClean > CACHE_CLEAN_INTERVAL) {
const comments = JSON.parse(localStorage.getItem(COMMENT_COUNTS_ID)) || {}
for (let [key, value] of Object.entries(comments)) {
if (now - value.t > EXPIRE_INTERVAL_MILLIS) {
delete comments[key]
}
}
window.localStorage.setItem(COMMENT_COUNTS_ID, JSON.stringify(comments))
}
window.localStorage.setItem(LAST_CACHE_CLEAN_ID, JSON.stringify(now))
}
// So it does not slow the load of the main page with the clean up
setTimeout(cleanCache, 500)
}
cleanCommentsCache()
}
</script>

View File

@ -1,5 +1,5 @@
{{p.embed_url | safe}}
<script async src="/assets/js/twitter.js" charset="utf-8">
<script src="/assets/js/twitter.js" charset="utf-8">
</script>
<script>
document.getElementById('twitter-widget-0').setAttribute('sandbox','')

View File

@ -1,5 +1,5 @@
{{p.embed_url | safe}}
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8">
<script src="https://platform.twitter.com/widgets.js" charset="utf-8">
</script>
<script>
document.getElementById('twitter-widget-0').setAttribute('sandbox','')

View File

@ -1,3 +1,5 @@
<script src="/assets/js/emoji_modal2.js"></script>
<style>
a.emojitab {
padding: 0.5rem 0.7rem !important;
@ -16,9 +18,6 @@
}
</style>
<script src="/assets/js/emoji_modal2.js"></script>
<!-- Emoji Selection Modal -->
<div id="form" class="d-none"></div>
<div class="modal fade" id="emojiModal" tabindex="-1" role="dialog" aria-labelledby="emojiModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered p-2 py-5" role="document">

View File

@ -30,7 +30,6 @@
</script>
<!-- Expand Desktop Image Modal -->
<div class="modal desktop-expanded-image-modal" id="expandImageModal" tabindex="-1" role="dialog" aria-labelledby="expandImageModalTitle" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-centered mx-auto" role="document" style="width: fit-content;">

View File

@ -1,6 +1,5 @@
<script src="/assets/js/gif_modal.js"></script>
<!-- GIF Selection Modal - Powered by GIPHY -->
<div class="modal fade" id="gifModal" tabindex="-1" role="dialog" aria-labelledby="gifModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered p-5" role="document">
<div class="modal-content">

View File

@ -1,5 +1,3 @@
<!-- Navigation -->
<script src="/assets/js/header.js"></script>
<nav class="shadow shadow-md fixed-top">
@ -150,8 +148,7 @@
{% endif %}
</ul>
<!-- Mobile Nav Menu -->
<ul class="navbar-nav ml-auto d-flex d-md-none mt-3">
<ul class="navbar-nav ml-auto d-flex d-md-none mt-3">
<li class="nav-item pb-3">
<form id="searchform" class="form-inline search flex-nowrap mx-0 mx-lg-auto" action="/search/posts/" method="get">
<input class="form-control form-control-sm w-100" type="search" placeholder="Search" aria-label="Search" name="q">

View File

@ -61,7 +61,6 @@
{% endblock %}
{% block PseudoSubmitForm %}
<!-- Link to submission page from homepage, only visible on home -->
<div class="row no-gutters d-none d-lg-flex mt-3 {% if not v %}mb-3{% endif %}">
@ -132,7 +131,9 @@
</ul>
</nav>
{% endif %}
{% if v %}
<script src="https://js.pusher.com/beams/1.0/push-notifications-cdn.js"></script>
<script>
const beamsClient = new PusherPushNotifications.Client({
instanceId: '02ddcc80-b8db-42be-9022-44c546b4dce6',

View File

@ -5,7 +5,6 @@
{% block content %}
<!-- View toggle visible only on large devices or larger -->
<pre></pre>
<div class="d-flex justify-content-between align-items-center">

View File

@ -2,16 +2,6 @@
{% block pagetitle %}Moderation Log{% endblock %}
{% block stylesheets %}
{% if v %}
<link rel="stylesheet" href="/assets/css/{{v.theme}}_{{v.themecolor}}.css">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
{% endif %}
{% endblock %}
{% block content %}
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
@ -30,6 +20,13 @@
});
</script>
{% if v %}
<link rel="stylesheet" href="/assets/css/{{v.theme}}_{{v.themecolor}}.css">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
{% else %}
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
{% endif %}
<div class="row justify-content-around">
<div class="col h-100">

View File

@ -3,29 +3,25 @@
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Sign in to {{'SITE_NAME' | app_config}}">
<meta name="author" content="">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Sign in to {{'SITE_NAME' | app_config}}">
<meta name="author" content="">
{% block title %}
<title>Login - {{'SITE_NAME' | app_config}}</title>
{% endblock %}
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
{% block title %}
<title>Login - {{'SITE_NAME' | app_config}}</title>
{% endblock %}
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<!-- Font Awesome -->
<link href="/assets/css/fa.css" rel="stylesheet"> <!--load all styles -->
<!-- {{'SITE_NAME' | app_config}} CSS -->
<link href="/assets/css/fa.css" rel="stylesheet">
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
</head>
<body id="login">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
<div class="container-fluid">
<button class="navbar-toggler d-none" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
@ -34,7 +30,6 @@
</div>
</nav>
<!-- Page Content -->
<div class="container-fluid position-absolute h-100 p-0 overflow-auto">
<div class="row no-gutters h-100">
@ -120,9 +115,6 @@
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<pre>

View File

@ -13,15 +13,13 @@
<!-- {{'SITE_NAME' | app_config}} CSS -->
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
</head>
<body id="login">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
<div class="container-fluid">
<button class="navbar-toggler d-none" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
@ -31,7 +29,6 @@
</div>
</nav>
<!-- Page Content -->
<div class="container-fluid position-absolute h-100 p-0 overflow-auto">
<div class="row no-gutters h-100">

View File

@ -2,7 +2,6 @@
{% block PseudoSubmitForm %}{% endblock %}
<!-- Custom Padding for main-content col -->
{% block customPadding %}{% endblock %}

View File

@ -1,11 +1,11 @@
<script src="/assets/js/mobile_navigation_bar.js"></script>
<style>
.btn-dead:hover, .active.btn-dead:hover, .active.btn-dead {
border: 1px solid var(--primary)!important;
}
</style>
<script src="/assets/js/mobile_navigation_bar.js"></script>
<div class="container d-inline-flex d-lg-none">
<div class="row fixed-bottom bg-white border-top p-2" id="mobile-bottom-navigation-bar"

View File

@ -1,6 +1,5 @@
<script src="/assets/js/report_post_modal.js"></script>
<!-- Report Post Modal -->
<div class="modal fade" id="reportPostModal" tabindex="-1" role="dialog" aria-labelledby="reportPostModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
@ -10,8 +9,7 @@
<span aria-hidden="true"><i class="far fa-times"></i></span>
</button>
</div>
<!-- Before report is made, show this -->
<div class="" id="reportPostFormBefore">
<div class="" id="reportPostFormBefore">
<form id="report-post-form" method="post">
<div class="modal-body">
<div class="h6">We're sorry something here is wrong.</div>
@ -25,8 +23,7 @@
</div>
</form>
</div>
<!-- After report is made, show this -->
<div class="d-none" id="reportPostFormAfter">
<div class="d-none" id="reportPostFormAfter">
<div class="modal-body">
<div class="h6">Thank you for reporting this post!</div>
<small class="form-text text-muted">We'll take it from here.</small>

View File

@ -3,8 +3,7 @@
{% block pagetype %}search{% endblock %}
{% block title %}
<title>Search for "{{query}}" - {{'SITE_NAME' | app_config}}"</title> <!-- include dynamic jinja-generated text in title -->
<meta name="description" content="{{total}} result{{'s' if total != 1 else ''}}">
<title>Search for "{{query}}" - {{'SITE_NAME' | app_config}}"</title> <meta name="description" content="{{total}} result{{'s' if total != 1 else ''}}">
{% endblock %}
{% block PseudoSubmitForm %}{% endblock %}
@ -55,7 +54,6 @@
{% endblock %}
{% block content %}
<!-- Search text -->
<div class="row no-gutters my-md-3">
@ -83,7 +81,6 @@
</div>
<!-- Post filters bar visible only on medium devices or larger-->
{% if not '/users/' in request.path %}

View File

@ -2,13 +2,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.navsettings {
padding-left: 0.6rem !important;
padding-right: 0.6rem !important;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
@ -48,6 +41,13 @@
function formkey() {return '{{v.formkey}}';}
</script>
<style>
.navsettings {
padding-left: 0.6rem !important;
padding-right: 0.6rem !important;
}
</style>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
@ -75,21 +75,17 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<!-- {{'SITE_NAME' | app_config}} CSS -->
<link rel="stylesheet" href="/assets/css/{{v.theme}}_{{v.themecolor}}.css">
{% if v.agendaposter %}<link rel="stylesheet" href="/assets/css/agendaposter.css">{% elif v.css %}<link rel="stylesheet" href="/@{{v.username}}/css">{% endif %}
<!-- Font Awesome -->
<link href="/assets/css/fa.css" rel="stylesheet"> <!--load all styles -->
<link href="/assets/css/fa.css" rel="stylesheet">
</head>
<body id="settings" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}">
{% include "header.html" %}
<!-- Page Content -->
<div class="container">
<div class="container">
<div class="row justify-content-around">
@ -126,10 +122,8 @@
</div>
<!-- Settings tabs -->
<!-- Desktop -->
<div class="flex-row bg-white box-shadow-bottom sticky d-none d-sm-flex mt-3 mb-3 mb-sm-5">
<ul class="nav settings-nav">
@ -161,8 +155,7 @@
</div>
<!-- Mobile -->
<div class="flex-row bg-white box-shadow-bottom sticky justify-content-center d-flex d-sm-none mt-3 mb-3 mb-sm-5">
<ul class="nav settings-nav">
@ -202,8 +195,7 @@
</div>
{% if v %}
<!-- 2FA Modal -->
<div class="modal fade" id="2faModal" tabindex="-1" role="dialog" aria-labelledby="2faModalTitle" aria-hidden="true">
<div class="modal fade" id="2faModal" tabindex="-1" role="dialog" aria-labelledby="2faModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
@ -271,8 +263,7 @@
</div>
{% endif %}
<!-- Clipboard Toast -->
{% block clipboard %}
<div class="toast clipboard" id="toast-success" role="alert" aria-live="assertive" aria-atomic="true" data-bs-animation="true" data-bs-autohide="true" data-bs-delay="5000">
<div class="toast-body text-center">
@ -288,7 +279,6 @@
{% endblock %}
<!--Post toasts -->
<div class="toast" id="toast-post-success" style="position: fixed; bottom: 1.5rem; margin: 0 auto; left: 0; right: 0; width: 275px; z-index: 1000" role="alert" aria-live="assertive" aria-atomic="true" 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="toast-post-success-text"></span>

View File

@ -2,10 +2,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script>
function formkey() {return '{{v.formkey}}';}
</script>
<head>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<script>function formkey() {return '{{v.formkey}}';}</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@ -37,25 +37,21 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<!-- {{'SITE_NAME' | app_config}} CSS -->
{% if v %}
<link id="css-link" rel="stylesheet" href="/assets/css/{{v.theme}}_{{v.themecolor}}.css">
{% else %}
<link id="css-link" rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
{% endif %}
<!-- Font Awesome -->
<link href="/assets/css/fa.css" rel="stylesheet"> <!--load all styles -->
<link href="/assets/css/fa.css" rel="stylesheet">
</head>
<body id="settings2" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}">
{% include "header.html" %}
<!-- sub-header container -->
{% block subHeader %}
<div class="container-fluid bg-light">
<div class="row py-3">
@ -73,13 +69,11 @@
</div>
{% endblock %}
<!-- tabs container -->
{% block subNav %}
{% block subNav %}
{% if True %}
{% set mod = (v.admin_level==6) %}
<!-- Desktop -->
<div class="container-fluid bg-white sticky d-none d-md-block">
<div class="container-fluid bg-white sticky d-none d-md-block">
<div class="row box-shadow-bottom">
<div class="col">
<div class="container">
@ -113,8 +107,7 @@
</div>
</div>
</div>
<!-- Mobile -->
<div class="container-fluid bg-white sticky d-md-none">
<div class="container-fluid bg-white sticky d-md-none">
<div class="row box-shadow-bottom">
<div class="col">
<div class="d-flex flex-row-reverse justify-content-center">
@ -145,16 +138,14 @@
{% endif %}
{% endblock %}
<!-- Settings content -->
<div class="{% if request.path == '/banned' or request.path == '/blocks' %}container-fluid{% else %}container{% endif %} mt-3 {% if request.path in ['/leaderboard', '/paypigs', '/patrons'] %}px-0{% endif %}">
<div class="{% if request.path == '/banned' or request.path == '/blocks' %}container-fluid{% else %}container{% endif %} mt-3 {% if request.path in ['/leaderboard', '/paypigs', '/patrons'] %}px-0{% endif %}">
{% block content %}
{% endblock %}
</div>
<!-- Clipboard Toast -->
<div class="toast clipboard" id="toast-clipboard-success" role="alert" aria-live="assertive" aria-atomic="true" 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
@ -196,8 +187,6 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
{% block scripts %}
{% endblock %}

View File

@ -4,6 +4,45 @@
{% block content %}
<script>
block_user=function() {
var exileForm = document.getElementById("exile-form");
var exileError = document.getElementById("toast-error-message");
var usernameField = document.getElementById("exile-username");
var isValidUsername = usernameField.checkValidity();
username = usernameField.value;
if (isValidUsername) {
var xhr = new XMLHttpRequest();
xhr.open("post", "/settings/block");
xhr.withCredentials=true;
f=new FormData();
f.append("username", username);
f.append("formkey", formkey());
xhr.onload=function(){
if (xhr.status<300) {
window.location.reload(true);
}
else {
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.show();
exileError.textContent = JSON.parse(xhr.response)["error"];
}
}
xhr.send(f)
}
}
</script>
<div class="row">
<div class="col">
@ -90,7 +129,6 @@
</div>
<!-- Admin Ban user Modal -->
<div class="modal fade" id="blockmodal" tabindex="-1" role="dialog" aria-labelledby="blockmodal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<form action="/settings/block" id="exile-form" method="post" onsubmit="return false;">
@ -120,42 +158,4 @@
</div>
</div>
{% endblock %}
<script>
block_user=function() {
var exileForm = document.getElementById("exile-form");
var exileError = document.getElementById("toast-error-message");
var usernameField = document.getElementById("exile-username");
var isValidUsername = usernameField.checkValidity();
username = usernameField.value;
if (isValidUsername) {
var xhr = new XMLHttpRequest();
xhr.open("post", "/settings/block");
xhr.withCredentials=true;
f=new FormData();
f.append("username", username);
f.append("formkey", formkey());
xhr.onload=function(){
if (xhr.status<300) {
window.location.reload(true);
}
else {
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
myToast.hide();
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.show();
exileError.textContent = JSON.parse(xhr.response)["error"];
}
}
xhr.send(f)
}
}
</script>
{% endblock %}

View File

@ -217,7 +217,6 @@
</div>
<!-- Account Deletion Modal -->
<div class="modal fade" id="deleteAccountModal" tabindex="-1" role="dialog" aria-labelledby="deleteAccountModal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
@ -273,7 +272,6 @@
</div>
</form>
</div>
<!-- After report is made, show this -->
</div>
</div>
{% endblock %}

View File

@ -6,6 +6,10 @@
<script src="/assets/js/signup.js"></script>
{% if hcaptcha %}
<script src="https://hcaptcha.com/1/api.js"></script>
{% endif %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Sign up in under 27 seconds.">
@ -31,15 +35,13 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<!-- {{'SITE_NAME' | app_config}} CSS -->
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
</head>
<body id="login">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
<div class="container-fluid">
<button class="navbar-toggler d-none" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
@ -48,7 +50,6 @@
</div>
</nav>
<!-- Page Content -->
<div class="container-fluid position-absolute h-100 p-0 overflow-auto">
<div class="row no-gutters h-100">
@ -128,7 +129,6 @@
{% if hcaptcha %}
<div class="h-captcha" data-sitekey="{{ hcaptcha }}"></div>
<script src="https://hcaptcha.com/1/api.js"></script>
{% endif %}
<button class="btn btn-primary login w-100 mt-3" id="register_button">Register</button>
@ -161,7 +161,6 @@
</div>
</div>
<!-- {{'SITE_NAME' | app_config}} JS -->

View File

@ -3,6 +3,7 @@
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@ -29,15 +30,13 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<!-- {{'SITE_NAME' | app_config}} CSS -->
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
<link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css">
</head>
<body id="login">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent fixed-top border-0">
<div class="container-fluid">
<button class="navbar-toggler d-none" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
@ -46,7 +45,6 @@
</div>
</nav>
<!-- Page Content -->
<div class="container-fluid position-absolute h-100 p-0">
<div class="row no-gutters h-100">
@ -92,8 +90,7 @@
</div>
</div>
<!-- Clipboard Toast -->
<div class="toast clipboard" id="toast-success" role="alert" aria-live="assertive" aria-atomic="true" 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
@ -108,11 +105,8 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<!-- {{'SITE_NAME' | app_config}} JS -->
<pre>

View File

@ -15,6 +15,7 @@
{% block title %}
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
<script src="/assets/js/new_comments_count.js"></script>
{% if v and v.id == p.author_id %}
<script>
@ -33,6 +34,24 @@
</script>
{% endif %}
<script>
// closure to avoid variable conflicts
(() => {
const date = new Date('{{p.created_datetime}}');
document.getElementById('timestamp').title = date.toString();
{% if p.edited_utc %}
const dateEdited = new Date('{{p.edited_datetime}}');
document.getElementById('edited_timestamp').title = dateEdited.toString();
{% endif %}
{% if (not v or v.highlightcomments) %}
showNewCommentCounts('{{p.id}}', {{p.comment_count}})
{% endif %}
saveCommentsCount('{{p.id}}', {{p.comment_count}})
})()
</script>
{% if p.award_count("shit") %}
<script src="/assets/js/bug-min.js"></script>
{% set minbugs = 10*p.award_count("shit") if p.award_count("shit") < 3 else 20 %}
@ -64,7 +83,6 @@
</script>
{% endif %}
{% include 'embeds/new_comments_count.html' %}
<meta charset="utf-8" />
<meta property="og:type" content="article" />
@ -133,7 +151,6 @@
{% block pagetype %}thread{% endblock %}
{% block actionsModal %}
<!-- Post Actions Modal -->
<div class="modal fade modal-sm-bottom d-md-none" id="actionsModal" tabindex="-1" role="dialog" aria-labelledby="actionsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
@ -492,8 +509,7 @@
</div>
</div>
<!-- Voting on "medium" devices or larger, hidden on smaller devices -->
{% if v %}
<div id="voting" class="voting d-none d-md-block mb-auto">
@ -580,25 +596,6 @@
</div>
<script>
// closure to avoid variable conflicts
(() => {
const date = new Date('{{p.created_datetime}}');
document.getElementById('timestamp').title = date.toString();
{% if p.edited_utc %}
const dateEdited = new Date('{{p.edited_datetime}}');
document.getElementById('edited_timestamp').title = dateEdited.toString();
{% endif %}
{% if (not v or v.highlightcomments) %}
showNewCommentCounts('{{p.id}}', {{p.comment_count}})
{% endif %}
saveCommentsCount('{{p.id}}', {{p.comment_count}})
})()
</script>
<div class="row border-md-0 comment-section pb-3">
<div class="col border-top">
<div class="comments-count py-3">

View File

@ -60,8 +60,7 @@
</div>
<!-- Voting on "medium" devices or larger, hidden on smaller devices -->
<div id="voting" class="d-md-block my-auto mr-3 text-center">
<div id="post-{{p.id}}-up" class="arrow-up mx-auto">
</div>
@ -113,7 +112,6 @@
{% endblock %}
{% block mobileactions %}
<!-- Mobile responsive fixed footer with post actions -->
<div class="row fixed-top bg-white shadow d-inline-flex d-md-none p-3" id="footer-actions" style="z-index: 3; top: 48px; transition: top cubic-bezier(0, 0, 0.2, 1) 220ms;">
<div class="col text-center">

View File

@ -4,6 +4,8 @@
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
<script src="/assets/js/new_comments_count.js"></script>
<script>
var clipboard = new ClipboardJS('.copy-link');
clipboard.on('success', function(e) {
@ -18,10 +20,24 @@
});
</script>
{% include 'embeds/new_comments_count.html' %}
{% for p in listing %}
<script>
(() => {
const date = new Date('{{p.created_datetime}}');
document.getElementById('timestamp-{{p.id}}').title = date.toString();
{% if p.edited_utc %}
const dateEdited = new Date('{{p.edited_datetime}}');
document.getElementById('edited_timestamp-{{p.id}}').title = dateEdited.toString();
{% endif %}
{% if (not v or v.highlightcomments) %}
showNewCommentCounts('{{p.id}}', {{p.comment_count}})
{% endif %}
})()
</script>
{% set ups=p.upvotes %}
{% set downs=p.downvotes %}
{% set score=ups-downs %}
@ -37,8 +53,7 @@
<div class="d-flex flex-row-reverse flex-md-row flex-nowrap justify-content-end">
<!-- Voting on "medium" devices or larger, hidden on smaller devices -->
{% if not postembed %}
{% if not postembed %}
<div class="voting my-2 d-none d-md-block pr-2">
{% if v and request.path.startswith('/@') and not v.admin_level %}
@ -300,7 +315,6 @@
</div>
</div>
<!-- Post Actions Modal -->
<div class="modal fade modal-sm-bottom d-md-none" id="actionsModal-{{p.id}}" tabindex="-1" role="dialog" aria-labelledby="actionsModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
@ -400,21 +414,6 @@
</div>
<script>
(() => {
const date = new Date('{{p.created_datetime}}');
document.getElementById('timestamp-{{p.id}}').title = date.toString();
{% if p.edited_utc %}
const dateEdited = new Date('{{p.edited_datetime}}');
document.getElementById('edited_timestamp-{{p.id}}').title = dateEdited.toString();
{% endif %}
{% if (not v or v.highlightcomments) %}
showNewCommentCounts('{{p.id}}', {{p.comment_count}})
{% endif %}
})()
</script>
{% if p.active_flags %}
<div id="flaggers-{{p.id}}" class="flaggers d-none">
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>

View File

@ -21,8 +21,7 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&display=swap" rel="stylesheet">
<!-- {{'SITE_NAME' | app_config}} Board CSS -->
{% block stylesheets %}
{% if v %}
<link rel="stylesheet" href="/assets/css/{{v.theme}}_{{v.themecolor}}.css">
@ -32,19 +31,15 @@
{% endif %}
{% endblock %}
<!-- Font Awesome -->
<link href="/assets/css/fa.css" rel="stylesheet"> <!--load all styles -->
</head>
<link href="/assets/css/fa.css" rel="stylesheet"> </head>
<body id="submit" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}display: block;">
<!-- Navigation -->
{% include "header.html" %}
{% include "header.html" %}
{% block form %}
<!-- Page Content -->
<div class="submit-grid-view">
<form id="submitform" action="/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
@ -171,8 +166,7 @@
</div>
{% endblock %}
<!-- {{'SITE_NAME' | app_config}} JS -->
<pre>

View File

@ -18,6 +18,7 @@
{% block pagetype %}userpage{% endblock %}
{% block title %}
<script src="/assets/js/userpage2.js"></script>
<title>{{u.username}}'s profile - {{'SITE_NAME' | app_config}}</title>
{% if u.is_private %}
<meta name="robots" content="noindex">
@ -42,9 +43,6 @@
{% endblock %}
{% block desktopUserBanner %}
<!-- Desktop -->
<script src="/assets/js/userpage2.js"></script>
<script>
function transferCoins(mobile=false) {
@ -351,7 +349,6 @@
{% endblock %}
{% block mobileUserBanner %}
<!-- Mobile -->
<div class="container-fluid text-center bg-white d-md-none">
<div class="row">
<div class="col px-0">

View File

@ -34,7 +34,6 @@
{% block adminpanel %}{% endblock %}
{% block content %}
<!-- Post filters bar visible only on medium devices or larger-->
<div class="row no-gutters">