diff --git a/shared/src/lib.rs b/shared/src/lib.rs index d3a12e7..866479a 100644 --- a/shared/src/lib.rs +++ b/shared/src/lib.rs @@ -9,3 +9,6 @@ pub struct SearchResult { pub results_per_page: usize, pub total: usize, } + +#[derive(Serialize, Deserialize, Debug)] +pub struct Message {} diff --git a/web/index.html b/web/index.html index a04e1e1..b33b037 100644 --- a/web/index.html +++ b/web/index.html @@ -91,6 +91,27 @@ input, .input { input::placeholder, .input::placeholder{ color: #555; } + +.search-results .row { + border-bottom: 1px #444 solid; + padding-bottom: .5em; + padding-top: .5em; +} +.search-results .row .subject { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.search-results .row .from { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.search-results .row .tag { + height: 1.5em; + padding-left: .5em; + padding-right: .5em; +} diff --git a/web/src/lib.rs b/web/src/lib.rs index 37fb5d4..e7bbd4e 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -504,20 +504,22 @@ fn view_mobile_search_results(query: &str, search_results: &shared::SearchResult */ let tid = r.thread.clone(); div![ + C!["row"], div![ C!["subject"], &r.subject, ev(Ev::Click, move |_| Msg::ShowPrettyRequest(tid)), ], div![ - span![C!["from"], pretty_authors(&r.authors)], - span![C!["tags"], tags_chiclet(&r.tags, true)], + span![C!["from", "is-size-7"], pretty_authors(&r.authors)], + span![C!["tags", "is-size-7"], tags_chiclet(&r.tags, true)], ], span![C!["date"], &r.date_relative], ] }); let first = search_results.page * search_results.results_per_page; div![ + C!["search-results"], h1!["Search results"], view_search_pager(first, summaries.len(), search_results.total), rows,