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'); sort.handleSort('categoryTopicSort', 'world');
handleImages();
handleButtons(); handleButtons();
handleHelp(); handleHelp();
@@ -30,7 +30,6 @@ define('forum/world', [
socket.removeListener('event:new_post', onNewPost); socket.removeListener('event:new_post', onNewPost);
}); });
// Add label to sort // Add label to sort
const sortLabelEl = document.getElementById('sort-label'); const sortLabelEl = document.getElementById('sort-label');
const sortOptionsEl = document.getElementById('sort-options'); const sortOptionsEl = document.getElementById('sort-options');
@@ -76,6 +75,7 @@ define('forum/world', [
const listEl = document.getElementById('world-feed'); const listEl = document.getElementById('world-feed');
$(listEl).append(html); $(listEl).append(html);
html.find('.timeago').timeago(); html.find('.timeago').timeago();
handleImages();
callback(); 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) { function updateDropdowns(modified_cids, state) {
modified_cids.forEach(function (cid) { modified_cids.forEach(function (cid) {
const category = $('[data-cid="' + cid + '"]'); const category = $('[data-cid="' + cid + '"]');
@@ -229,6 +233,7 @@ define('forum/world', [
} }
feedEl.prepend(...html); feedEl.prepend(...html);
handleImages();
} }
return World; return World;