summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/html.c b/html.c
index 559d139..eb4ab1f 100644
--- a/html.c
+++ b/html.c
@@ -924,6 +924,7 @@ static xs_html *html_user_body(snac *user, int read_only)
924 xs_html_raw("✔ "), 924 xs_html_raw("✔ "),
925 xs_html_tag("a", 925 xs_html_tag("a",
926 xs_html_attr("rel", "me"), 926 xs_html_attr("rel", "me"),
927 xs_html_attr("target", "_blank"),
927 xs_html_attr("href", v), 928 xs_html_attr("href", v),
928 xs_html_text(v))); 929 xs_html_text(v)));
929 } 930 }
@@ -960,6 +961,23 @@ static xs_html *html_user_body(snac *user, int read_only)
960 snac_metadata); 961 snac_metadata);
961 } 962 }
962 963
964 const char *latitude = xs_dict_get_def(user->config, "latitude", "");
965 const char *longitude = xs_dict_get_def(user->config, "longitude", "");
966
967 if (*latitude && *longitude) {
968 xs *label = xs_fmt(L("%s,%s"), latitude, longitude);
969 xs *url = xs_fmt(L("https://openstreetmap.org/search?query=%s,%s"),
970 latitude, longitude);
971
972 xs_html_add(top_user,
973 xs_html_tag("p",
974 xs_html_text(L("Location: ")),
975 xs_html_tag("a",
976 xs_html_attr("href", url),
977 xs_html_attr("target", "_blank"),
978 xs_html_text(label))));
979 }
980
963 if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) { 981 if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) {
964 xs *fwers = follower_list(user); 982 xs *fwers = follower_list(user);
965 xs *fwing = following_list(user); 983 xs *fwing = following_list(user);