This commit is contained in:
2026-08-19 23:15:22 +02:00
parent 11a4535ca9
commit 794e21c66f
3 changed files with 16 additions and 4 deletions

View File

@@ -550,8 +550,16 @@
const bannerEnabled = window.f0ckCommentBannerEnabled !== false && window.f0ckSession?.comment_banner_enabled !== false;
const bannerStyle = (bannerEnabled && c.banner_file && c.banner_file !== 'null')
? `style="--author-banner: url('/a/${c.banner_file}'); --author-banner-position: ${c.banner_position === 'center' ? 'center top' : (c.banner_position || 'center top')}; --author-banner-size: ${(c.banner_size && c.banner_size !== 'cover') ? c.banner_size : '100% auto'}; --author-banner-repeat: no-repeat;"`
let bannerFile = c.banner_file;
let bannerPos = c.banner_position;
let bannerSz = c.banner_size;
if (!bannerFile && window.f0ckSession && window.f0ckSession.id && (c.user_id === window.f0ckSession.id || c.username === window.f0ckSession.user)) {
bannerFile = window.f0ckSession.banner_file;
bannerPos = window.f0ckSession.banner_position;
bannerSz = window.f0ckSession.banner_size;
}
const bannerStyle = (bannerEnabled && bannerFile && bannerFile !== 'null')
? `style="--author-banner: url('/a/${bannerFile}'); --author-banner-position: ${bannerPos === 'center' ? 'center top' : (bannerPos || 'center top')}; --author-banner-size: ${(bannerSz && bannerSz !== 'cover') ? bannerSz : '100% auto'}; --author-banner-repeat: no-repeat;"`
: '';
return `