diff --git a/html.c b/html.c index 4f6ca19..c74c207 100644 --- a/html.c +++ b/html.c @@ -1302,11 +1302,13 @@ xs_str *html_timeline(snac *snac, const xs_list *list, int local, int skip, int d_char *html_people_list(snac *snac, d_char *os, d_char *list, const char *header, const char *t) { xs *s = xs_str_new(NULL); - xs *h = xs_fmt("

%s

\n", header); + xs *h = xs_fmt("

%s

\n", header); char *p, *actor_id; s = xs_str_cat(s, h); + s = xs_str_cat(s, "
\n"); + p = list; while (xs_list_iter(&p, &actor_id)) { xs *md5 = xs_md5_hex(actor_id, strlen(actor_id)); @@ -1394,6 +1396,8 @@ d_char *html_people_list(snac *snac, d_char *os, d_char *list, const char *heade } } + s = xs_str_cat(s, "
\n"); + return xs_str_cat(os, s); } @@ -1464,24 +1468,29 @@ xs_str *html_notifications(snac *snac) if (strcmp(v, n_time) > 0) { /* unseen notification */ if (stage == NHDR_NONE) { - xs *s1 = xs_fmt("

%s

\n", L("New")); + xs *s1 = xs_fmt("

%s

\n", L("New")); s = xs_str_cat(s, s1); + s = xs_str_cat(s, "
\n"); + stage = NHDR_NEW; } } else { /* already seen notification */ if (stage != NHDR_OLD) { - xs *s1 = xs_fmt("

%s

\n", L("Already seen")); + if (stage == NHDR_NEW) + s = xs_str_cat(s, "
\n"); + + xs *s1 = xs_fmt("

%s

\n", L("Already seen")); s = xs_str_cat(s, s1); + s = xs_str_cat(s, "
\n"); + stage = NHDR_OLD; } } - s = xs_str_cat(s, "
\n"); - const char *label = type; if (strcmp(type, "Create") == 0) @@ -1490,7 +1499,8 @@ xs_str *html_notifications(snac *snac) if (strcmp(type, "Update") == 0 && strcmp(utype, "Question") == 0) label = L("Finished poll"); - xs *s1 = xs_fmt("

%s by %s:

\n", + xs *s1 = xs_fmt("
\n" + "

%s by %s:

\n", label, actor_id, a_name); s = xs_str_cat(s, s1); @@ -1511,9 +1521,11 @@ xs_str *html_notifications(snac *snac) } if (stage == NHDR_NONE) { - xs *s1 = xs_fmt("

%s

\n", L("None")); - s = xs_str_cat(s, s1); + xs *s1 = xs_fmt("

%s

\n", L("None")); + s = xs_str_cat(s, s1); } + else + s = xs_str_cat(s, "
\n"); s = html_user_footer(s);