Heyuri / kokonotsuba

Heyuri's BBS software
Other
23 stars 14 forks source link

More characters of posts in management panel #112

Closed kaguy4 closed 3 months ago

kaguy4 commented 3 months ago

I want to do it like this: Load all text of posts, but attach it a CSS like this (got it from ChatGPT, there may be a better CSS approach):

width: 10ch; /* Limit the width to the first 10 characters */
overflow: hidden; /* Hide overflowed text */
white-space: nowrap; /* Prevent text from wrapping to the next line */
text-overflow: ellipsis; /* Add ellipsis if text overflows */

So only 10 characters show up by default. We can then add some magic code to admin.js file that would remove CSS from the tag , viewing full post. Clicking it once again would bring back the CSS and make it truncated.

kaguy4 commented 3 months ago

done by https://github.com/Heyuri/kokonotsuba/commit/9d6ac3a00f724e633ddd363d6bb807b3cb0ee5df