summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-08-14 18:02:20 +0200
committerdefault <nobody@localhost>2023-08-14 18:02:20 +0200
commit3f7e3c1d81fef35eada041b7d901974129238dce (patch)
tree1b5be2a1b9eefe9f76ac95a757eab536a004d04e /utils.c
parent16c14060a81d4f7ed6be0bf5f95ca3c77733c18f (diff)
Unify the instance description text.
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/utils.c b/utils.c
index e9d1447..bb15157 100644
--- a/utils.c
+++ b/utils.c
@@ -62,24 +62,27 @@ static const char *default_css =
".snac-poll-result { margin-left: auto; margin-right: auto; }\n"
;
+const char *snac_blurb =
+ "<p><b>%host%</b> is a <a href=\"https:/"
+ "/en.wikipedia.org/wiki/Fediverse\">Fediverse</a> "
+ "instance that uses the <a href=\"https:/"
+ "/en.wikipedia.org/wiki/ActivityPub\">ActivityPub</a> "
+ "protocol. In other words, users at this host can communicate with people "
+ "that use software like Mastodon, Pleroma, Friendica, etc. "
+ "all around the world.</p>\n"
+ "<p>This server runs the "
+ "<a href=\"" WHAT_IS_SNAC_URL "\">snac</a> software and there is no "
+ "automatic sign-up process.</p>\n"
+;
+
static const char *greeting_html =
"<!DOCTYPE html>\n"
"<html><head>\n"
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>\n"
"<title>Welcome to %host%</title>\n"
"<body style=\"margin: auto; max-width: 50em\">\n"
- "<h1>Welcome to %host%</h1>\n"
- "<p>This is a <a href=\"https://en.wikipedia.org/wiki/Fediverse\">Fediverse</a> instance\n"
- "that uses the <a href=\"https://en.wikipedia.org/wiki/ActivityPub\">ActivityPub</a> protocol.\n"
- "In other words, users at this host can communicate with people that use software like\n"
- "Mastodon, Pleroma, Friendica, etc. all around the world.</p>\n"
- "\n"
- "<p>There is no automatic sign up process for this server. If you want to be a part of\n"
- "this community, please write an email to %admin_email%\n"
- "and ask politely indicating what is your preferred user id (alphanumeric characters\n"
- "only).</p>\n"
- "\n"
- "<p>The following users are already part of this community:</p>\n"
+ "%blurb%"
+ "<p>The following users are part of this community:</p>\n"
"\n"
"%userlist%\n"
"\n"
@@ -180,7 +183,8 @@ int snac_init(const char *basedir)
return 1;
}
- fwrite(greeting_html, strlen(greeting_html), 1, f);
+ xs *gh = xs_replace(greeting_html, "%blurb%", snac_blurb);
+ fwrite(gh, strlen(gh), 1, f);
fclose(f);
xs *sfn = xs_fmt("%s/style.css", srv_basedir);