diff options
| author | 2024-05-08 04:15:36 +0200 | |
|---|---|---|
| committer | 2024-05-08 04:15:36 +0200 | |
| commit | fa8b40192757a2022da1cc945e4d0c3c1dc014b2 (patch) | |
| tree | 2fc500657ac8ae78eac034044b7ef7e746ae6302 | |
| parent | Added a title to the instance timeline. (diff) | |
| download | penes-snac2-fa8b40192757a2022da1cc945e4d0c3c1dc014b2.tar.gz penes-snac2-fa8b40192757a2022da1cc945e4d0c3c1dc014b2.tar.xz penes-snac2-fa8b40192757a2022da1cc945e4d0c3c1dc014b2.zip | |
More HTML simplification.
| -rw-r--r-- | html.c | 13 |
1 files changed, 3 insertions, 10 deletions
| @@ -509,7 +509,7 @@ xs_html *html_instance_head(void) | |||
| 509 | } | 509 | } |
| 510 | 510 | ||
| 511 | 511 | ||
| 512 | static xs_html *html_instance_body(char *title) | 512 | static xs_html *html_instance_body(void) |
| 513 | { | 513 | { |
| 514 | char *host = xs_dict_get(srv_config, "host"); | 514 | char *host = xs_dict_get(srv_config, "host"); |
| 515 | char *sdesc = xs_dict_get(srv_config, "short_description"); | 515 | char *sdesc = xs_dict_get(srv_config, "short_description"); |
| @@ -560,13 +560,6 @@ static xs_html *html_instance_body(char *title) | |||
| 560 | xs_html_text(handle))))); | 560 | xs_html_text(handle))))); |
| 561 | } | 561 | } |
| 562 | 562 | ||
| 563 | if (title != NULL) { | ||
| 564 | xs_html_add(body, | ||
| 565 | xs_html_tag("h2", | ||
| 566 | xs_html_attr("class", "snac-header"), | ||
| 567 | xs_html_text(title))); | ||
| 568 | } | ||
| 569 | |||
| 570 | return body; | 563 | return body; |
| 571 | } | 564 | } |
| 572 | 565 | ||
| @@ -2023,7 +2016,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, | |||
| 2023 | } | 2016 | } |
| 2024 | else { | 2017 | else { |
| 2025 | head = html_instance_head(); | 2018 | head = html_instance_head(); |
| 2026 | body = html_instance_body(title); | 2019 | body = html_instance_body(); |
| 2027 | } | 2020 | } |
| 2028 | 2021 | ||
| 2029 | xs_html *html = xs_html_tag("html", | 2022 | xs_html *html = xs_html_tag("html", |
| @@ -2034,7 +2027,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, | |||
| 2034 | xs_html_add(body, | 2027 | xs_html_add(body, |
| 2035 | html_top_controls(user)); | 2028 | html_top_controls(user)); |
| 2036 | 2029 | ||
| 2037 | if (user && title) { | 2030 | if (title) { |
| 2038 | xs_html_add(body, | 2031 | xs_html_add(body, |
| 2039 | xs_html_tag("h2", | 2032 | xs_html_tag("h2", |
| 2040 | xs_html_attr("class", "snac-header"), | 2033 | xs_html_attr("class", "snac-header"), |