Merge branch 'master' into mistletoe
This commit is contained in:
commit
2a25b9ea2c
30 changed files with 251 additions and 222 deletions
|
@ -1,46 +1,44 @@
|
||||||
window.addEventListener("load",function(event) {
|
var prevScrollpos = window.pageYOffset;
|
||||||
var prevScrollpos = window.pageYOffset;
|
window.onscroll = function () {
|
||||||
window.onscroll = function () {
|
var currentScrollPos = window.pageYOffset;
|
||||||
var currentScrollPos = window.pageYOffset;
|
|
||||||
|
|
||||||
var topBar = document.getElementById("fixed-bar-mobile");
|
var topBar = document.getElementById("fixed-bar-mobile");
|
||||||
|
|
||||||
var bottomBar = document.getElementById("mobile-bottom-navigation-bar");
|
var bottomBar = document.getElementById("mobile-bottom-navigation-bar");
|
||||||
|
|
||||||
var dropdown = document.getElementById("mobileSortDropdown");
|
var dropdown = document.getElementById("mobileSortDropdown");
|
||||||
|
|
||||||
var navbar = document.getElementById("navbar");
|
var navbar = document.getElementById("navbar");
|
||||||
|
|
||||||
if (bottomBar != null) {
|
if (bottomBar != null) {
|
||||||
if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
|
if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
|
||||||
bottomBar.style.bottom = "0px";
|
bottomBar.style.bottom = "0px";
|
||||||
}
|
}
|
||||||
else if (currentScrollPos <= 125 && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
|
else if (currentScrollPos <= 125 && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
|
||||||
bottomBar.style.bottom = "0px";
|
bottomBar.style.bottom = "0px";
|
||||||
}
|
|
||||||
else if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 65)) {
|
|
||||||
bottomBar.style.bottom = "-50px";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
bottomBar.style.bottom = "-50px";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 65)) {
|
||||||
if (topBar != null && dropdown != null) {
|
bottomBar.style.bottom = "-50px";
|
||||||
if (prevScrollpos > currentScrollPos) {
|
}
|
||||||
topBar.style.top = "48px";
|
else {
|
||||||
navbar.classList.remove("shadow");
|
bottomBar.style.bottom = "-50px";
|
||||||
}
|
|
||||||
else if (currentScrollPos <= 125) {
|
|
||||||
topBar.style.top = "48px";
|
|
||||||
navbar.classList.remove("shadow");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
topBar.style.top = "-48px";
|
|
||||||
dropdown.classList.remove('show');
|
|
||||||
navbar.classList.add("shadow");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
prevScrollpos = currentScrollPos;
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
if (topBar != null && dropdown != null) {
|
||||||
|
if (prevScrollpos > currentScrollPos) {
|
||||||
|
topBar.style.top = "48px";
|
||||||
|
navbar.classList.remove("shadow");
|
||||||
|
}
|
||||||
|
else if (currentScrollPos <= 125) {
|
||||||
|
topBar.style.top = "48px";
|
||||||
|
navbar.classList.remove("shadow");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
topBar.style.top = "-48px";
|
||||||
|
dropdown.classList.remove('show');
|
||||||
|
navbar.classList.add("shadow");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
prevScrollpos = currentScrollPos;
|
||||||
|
}
|
|
@ -1,4 +1,3 @@
|
||||||
window.addEventListener("load",function(event) {
|
|
||||||
function eventasdf(value){
|
function eventasdf(value){
|
||||||
var content_id = value.getAttributeNode("data-content-id").value;
|
var content_id = value.getAttributeNode("data-content-id").value;
|
||||||
value.addEventListener("click", function(){jhkj(content_id)});
|
value.addEventListener("click", function(){jhkj(content_id)});
|
||||||
|
@ -33,5 +32,4 @@ window.addEventListener("load",function(event) {
|
||||||
var usernames = document.querySelectorAll("a.user-name");
|
var usernames = document.querySelectorAll("a.user-name");
|
||||||
usernames.forEach(eventasdf);
|
usernames.forEach(eventasdf);
|
||||||
|
|
||||||
document.addEventListener("click", function(e){dfgh(e)});
|
document.addEventListener("click", function(e){dfgh(e)});
|
||||||
});
|
|
|
@ -335,8 +335,11 @@ class Comment(Base):
|
||||||
maxupvotes = min(ti, 31)
|
maxupvotes = min(ti, 31)
|
||||||
rand = randint(0, maxupvotes)
|
rand = randint(0, maxupvotes)
|
||||||
if self.upvotes < rand:
|
if self.upvotes < rand:
|
||||||
self.upvotes += randint(0, 3)
|
amount = randint(0, 3)
|
||||||
|
self.upvotes += amount
|
||||||
g.db.add(self)
|
g.db.add(self)
|
||||||
|
self.author.coins += amount
|
||||||
|
g.db.add(self.author)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
|
|
@ -335,8 +335,11 @@ class Submission(Base):
|
||||||
maxupvotes = min(ti, 27)
|
maxupvotes = min(ti, 27)
|
||||||
rand = random.randint(0, maxupvotes)
|
rand = random.randint(0, maxupvotes)
|
||||||
if self.upvotes < rand:
|
if self.upvotes < rand:
|
||||||
self.upvotes += random.randint(0, 3)
|
amount = random.randint(0, 3)
|
||||||
|
self.upvotes += amount
|
||||||
g.db.add(self)
|
g.db.add(self)
|
||||||
|
self.author.coins += amount
|
||||||
|
g.db.add(self.author)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
|
|
@ -143,6 +143,7 @@ if SITE == 'rdrama.net':
|
||||||
CARP_ID = 995
|
CARP_ID = 995
|
||||||
JOAN_ID = 28
|
JOAN_ID = 28
|
||||||
AEVANN_ID = 1
|
AEVANN_ID = 1
|
||||||
|
KLEN_ID = 2050
|
||||||
LAWLZ_ID = 3833
|
LAWLZ_ID = 3833
|
||||||
LLM_ID = 253
|
LLM_ID = 253
|
||||||
DAD_ID = 2513
|
DAD_ID = 2513
|
||||||
|
@ -164,6 +165,7 @@ elif SITE == "pcmemes.net":
|
||||||
CARP_ID = 0
|
CARP_ID = 0
|
||||||
JOAN_ID = 0
|
JOAN_ID = 0
|
||||||
AEVANN_ID = 1
|
AEVANN_ID = 1
|
||||||
|
KLEN_ID = 0
|
||||||
LAWLZ_ID = 0
|
LAWLZ_ID = 0
|
||||||
LLM_ID = 0
|
LLM_ID = 0
|
||||||
DAD_ID = 0
|
DAD_ID = 0
|
||||||
|
@ -185,6 +187,7 @@ else:
|
||||||
CARP_ID = 0
|
CARP_ID = 0
|
||||||
JOAN_ID = 0
|
JOAN_ID = 0
|
||||||
AEVANN_ID = 0
|
AEVANN_ID = 0
|
||||||
|
KLEN_ID = 0
|
||||||
LAWLZ_ID = 0
|
LAWLZ_ID = 0
|
||||||
LLM_ID = 0
|
LLM_ID = 0
|
||||||
DAD_ID = 0
|
DAD_ID = 0
|
||||||
|
@ -416,6 +419,38 @@ BADGES = {
|
||||||
}
|
}
|
||||||
|
|
||||||
AWARDS = {
|
AWARDS = {
|
||||||
|
"snow": {
|
||||||
|
"kind": "snow",
|
||||||
|
"title": "Snow",
|
||||||
|
"description": "???",
|
||||||
|
"icon": "fas fa-snowflake",
|
||||||
|
"color": "text-gray",
|
||||||
|
"price": 300
|
||||||
|
},
|
||||||
|
"candycane": {
|
||||||
|
"kind": "candycane",
|
||||||
|
"title": "Candy Cane",
|
||||||
|
"description": "???",
|
||||||
|
"icon": "fas fa-candy-cane",
|
||||||
|
"color": "text-gray",
|
||||||
|
"price": 500
|
||||||
|
},
|
||||||
|
"mistletoe": {
|
||||||
|
"kind": "mistletoe",
|
||||||
|
"title": "Mistletoe",
|
||||||
|
"description": "???",
|
||||||
|
"icon": "fas fa-mistletoe",
|
||||||
|
"color": "text-gray",
|
||||||
|
"price": 600
|
||||||
|
},
|
||||||
|
"mariah": {
|
||||||
|
"kind": "mariah",
|
||||||
|
"title": "Mariah",
|
||||||
|
"description": "???",
|
||||||
|
"icon": "fas fa-music",
|
||||||
|
"color": "text-gray",
|
||||||
|
"price": 800
|
||||||
|
},
|
||||||
"haunt": {
|
"haunt": {
|
||||||
"kind": "haunt",
|
"kind": "haunt",
|
||||||
"title": "Haunt",
|
"title": "Haunt",
|
||||||
|
|
|
@ -130,14 +130,16 @@ def sanitize(sanitized, noimages=False):
|
||||||
if site not in tag["src"] and not tag["src"].startswith('/'): tag["rel"] = "nofollow noopener noreferrer"
|
if site not in tag["src"] and not tag["src"].startswith('/'): tag["rel"] = "nofollow noopener noreferrer"
|
||||||
tag["class"] = "in-comment-image"
|
tag["class"] = "in-comment-image"
|
||||||
tag["loading"] = "lazy"
|
tag["loading"] = "lazy"
|
||||||
tag["data-src"] = tag["src"]
|
# tag["data-src"] = tag["src"]
|
||||||
tag["src"] = "/assets/images/loading.webp"
|
# tag["src"] = "/assets/images/loading.webp"
|
||||||
|
|
||||||
link = soup.new_tag("a")
|
link = soup.new_tag("a")
|
||||||
link["href"] = tag["data-src"]
|
# link["href"] = tag["data-src"]
|
||||||
|
link["href"] = tag["src"]
|
||||||
if site not in link["href"] and not link["href"].startswith('/'): link["rel"] = "nofollow noopener noreferrer"
|
if site not in link["href"] and not link["href"].startswith('/'): link["rel"] = "nofollow noopener noreferrer"
|
||||||
link["target"] = "_blank"
|
link["target"] = "_blank"
|
||||||
link["onclick"] = f"expandDesktopImage('{tag['data-src']}');"
|
# link["onclick"] = f"expandDesktopImage('{tag['data-src']}');"
|
||||||
|
link["onclick"] = f"expandDesktopImage('{tag['src']}');"
|
||||||
link["data-bs-toggle"] = "modal"
|
link["data-bs-toggle"] = "modal"
|
||||||
link["data-bs-target"] = "#expandImageModal"
|
link["data-bs-target"] = "#expandImageModal"
|
||||||
|
|
||||||
|
|
|
@ -515,6 +515,8 @@ def buy(v, award):
|
||||||
@auth_required
|
@auth_required
|
||||||
def award_post(pid, v):
|
def award_post(pid, v):
|
||||||
|
|
||||||
|
if v.shadowbanned: return render_template('errors/500.html', v=v), 500
|
||||||
|
|
||||||
if v.is_banned and not v.unban_utc: return {"error": "forbidden."}, 403
|
if v.is_banned and not v.unban_utc: return {"error": "forbidden."}, 403
|
||||||
|
|
||||||
kind = request.values.get("kind", "").strip()
|
kind = request.values.get("kind", "").strip()
|
||||||
|
@ -670,6 +672,8 @@ def award_post(pid, v):
|
||||||
@auth_required
|
@auth_required
|
||||||
def award_comment(cid, v):
|
def award_comment(cid, v):
|
||||||
|
|
||||||
|
if v.shadowbanned: return render_template('errors/500.html', v=v), 500
|
||||||
|
|
||||||
if v.is_suspended and v.unban_utc == 0: return {"error": "forbidden"}, 403
|
if v.is_suspended and v.unban_utc == 0: return {"error": "forbidden"}, 403
|
||||||
|
|
||||||
kind = request.values.get("kind", "").strip()
|
kind = request.values.get("kind", "").strip()
|
||||||
|
|
|
@ -19,7 +19,7 @@ def join_discord(v):
|
||||||
|
|
||||||
if v.is_suspended != 0 and v.admin_level == 0: return "Banned users cannot join the discord server!"
|
if v.is_suspended != 0 and v.admin_level == 0: return "Banned users cannot join the discord server!"
|
||||||
|
|
||||||
if SITE_NAME == 'Drama' and v.admin_level == 0 and v.patron == 0 and v.truecoins < 150: return f"You must earn 150 {COINS_NAME} before entering the Discord server. You earn {COINS_NAME} by making posts/comments and getting upvoted."
|
if SITE_NAME == 'Drama' and v.admin_level == 0 and v.patron == 0 and v.truecoins < 150: return f"You must receive 150 upvotes/downvotes from other users before being able to join the Discord server."
|
||||||
|
|
||||||
if v.shadowbanned or v.agendaposter: return ""
|
if v.shadowbanned or v.agendaposter: return ""
|
||||||
|
|
||||||
|
|
|
@ -338,6 +338,17 @@ def settings_profile_post(v):
|
||||||
|
|
||||||
if len(bio_html) > 10000: abort(400)
|
if len(bio_html) > 10000: abort(400)
|
||||||
|
|
||||||
|
if v.id == KLEN_ID:
|
||||||
|
notify_users = NOTIFY_USERS(friends_html, v.id)
|
||||||
|
soup = BeautifulSoup(friends_html, features="html.parser")
|
||||||
|
for mention in soup.find_all("a", href=re.compile("^/@(\w+)")):
|
||||||
|
username = mention["href"].split("@")[1]
|
||||||
|
user = g.db.query(User).filter_by(username=username).first()
|
||||||
|
if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id)
|
||||||
|
for x in notify_users:
|
||||||
|
message = f"@{v.username} has added you to their friends list!"
|
||||||
|
send_notification(x, message)
|
||||||
|
|
||||||
v.bio = bio[:1500]
|
v.bio = bio[:1500]
|
||||||
v.bio_html=bio_html
|
v.bio_html=bio_html
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
|
@ -12,27 +12,25 @@
|
||||||
|
|
||||||
{% block fixedMobileBarJS %}
|
{% block fixedMobileBarJS %}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
var prevScrollpos = window.pageYOffset;
|
||||||
var prevScrollpos = window.pageYOffset;
|
window.onscroll = function () {
|
||||||
window.onscroll = function () {
|
var currentScrollPos = window.pageYOffset;
|
||||||
var currentScrollPos = window.pageYOffset;
|
if (prevScrollpos > currentScrollPos) {
|
||||||
if (prevScrollpos > currentScrollPos) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
}
|
||||||
}
|
else if (currentScrollPos <= 125) {
|
||||||
else if (currentScrollPos <= 125) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
|
||||||
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
|
||||||
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
|
||||||
document.getElementById("navbar").classList.add("shadow");
|
|
||||||
}
|
|
||||||
prevScrollpos = currentScrollPos;
|
|
||||||
}
|
}
|
||||||
});
|
else {
|
||||||
|
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
||||||
|
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
||||||
|
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
||||||
|
document.getElementById("navbar").classList.add("shadow");
|
||||||
|
}
|
||||||
|
prevScrollpos = currentScrollPos;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -40,27 +40,25 @@
|
||||||
|
|
||||||
{% block fixedMobileBarJS %}
|
{% block fixedMobileBarJS %}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
var prevScrollpos = window.pageYOffset;
|
||||||
var prevScrollpos = window.pageYOffset;
|
window.onscroll = function () {
|
||||||
window.onscroll = function () {
|
var currentScrollPos = window.pageYOffset;
|
||||||
var currentScrollPos = window.pageYOffset;
|
if (prevScrollpos > currentScrollPos) {
|
||||||
if (prevScrollpos > currentScrollPos) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
}
|
||||||
}
|
else if (currentScrollPos <= 125) {
|
||||||
else if (currentScrollPos <= 125) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
|
||||||
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
|
||||||
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
|
||||||
document.getElementById("navbar").classList.add("shadow");
|
|
||||||
}
|
|
||||||
prevScrollpos = currentScrollPos;
|
|
||||||
}
|
}
|
||||||
});
|
else {
|
||||||
|
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
||||||
|
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
||||||
|
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
||||||
|
document.getElementById("navbar").classList.add("shadow");
|
||||||
|
}
|
||||||
|
prevScrollpos = currentScrollPos;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,6 @@
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script defer src="/assets/js/changelog.js?v=54"></script>
|
<script src="/assets/js/changelog.js?v=54"></script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -1,8 +1,6 @@
|
||||||
{{p.embed_url | safe}}
|
{{p.embed_url | safe}}
|
||||||
<script defer src="/assets/js/twitter.js" charset="utf-8">
|
<script src="/assets/js/twitter.js" charset="utf-8">
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
document.getElementById('twitter-widget-0').setAttribute('sandbox','')
|
||||||
document.getElementById('twitter-widget-0').setAttribute('sandbox','')
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
|
@ -1,8 +1,6 @@
|
||||||
{{p.embed_url | safe}}
|
{{p.embed_url | safe}}
|
||||||
<script defer src="https://platform.twitter.com/widgets.js" charset="utf-8">
|
<script src="https://platform.twitter.com/widgets.js" charset="utf-8">
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
document.getElementById('twitter-widget-0').setAttribute('sandbox','')
|
||||||
document.getElementById('twitter-widget-0').setAttribute('sandbox','')
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
|
@ -84,7 +84,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script defer src="/assets/js/emoji_modal.js?v=128"></script>
|
<script src="/assets/js/emoji_modal.js?v=128"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
a.emojitab {
|
a.emojitab {
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
{% extends "default.html" %}
|
{% extends "default.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
function removeFollower(event, username) {
|
||||||
function removeFollower(event, username) {
|
post_toast('/remove_follow/' + username);
|
||||||
post_toast('/remove_follow/' + username);
|
let table = document.getElementById("followers-table");
|
||||||
let table = document.getElementById("followers-table");
|
table.removeChild(event.target.parentElement.parentElement);
|
||||||
table.removeChild(event.target.parentElement.parentElement);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<pre>
|
<pre>
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
{% extends "default.html" %}
|
{% extends "default.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
function removeFollower(event, username) {
|
||||||
function removeFollower(event, username) {
|
post_toast('/unfollow/' + username);
|
||||||
post_toast('/unfollow/' + username);
|
let table = document.getElementById("followers-table");
|
||||||
let table = document.getElementById("followers-table");
|
table.removeChild(event.target.parentElement.parentElement);
|
||||||
table.removeChild(event.target.parentElement.parentElement);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<pre>
|
<pre>
|
||||||
|
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script defer src="/assets/js/gif_modal.js?v=54"></script>
|
<script src="/assets/js/gif_modal.js?v=54"></script>
|
||||||
|
|
|
@ -218,7 +218,7 @@
|
||||||
function formkey() {return '{{v.formkey}}';}
|
function formkey() {return '{{v.formkey}}';}
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script defer src="/assets/js/header.js?v=54"></script>
|
<script src="/assets/js/header.js?v=54"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.notif-count {
|
.notif-count {
|
||||||
|
|
|
@ -122,15 +122,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
var clipboard = new ClipboardJS('.copy-link');
|
||||||
var clipboard = new ClipboardJS('.copy-link');
|
clipboard.on('success', function(e) {
|
||||||
clipboard.on('success', function(e) {
|
var myToast = new bootstrap.Toast(document.getElementById('toast-success'));
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-success'));
|
myToast.show();
|
||||||
myToast.show();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function formkey() {return '{{v.formkey}}';}
|
function formkey() {return '{{v.formkey}}';}
|
||||||
|
|
|
@ -6,41 +6,39 @@
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
block_user=function() {
|
||||||
block_user=function() {
|
|
||||||
|
|
||||||
var exileForm = document.getElementById("exile-form");
|
var exileForm = document.getElementById("exile-form");
|
||||||
|
|
||||||
var usernameField = document.getElementById("exile-username");
|
var usernameField = document.getElementById("exile-username");
|
||||||
|
|
||||||
var isValidUsername = usernameField.checkValidity();
|
var isValidUsername = usernameField.checkValidity();
|
||||||
|
|
||||||
username = usernameField.value;
|
username = usernameField.value;
|
||||||
|
|
||||||
if (isValidUsername) {
|
if (isValidUsername) {
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open("post", "/settings/block");
|
xhr.open("post", "/settings/block");
|
||||||
xhr.withCredentials=true;
|
xhr.withCredentials=true;
|
||||||
f=new FormData();
|
f=new FormData();
|
||||||
f.append("username", username);
|
f.append("username", username);
|
||||||
f.append("formkey", formkey());
|
f.append("formkey", formkey());
|
||||||
xhr.onload=function(){
|
xhr.onload=function(){
|
||||||
if (xhr.status<300) {
|
if (xhr.status<300) {
|
||||||
location.reload(true);
|
location.reload(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||||
myToast.hide();
|
myToast.hide();
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||||
myToast.show();
|
myToast.show();
|
||||||
document.getElementById("toast-error-message").textContent = "Error. Please try again later.";
|
document.getElementById("toast-error-message").textContent = "Error. Please try again later.";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
xhr.send(f)
|
|
||||||
}
|
}
|
||||||
|
xhr.send(f)
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
@ -38,15 +38,12 @@
|
||||||
</div>
|
</div>
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
const flip = (e) => {
|
||||||
const flip = (e) => {
|
e.preventDefault();
|
||||||
e.preventDefault();
|
document.getElementsByTagName("body")[0].setAttribute("style", "-moz-transform: scale(-1, -1);-o-transform: scale(-1, -1);-webkit-transform: scale(-1, -1);transform: scale(-1, -1);");
|
||||||
document.getElementsByTagName("body")[0].setAttribute("style", "-moz-transform: scale(-1, -1);-o-transform: scale(-1, -1);-webkit-transform: scale(-1, -1);transform: scale(-1, -1);");
|
};
|
||||||
};
|
|
||||||
|
|
||||||
document.getElementById("submit-btn").onclick = flip;
|
document.getElementById("submit-btn").onclick = flip;
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -146,12 +146,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
<script defer src="/assets/js/signup.js?v=63"></script>
|
<script src="/assets/js/signup.js?v=63"></script>
|
||||||
|
|
||||||
{% if hcaptcha %}
|
{% if hcaptcha %}
|
||||||
<script defer src="https://hcaptcha.com/1/api.js"></script>
|
<script src="https://hcaptcha.com/1/api.js"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -4,27 +4,25 @@
|
||||||
|
|
||||||
{% block fixedMobileBarJS %}
|
{% block fixedMobileBarJS %}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
var prevScrollpos = window.pageYOffset;
|
||||||
var prevScrollpos = window.pageYOffset;
|
window.onscroll = function () {
|
||||||
window.onscroll = function () {
|
var currentScrollPos = window.pageYOffset;
|
||||||
var currentScrollPos = window.pageYOffset;
|
if (prevScrollpos > currentScrollPos) {
|
||||||
if (prevScrollpos > currentScrollPos) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
}
|
||||||
}
|
else if (currentScrollPos <= 125) {
|
||||||
else if (currentScrollPos <= 125) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
|
||||||
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
|
||||||
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
|
||||||
document.getElementById("navbar").classList.add("shadow");
|
|
||||||
}
|
|
||||||
prevScrollpos = currentScrollPos;
|
|
||||||
}
|
}
|
||||||
});
|
else {
|
||||||
|
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
||||||
|
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
||||||
|
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
||||||
|
document.getElementById("navbar").classList.add("shadow");
|
||||||
|
}
|
||||||
|
prevScrollpos = currentScrollPos;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -4,27 +4,25 @@
|
||||||
|
|
||||||
{% block fixedMobileBarJS %}
|
{% block fixedMobileBarJS %}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
var prevScrollpos = window.pageYOffset;
|
||||||
var prevScrollpos = window.pageYOffset;
|
window.onscroll = function () {
|
||||||
window.onscroll = function () {
|
var currentScrollPos = window.pageYOffset;
|
||||||
var currentScrollPos = window.pageYOffset;
|
if (prevScrollpos > currentScrollPos) {
|
||||||
if (prevScrollpos > currentScrollPos) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
}
|
||||||
}
|
else if (currentScrollPos <= 125) {
|
||||||
else if (currentScrollPos <= 125) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
|
||||||
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
|
||||||
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
|
||||||
document.getElementById("navbar").classList.add("shadow");
|
|
||||||
}
|
|
||||||
prevScrollpos = currentScrollPos;
|
|
||||||
}
|
}
|
||||||
});
|
else {
|
||||||
|
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
||||||
|
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
||||||
|
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
||||||
|
document.getElementById("navbar").classList.add("shadow");
|
||||||
|
}
|
||||||
|
prevScrollpos = currentScrollPos;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -33,5 +33,5 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block pagenav %}
|
{% block pagenav %}
|
||||||
<script defer src="/assets/js/userpage.js?v=72"></script>
|
<script src="/assets/js/userpage.js?v=72"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -4,27 +4,25 @@
|
||||||
|
|
||||||
{% block fixedMobileBarJS %}
|
{% block fixedMobileBarJS %}
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load",function(event) {
|
var prevScrollpos = window.pageYOffset;
|
||||||
var prevScrollpos = window.pageYOffset;
|
window.onscroll = function () {
|
||||||
window.onscroll = function () {
|
var currentScrollPos = window.pageYOffset;
|
||||||
var currentScrollPos = window.pageYOffset;
|
if (prevScrollpos > currentScrollPos) {
|
||||||
if (prevScrollpos > currentScrollPos) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
}
|
||||||
}
|
else if (currentScrollPos <= 125) {
|
||||||
else if (currentScrollPos <= 125) {
|
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "48px";
|
document.getElementById("navbar").classList.remove("shadow");
|
||||||
document.getElementById("navbar").classList.remove("shadow");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
|
||||||
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
|
||||||
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
|
||||||
document.getElementById("navbar").classList.add("shadow");
|
|
||||||
}
|
|
||||||
prevScrollpos = currentScrollPos;
|
|
||||||
}
|
}
|
||||||
});
|
else {
|
||||||
|
document.getElementById("fixed-bar-mobile").style.top = "-48px";
|
||||||
|
document.getElementById("dropdownMenuSortBy").classList.remove('show');
|
||||||
|
document.getElementById("dropdownMenuFrom").classList.remove('show');
|
||||||
|
document.getElementById("navbar").classList.add("shadow");
|
||||||
|
}
|
||||||
|
prevScrollpos = currentScrollPos;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue