Improve density on mobile.

This commit is contained in:
Bill Thiede 2023-11-14 21:33:09 -08:00
parent da15ef0f15
commit a2664473c8
3 changed files with 28 additions and 2 deletions

View File

@ -9,3 +9,6 @@ pub struct SearchResult {
pub results_per_page: usize, pub results_per_page: usize,
pub total: usize, pub total: usize,
} }
#[derive(Serialize, Deserialize, Debug)]
pub struct Message {}

View File

@ -91,6 +91,27 @@ input, .input {
input::placeholder, .input::placeholder{ input::placeholder, .input::placeholder{
color: #555; 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;
}
</style> </style>
</head> </head>

View File

@ -504,20 +504,22 @@ fn view_mobile_search_results(query: &str, search_results: &shared::SearchResult
*/ */
let tid = r.thread.clone(); let tid = r.thread.clone();
div![ div![
C!["row"],
div![ div![
C!["subject"], C!["subject"],
&r.subject, &r.subject,
ev(Ev::Click, move |_| Msg::ShowPrettyRequest(tid)), ev(Ev::Click, move |_| Msg::ShowPrettyRequest(tid)),
], ],
div![ div![
span![C!["from"], pretty_authors(&r.authors)], span![C!["from", "is-size-7"], pretty_authors(&r.authors)],
span![C!["tags"], tags_chiclet(&r.tags, true)], span![C!["tags", "is-size-7"], tags_chiclet(&r.tags, true)],
], ],
span![C!["date"], &r.date_relative], span![C!["date"], &r.date_relative],
] ]
}); });
let first = search_results.page * search_results.results_per_page; let first = search_results.page * search_results.results_per_page;
div![ div![
C!["search-results"],
h1!["Search results"], h1!["Search results"],
view_search_pager(first, summaries.len(), search_results.total), view_search_pager(first, summaries.len(), search_results.total),
rows, rows,