fix: world page 'see more' bugs

This commit is contained in:
Julian Lam
2026-03-04 13:08:22 -05:00
parent 9e69b9ad2d
commit cc733631d2
2 changed files with 4 additions and 3 deletions

View File

@@ -218,6 +218,7 @@ define('forum/world', [
feedEl.querySelectorAll('[component="post/content"]').forEach((el) => { feedEl.querySelectorAll('[component="post/content"]').forEach((el) => {
if (el.clientHeight < el.scrollHeight - 1) { if (el.clientHeight < el.scrollHeight - 1) {
el.parentNode.querySelector('[component="show/more"]').classList.remove('hidden'); el.parentNode.querySelector('[component="show/more"]').classList.remove('hidden');
el.classList.toggle('clamp-fade-6', true);
} }
}); });

View File

@@ -54,12 +54,12 @@
</div> </div>
</div> </div>
<div component="post/content" class="content text-sm text-break position-relative line-clamp-6 clamp-fade-6"> <div component="post/content" class="content text-sm text-break position-relative line-clamp-6">
<a href="{config.relative_path}/post/{./pid}" class="stretched-link"></a> <a href="{config.relative_path}/post/{./pid}" class="stretched-link"></a>
{./content} {./content}
</div> </div>
<div class="position-relative hover-visible"> <div class="position-relative">
<button component="show/more" class="btn btn-light btn-sm rounded-pill position-absolute start-50 translate-middle-x bottom-0 z-1 hidden ff-secondary">[[world:see-more]]</button> <button component="show/more" class="btn btn-link btn-sm fw-semibold position-absolute start-50 translate-middle-x bottom-0 z-1 hidden ff-secondary text-secondary">[[world:see-more]]</button>
</div> </div>
<hr class="my-2"/> <hr class="my-2"/>
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">