web: apply title wrapping on search results page
This commit is contained in:
parent
2b4c45be74
commit
5a0378948d
@ -273,6 +273,13 @@ fn search_results(
|
||||
tags.remove(idx);
|
||||
};
|
||||
let is_unread = unread_idx.is_some();
|
||||
let mut title_break = None;
|
||||
const TITLE_LENGTH_WRAP_LIMIT: usize = 40;
|
||||
for w in r.subject.split_whitespace() {
|
||||
if w.len() > TITLE_LENGTH_WRAP_LIMIT {
|
||||
title_break = Some(C!["break-all", "text-pretty"]);
|
||||
}
|
||||
}
|
||||
div![
|
||||
C![
|
||||
"flex",
|
||||
@ -315,7 +322,7 @@ fn search_results(
|
||||
attrs! {
|
||||
At::Href => urls::thread(&tid)
|
||||
},
|
||||
div![&r.subject],
|
||||
div![title_break, &r.subject],
|
||||
span![C!["text-xs"], pretty_authors(&r.authors)],
|
||||
div![
|
||||
C!["flex", "flex-wrap", "justify-between"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user