XF 2.0 Latest post widget

JoyFreak

Well-known member
As seen in screenshot..

1. I would like to add a bar between each latest post.
2. Make the thread title on one line and add '...' to the end, if the title is long.

How do I do this? Any help is appreciated, thank you!

Untitled.webp
 
You can use CSS for that. Like for ...
text-overflow: ellipsis !important;
max-width: 50ch;
white-space: nowrap;
overflow: hidden;
Apply it on title class of that . And add border-bottom below to it

You need to select the limit of char according to your need
 
So with the characters this is as far as I have got to:

Code:
.block[data-widget-definition="new_posts"] {
    text-overflow: ellipsis !important;
    max-width: 50ch;
    white-space: nowrap;
    overflow: hidden;
}

Which produces this:
latest.webp

However, I still want the text within the block and add '...' at the end to show there is more.
 
So, this is what I have so far:
Code:
.block[data-widget-definition="new_posts"] .contentRow-main {
    text-overflow: ellipsis !important;
    max-width: 50ch;
    white-space: nowrap;
    overflow: hidden;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 5px;
}

Produces this:
latest1.webp

However:
1. I only wanted the one line for the thread title and not the thread date but cannot seem to find the title class for it.
2. I wanted the "..." to be included in the thread title and is clickable as well.
3. I wanted the border line to go under the avatar too and not cut off just before.
4. I did not want the line to show under the 5th latest post.
 
Back
Top Bottom