fix: overflowing images on /world

This commit is contained in:
Julian Lam
2026-02-19 11:49:43 -05:00
parent 824a9b77f7
commit 438b4f6226

View File

@@ -19,7 +19,7 @@ define('forum/world', [
});
sort.handleSort('categoryTopicSort', 'world');
handleImages();
handleButtons();
handleHelp();
@@ -30,7 +30,6 @@ define('forum/world', [
socket.removeListener('event:new_post', onNewPost);
});
// Add label to sort
const sortLabelEl = document.getElementById('sort-label');
const sortOptionsEl = document.getElementById('sort-options');
@@ -76,6 +75,7 @@ define('forum/world', [
const listEl = document.getElementById('world-feed');
$(listEl).append(html);
html.find('.timeago').timeago();
handleImages();
callback();
});
});
@@ -204,6 +204,10 @@ define('forum/world', [
});
}
function handleImages() {
$('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid');
}
function updateDropdowns(modified_cids, state) {
modified_cids.forEach(function (cid) {
const category = $('[data-cid="' + cid + '"]');
@@ -229,6 +233,7 @@ define('forum/world', [
}
feedEl.prepend(...html);
handleImages();
}
return World;