4444444444444443333333333333

This commit is contained in:
2026-08-19 22:22:10 +02:00
parent 53417063e4
commit e793b50348
7 changed files with 43 additions and 19 deletions

View File

@@ -2200,7 +2200,8 @@ class CommentSystem {
}
}
const bannerStyle = (comment.banner_file && comment.banner_file !== 'null')
const bannerEnabled = window.f0ckCommentBannerEnabled !== false && window.f0ckSession?.comment_banner_enabled !== false;
const bannerStyle = (bannerEnabled && comment.banner_file && comment.banner_file !== 'null')
? `style="--author-banner: url('/a/${comment.banner_file}'); --author-banner-position: ${comment.banner_position === 'center' ? 'center top' : (comment.banner_position || 'center top')}; --author-banner-size: ${comment.banner_size || 'cover'}; --author-banner-repeat: ${comment.banner_repeat || 'repeat'};"`
: '';

View File

@@ -846,6 +846,13 @@ window.cancelAnimFrame = (function () {
if (userToggle && userMenu) {
userToggle.addEventListener('click', (e) => {
e.stopPropagation();
if (e.target.closest('.nav-avatar-img')) {
const username = window.f0ckSession?.user;
if (username) {
window.location.href = `/user/${username.toLowerCase()}`;
return;
}
}
const opening = !userMenu.classList.contains('show');
userMenu.classList.toggle('show');
userToggle.classList.toggle('is-active', opening);
@@ -9265,6 +9272,13 @@ document.addEventListener("DOMContentLoaded", function () {
var menu = document.getElementById(menuId);
if (btn && menu) {
btn.addEventListener('click', function (e) {
if (e.target.closest('.nav-avatar-img')) {
const username = window.f0ckSession?.user;
if (username) {
window.location.href = `/user/${username.toLowerCase()}`;
return;
}
}
if (window.innerWidth <= 700) {
e.preventDefault();
menu.classList.toggle('show-mobile');