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 style = style! {St::BackgroundColor=>hex};
|
||||||
let classes = C!["tag", IF!(is_mobile => "is-small")];
|
let classes = C!["tag", IF!(is_mobile => "is-small")];
|
||||||
let tag = tag.clone();
|
let tag = tag.clone();
|
||||||
a![
|
a![match tag.as_str() {
|
||||||
attrs! {
|
|
||||||
At::Href => urls::search(&format!("tag:{tag}"), 0)
|
|
||||||
},
|
|
||||||
match tag.as_str() {
|
|
||||||
"attachment" => span![classes, style, "📎"],
|
"attachment" => span![classes, style, "📎"],
|
||||||
"replied" => span![classes, style, i![C!["fa-solid", "fa-reply"]]],
|
"replied" => span![classes, style, i![C!["fa-solid", "fa-reply"]]],
|
||||||
_ => span![classes, style, &tag],
|
_ => 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![
|
td![
|
||||||
C!["subject"],
|
C!["subject"],
|
||||||
|
a![
|
||||||
tags_chiclet(&tags, false),
|
tags_chiclet(&tags, false),
|
||||||
" ",
|
" ",
|
||||||
a![
|
C!["has-text-light", "text", "subject-link"],
|
||||||
C!["has-text-light", "text"],
|
|
||||||
attrs! {
|
attrs! {
|
||||||
At::Href => urls::thread(&tid)
|
At::Href => urls::thread(&tid)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -235,8 +235,6 @@ input::placeholder,
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-results .row .checkbox {}
|
|
||||||
|
|
||||||
.search-results .row .summary {
|
.search-results .row .summary {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -248,16 +246,13 @@ input::placeholder,
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-results td.subject {}
|
|
||||||
|
|
||||||
.search-results .subject .tag {}
|
|
||||||
|
|
||||||
.search-results .subject .text {
|
.search-results .subject .text {
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-results .row .from {
|
.search-results .row .from {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user