aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/html.c b/html.c
index a3d2c61..4484fc2 100644
--- a/html.c
+++ b/html.c
@@ -1015,6 +1015,20 @@ static xs_html *html_instance_body(void)
xs_html_text(handle)))));
}
+ /* BEGIN neighborhood */
+ if (xs_type(xs_dict_get(srv_config, "neighborhood")) == XSTYPE_LIST) {
+ xs *nurl = xs_fmt("%s/neighborhood", srv_baseurl);
+ xs_html_add(dl,
+ xs_html_tag("di",
+ xs_html_tag("dt",
+ xs_html_text(L("Neighborhood"))),
+ xs_html_tag("dd",
+ xs_html_tag("a",
+ xs_html_attr("href", nurl),
+ xs_html_text(L("View federated neighborhood feed"))))));
+ }
+ /* END neighborhood */
+
return body;
}
@@ -1207,6 +1221,18 @@ static xs_html *html_user_body(snac *user, int read_only)
xs *people_url = xs_fmt("%s/people", user->actor);
xs *instance_url = xs_fmt("%s/instance", user->actor);
+ /* BEGIN neighborhood */
+ xs_html *neighborhood_nav = xs_html_text("");
+ if (xs_type(xs_dict_get(srv_config, "neighborhood")) == XSTYPE_LIST) {
+ xs *nurl = xs_fmt("%s/neighborhood", srv_baseurl);
+ neighborhood_nav = xs_html_container(
+ xs_html_text(" - "),
+ xs_html_tag("a",
+ xs_html_attr("href", nurl),
+ xs_html_text(L("neighborhood"))));
+ }
+ /* END neighborhood */
+
xs_html_add(top_nav,
xs_html_tag("a",
xs_html_attr("href", user->actor),
@@ -1229,6 +1255,7 @@ static xs_html *html_user_body(snac *user, int read_only)
xs_html_tag("a",
xs_html_attr("href", instance_url),
xs_html_text(L("instance"))),
+ neighborhood_nav,
xs_html_text(" "),
xs_html_tag("form",
xs_html_attr("style", "display: inline!important"),