mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 21:35:04 +00:00
More HTML work.
This commit is contained in:
parent
49bca7e273
commit
ab38029192
1 changed files with 8 additions and 6 deletions
14
html.c
14
html.c
|
@ -143,11 +143,13 @@ int login(snac *snac, char *headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
d_char *html_msg_icon(snac *snac, d_char *s, char *msg)
|
d_char *html_msg_icon(snac *snac, d_char *os, char *msg)
|
||||||
{
|
{
|
||||||
char *actor_id;
|
char *actor_id;
|
||||||
xs *actor = NULL;
|
xs *actor = NULL;
|
||||||
|
|
||||||
|
xs *s = xs_str_new(NULL);
|
||||||
|
|
||||||
if ((actor_id = xs_dict_get(msg, "attributedTo")) == NULL)
|
if ((actor_id = xs_dict_get(msg, "attributedTo")) == NULL)
|
||||||
actor_id = xs_dict_get(msg, "actor");
|
actor_id = xs_dict_get(msg, "actor");
|
||||||
|
|
||||||
|
@ -202,7 +204,7 @@ d_char *html_msg_icon(snac *snac, d_char *s, char *msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return s;
|
return xs_str_cat(os, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -480,7 +482,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int level)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s = xs_str_cat(s, "</div> <!-- e-content -->\n");
|
s = xs_str_cat(s, "</div>\n");
|
||||||
|
|
||||||
char *children = xs_dict_get(meta, "children");
|
char *children = xs_dict_get(meta, "children");
|
||||||
|
|
||||||
|
@ -507,10 +509,10 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int level)
|
||||||
left--;
|
left--;
|
||||||
}
|
}
|
||||||
|
|
||||||
s = xs_str_cat(s, "</div> <!-- snac-children -->\n");
|
s = xs_str_cat(s, "</div>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
s = xs_str_cat(s, "</div> <!-- post or child -->\n");
|
s = xs_str_cat(s, "</div>\n");
|
||||||
|
|
||||||
return xs_str_cat(os, s);
|
return xs_str_cat(os, s);
|
||||||
}
|
}
|
||||||
|
@ -551,7 +553,7 @@ d_char *html_timeline(snac *snac, char *list, int local)
|
||||||
s = html_entry(snac, s, msg, seen, 0);
|
s = html_entry(snac, s, msg, seen, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
s = xs_str_cat(s, "</div> <!-- snac-posts -->\n");
|
s = xs_str_cat(s, "</div>\n");
|
||||||
|
|
||||||
s = html_user_footer(snac, s);
|
s = html_user_footer(snac, s);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue