web: make whole row of search results clickable
No longer allow searching by tag by clicking on chiclet
This commit is contained in:
@@ -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() {
|
||||
"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,
|
||||
})
|
||||
]
|
||||
a![match tag.as_str() {
|
||||
"attachment" => span![classes, style, "📎"],
|
||||
"replied" => span![classes, style, i![C!["fa-solid", "fa-reply"]]],
|
||||
_ => span![classes, style, &tag],
|
||||
},]
|
||||
})
|
||||
}
|
||||
|
||||
@@ -234,10 +222,10 @@ fn view_search_results(
|
||||
],
|
||||
td![
|
||||
C!["subject"],
|
||||
tags_chiclet(&tags, false),
|
||||
" ",
|
||||
a![
|
||||
C!["has-text-light", "text"],
|
||||
tags_chiclet(&tags, false),
|
||||
" ",
|
||||
C!["has-text-light", "text", "subject-link"],
|
||||
attrs! {
|
||||
At::Href => urls::thread(&tid)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user