Interactions styling

FossilOrigin-Name: a2438b899b6f9b52dae1eb8a4f6436ee6aa03e977bb73184531f59e934d7482c
This commit is contained in:
me@ow.nekobit.net 2022-04-22 19:40:18 +00:00
parent 05fde4a8d3
commit 8d5a38212d
5 changed files with 50 additions and 5 deletions

View file

@ -30,8 +30,6 @@ $(PAGES_DIR)/index.chtml: $(PAGES_DIR)/index.html
./filec $< data_index_html > $@
$(PAGES_DIR)/status.chtml: $(PAGES_DIR)/status.html
./filec $< data_status_html > $@
$(PAGES_DIR)/config.chtml: $(PAGES_DIR)/config.html
./filec $< data_config_html > $@
$(PAGES_DIR)/account.chtml: $(PAGES_DIR)/account.html
./filec $< data_account_html > $@
$(PAGES_DIR)/login.chtml: $(PAGES_DIR)/login.html

43
dist/treebird20.css vendored
View file

@ -703,6 +703,49 @@ svg.in-reply-to-icon
padding-left: 15px;
}
/*********************
* Interactions *
*********************/
.status-interactions
{
border-bottom: 1px solid #ddbfbf;
}
.status-interactions-labels
{
display: inline-block;
vertical-align: middle;
color: #cacaca;
}
.status-interactions-labels .header-btn
{
padding: 8px 12px;
}
.status-interactions-labels .header-btn .btn-content
{
text-align: left;
color: #606060;
font-weight: bold;
}
.status-interactions .status-interactions-pfps
{
display: inline-block;
vertical-align: middle;
margin: 2px;
}
.status-interactions .pfp-interaction
{
border-radius: 50%;
width: 24px;
height: 24px;
margin: 1px;
object-fit: cover;
}
/**********************
* Profiles *
**********************/

View file

@ -43,7 +43,7 @@
#include "../static/status_interactions.chtml"
#include "../static/status_interaction_profile.chtml"
#define ACCOUNT_INTERACTIONS_LIMIT 9
#define ACCOUNT_INTERACTIONS_LIMIT 11
#define NUM_STR "%u"
struct status_args
@ -224,6 +224,10 @@ char* construct_status_interaction_profiles(struct mstdnt_account* reblogs,
size_t* ret_size)
{
size_t arr_size = reblogs_len + favourites_len;
// Set a limit to interactions
if (arr_size > ACCOUNT_INTERACTIONS_LIMIT)
arr_size = ACCOUNT_INTERACTIONS_LIMIT;
struct interact_profile_args args = {
.reblogs = reblogs,
.reblogs_len = reblogs_len,
@ -442,8 +446,8 @@ char* construct_status(mastodont_t* api,
in_reply_to_str ? in_reply_to_str : "",
parse_content,
attachments ? attachments : "",
emoji_reactions ? emoji_reactions : "",
interactions_html ? interactions_html : "",
emoji_reactions ? emoji_reactions : "",
config_url_prefix,
status->id,
status->id,

View file

View file

@ -1 +1 @@
<img title="%s" class="pfp-compact-td" src="%s">
<img title="%s" class="pfp-interaction" src="%s">