web: make whole row of search results clickable
No longer allow searching by tag by clicking on chiclet
This commit is contained in:
parent
7c5ef96ff0
commit
c314e3c798
@ -40,23 +40,11 @@ fn tags_chiclet(tags: &[String], is_mobile: bool) -> impl Iterator<Item = Node<M
|
||||
let style = style! {St::BackgroundColor=>hex};
|
||||
let classes = C!["tag", IF!(is_mobile => "is-small")];
|
||||
let tag = tag.clone();
|
||||
a![
|
||||
attrs! {
|
||||
At::Href => urls::search(&format!("tag:{tag}"), 0)
|
||||
},
|
||||
match tag.as_str() {
|
||||
a![match tag.as_str() {
|
||||
"attachment" => span![classes, style, "📎"],
|
||||
"replied" => span![classes, style, i![C!["fa-solid", "fa-reply"]]],
|
||||
_ => span![classes, style, &tag],
|
||||
},
|
||||
ev(Ev::Click, move |_| Msg::FrontPageRequest {
|
||||
query: format!("tag:{tag}"),
|
||||
after: None,
|
||||
before: None,
|
||||
first: None,
|
||||
last: None,
|
||||
})
|
||||
]
|
||||
},]
|
||||
})
|
||||
}
|
||||
|
||||
@ -234,10 +222,10 @@ fn view_search_results(
|
||||
],
|
||||
td![
|
||||
C!["subject"],
|
||||
a![
|
||||
tags_chiclet(&tags, false),
|
||||
" ",
|
||||
a![
|
||||
C!["has-text-light", "text"],
|
||||
C!["has-text-light", "text", "subject-link"],
|
||||
attrs! {
|
||||
At::Href => urls::thread(&tid)
|
||||
},
|
||||
|
||||
@ -235,8 +235,6 @@ input::placeholder,
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search-results .row .checkbox {}
|
||||
|
||||
.search-results .row .summary {
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
@ -248,16 +246,13 @@ input::placeholder,
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.search-results td.subject {}
|
||||
|
||||
.search-results .subject .tag {}
|
||||
|
||||
.search-results .subject .text {
|
||||
padding-left: 0.5rem;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search-results .row .from {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user