From dbdcc2a8d9ff44defdab65f0391e76a7ad64c513 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Thu, 5 May 2022 18:40:27 +0000 Subject: [PATCH] HTML and CSS for search results FossilOrigin-Name: fa8a9ca2c0e0daa31dfb4d412224937d6249516d828c0823731b823463385185 --- dist/treebird20.css | 33 +++++++++++++++++++++++++++++++-- src/account.c | 6 ++++++ static/account_stub.html | 20 +++++++++++++++++++- static/search.html | 4 +++- 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/dist/treebird20.css b/dist/treebird20.css index 3d4b57c..56542b3 100644 --- a/dist/treebird20.css +++ b/dist/treebird20.css @@ -587,9 +587,9 @@ svg.in-reply-to-icon { font-style: italic; text-decoration: none; - margin: 0 4px 0 6px; font-size: 14px; - padding-top: 1px; + vertical-align: middle; + padding-left: 4px; } .status .poster-stats @@ -792,6 +792,35 @@ svg.in-reply-to-icon height: 256px; } +.account-stub-info +{ + padding-left: 4px; +} + +.account-stub +{ + padding: 4px 4px 0; + width: 100%; +} + +.account-stub-top, +.account-stub-bottom +{ + display: block; +} + +.account-stub-bottom +{ + color: #606060; + margin-top: 2px; + font-size: 12px; +} + +.search-results .account-stub:not(:last-child) +{ + border-bottom: 1px solid #cacaca; +} + .account { position: relative; diff --git a/src/account.c b/src/account.c index 162d0ff..7378dde 100644 --- a/src/account.c +++ b/src/account.c @@ -306,6 +306,12 @@ char* construct_account(mastodont_t* api, char* acct_html; size_t s = easprintf(&acct_html, data_account_stub_html, + config_url_prefix, + acct->acct, + acct->avatar, + config_url_prefix, + acct->acct, + acct->display_name, acct->acct); if (size) *size = s; diff --git a/static/account_stub.html b/static/account_stub.html index 042e93e..6ae6343 100644 --- a/static/account_stub.html +++ b/static/account_stub.html @@ -1 +1,19 @@ -%s
+ + + + + +
+ +
diff --git a/static/search.html b/static/search.html index c9fefd5..5b2c3aa 100644 --- a/static/search.html +++ b/static/search.html @@ -12,4 +12,6 @@ -%s +
+ %s +