From facea2326e2f818de9d23c49a340c9120ccad102 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Tue, 27 Feb 2024 09:46:23 -0800 Subject: [PATCH] web: make from and date area clickable on search results page --- web/index.html | 10 ++++++++++ web/src/view/mod.rs | 21 ++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/web/index.html b/web/index.html index 586d4c1..906fcd4 100644 --- a/web/index.html +++ b/web/index.html @@ -220,11 +220,21 @@ } .search-results .row .from { + display: inline-block; + width: 100%; + } + + .search-results .from a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .search-results .from a { + display: inline-block; + width: 100%; + } + .search-results .row .tag { height: 1.5em; padding-left: .5em; diff --git a/web/src/view/mod.rs b/web/src/view/mod.rs index b125dcd..6acf3fe 100644 --- a/web/src/view/mod.rs +++ b/web/src/view/mod.rs @@ -163,8 +163,14 @@ fn view_search_results( ]], td![ C!["from"], - pretty_authors(&r.authors), - IF!(r.total>1 => small![" ", r.total.to_string()]), + a![ + C!["has-text-light", "text"], + attrs! { + At::Href => urls::thread(&tid) + }, + pretty_authors(&r.authors), + IF!(r.total>1 => small![" ", r.total.to_string()]), + ] ], td![ C!["subject"], @@ -178,7 +184,16 @@ fn view_search_results( &r.subject, ] ], - td![C!["date"], datetime] + td![ + C!["date"], + a![ + C!["has-text-light", "text"], + attrs! { + At::Href => urls::thread(&tid) + }, + datetime + ] + ] ] });