diff options
| author | 2023-08-14 18:02:20 +0200 | |
|---|---|---|
| committer | 2023-08-14 18:02:20 +0200 | |
| commit | 3f7e3c1d81fef35eada041b7d901974129238dce (patch) | |
| tree | 1b5be2a1b9eefe9f76ac95a757eab536a004d04e /utils.c | |
| parent | Discard avatar uploads that are not images. (diff) | |
| download | snac2-3f7e3c1d81fef35eada041b7d901974129238dce.tar.gz snac2-3f7e3c1d81fef35eada041b7d901974129238dce.tar.xz snac2-3f7e3c1d81fef35eada041b7d901974129238dce.zip | |
Unify the instance description text.
Diffstat (limited to 'utils.c')
| -rw-r--r-- | utils.c | 30 |
1 files changed, 17 insertions, 13 deletions
| @@ -62,24 +62,27 @@ static const char *default_css = | |||
| 62 | ".snac-poll-result { margin-left: auto; margin-right: auto; }\n" | 62 | ".snac-poll-result { margin-left: auto; margin-right: auto; }\n" |
| 63 | ; | 63 | ; |
| 64 | 64 | ||
| 65 | const char *snac_blurb = | ||
| 66 | "<p><b>%host%</b> is a <a href=\"https:/" | ||
| 67 | "/en.wikipedia.org/wiki/Fediverse\">Fediverse</a> " | ||
| 68 | "instance that uses the <a href=\"https:/" | ||
| 69 | "/en.wikipedia.org/wiki/ActivityPub\">ActivityPub</a> " | ||
| 70 | "protocol. In other words, users at this host can communicate with people " | ||
| 71 | "that use software like Mastodon, Pleroma, Friendica, etc. " | ||
| 72 | "all around the world.</p>\n" | ||
| 73 | "<p>This server runs the " | ||
| 74 | "<a href=\"" WHAT_IS_SNAC_URL "\">snac</a> software and there is no " | ||
| 75 | "automatic sign-up process.</p>\n" | ||
| 76 | ; | ||
| 77 | |||
| 65 | static const char *greeting_html = | 78 | static const char *greeting_html = |
| 66 | "<!DOCTYPE html>\n" | 79 | "<!DOCTYPE html>\n" |
| 67 | "<html><head>\n" | 80 | "<html><head>\n" |
| 68 | "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>\n" | 81 | "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>\n" |
| 69 | "<title>Welcome to %host%</title>\n" | 82 | "<title>Welcome to %host%</title>\n" |
| 70 | "<body style=\"margin: auto; max-width: 50em\">\n" | 83 | "<body style=\"margin: auto; max-width: 50em\">\n" |
| 71 | "<h1>Welcome to %host%</h1>\n" | 84 | "%blurb%" |
| 72 | "<p>This is a <a href=\"https://en.wikipedia.org/wiki/Fediverse\">Fediverse</a> instance\n" | 85 | "<p>The following users are part of this community:</p>\n" |
| 73 | "that uses the <a href=\"https://en.wikipedia.org/wiki/ActivityPub\">ActivityPub</a> protocol.\n" | ||
| 74 | "In other words, users at this host can communicate with people that use software like\n" | ||
| 75 | "Mastodon, Pleroma, Friendica, etc. all around the world.</p>\n" | ||
| 76 | "\n" | ||
| 77 | "<p>There is no automatic sign up process for this server. If you want to be a part of\n" | ||
| 78 | "this community, please write an email to %admin_email%\n" | ||
| 79 | "and ask politely indicating what is your preferred user id (alphanumeric characters\n" | ||
| 80 | "only).</p>\n" | ||
| 81 | "\n" | ||
| 82 | "<p>The following users are already part of this community:</p>\n" | ||
| 83 | "\n" | 86 | "\n" |
| 84 | "%userlist%\n" | 87 | "%userlist%\n" |
| 85 | "\n" | 88 | "\n" |
| @@ -180,7 +183,8 @@ int snac_init(const char *basedir) | |||
| 180 | return 1; | 183 | return 1; |
| 181 | } | 184 | } |
| 182 | 185 | ||
| 183 | fwrite(greeting_html, strlen(greeting_html), 1, f); | 186 | xs *gh = xs_replace(greeting_html, "%blurb%", snac_blurb); |
| 187 | fwrite(gh, strlen(gh), 1, f); | ||
| 184 | fclose(f); | 188 | fclose(f); |
| 185 | 189 | ||
| 186 | xs *sfn = xs_fmt("%s/style.css", srv_basedir); | 190 | xs *sfn = xs_fmt("%s/style.css", srv_basedir); |