summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/greeting.html13
-rw-r--r--data/server.json21
-rw-r--r--data/style.css27
-rw-r--r--httpd.c8
4 files changed, 69 insertions, 0 deletions
diff --git a/data/greeting.html b/data/greeting.html
new file mode 100644
index 0000000..b664538
--- /dev/null
+++ b/data/greeting.html
@@ -0,0 +1,13 @@
1<!DOCTYPE html>
2<html><head>
3<meta name="viewport" content="width=device-width, initial-scale=1"/>
4<title>Welcome to %host%</title>
5<body style="margin: auto; max-width: 50em">
6<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>
7<p>This server runs the <a href="https://comam.es/what-is-snac">snac</a> software and there is no automatic sign-up process.</p>
8<p>The following users are part of this community:</p>
9
10%userlist%
11
12<p>This site is powered by <abbr title="Social Networks Are Crap">snac</abbr>.</p>
13</body></html>
diff --git a/data/server.json b/data/server.json
new file mode 100644
index 0000000..901f377
--- /dev/null
+++ b/data/server.json
@@ -0,0 +1,21 @@
1{
2 "prefix": "",
3 "port": 8001,
4 "dbglevel": 0,
5 "queue_retry_minutes": 2,
6 "queue_retry_max": 10,
7 "cssurls": [
8 ""
9 ],
10 "max_timeline_entries": 128,
11 "timeline_purge_days": 120,
12 "local_purge_days": 0,
13 "admin_account": "",
14 "title": "",
15 "short_description": "",
16 "fastcgi": false,
17 "layout": 2.7,
18 "address": "0.0.0.0",
19 "host": "snac.notnull.space",
20 "admin_email": "paul@notnull.space"
21} \ No newline at end of file
diff --git a/data/style.css b/data/style.css
new file mode 100644
index 0000000..24be520
--- /dev/null
+++ b/data/style.css
@@ -0,0 +1,27 @@
1body { max-width: 48em; margin: auto; line-height: 1.5; padding: 0.8em; word-wrap: break-word; }
2pre { overflow-x: scroll; }
3.snac-embedded-video, img { max-width: 100% }
4.snac-origin { font-size: 85% }
5.snac-score { float: right; font-size: 85% }
6.snac-top-user { text-align: center; padding-bottom: 2em }
7.snac-top-user-name { font-size: 200% }
8.snac-top-user-id { font-size: 150% }
9.snac-avatar { float: left; height: 2.5em; padding: 0.25em }
10.snac-author { font-size: 90%; text-decoration: none }
11.snac-author-tag { font-size: 80% }
12.snac-pubdate { color: #a0a0a0; font-size: 90% }
13.snac-top-controls { padding-bottom: 1.5em }
14.snac-post { border-top: 1px solid #a0a0a0; }
15.snac-children { padding-left: 2em; border-left: 1px solid #a0a0a0; }
16.snac-textarea { font-family: inherit; width: 100% }
17.snac-history { border: 1px solid #606060; border-radius: 3px; margin: 2.5em 0; padding: 0 2em }
18.snac-btn-mute { float: right; margin-left: 0.5em }
19.snac-btn-unmute { float: right; margin-left: 0.5em }
20.snac-btn-follow { float: right; margin-left: 0.5em }
21.snac-btn-unfollow { float: right; margin-left: 0.5em }
22.snac-btn-hide { float: right; margin-left: 0.5em }
23.snac-btn-delete { float: right; margin-left: 0.5em }
24.snac-btn-limit { float: right; margin-left: 0.5em }
25.snac-btn-unlimit { float: right; margin-left: 0.5em }
26.snac-footer { margin-top: 2em; font-size: 75% }
27.snac-poll-result { margin-left: auto; margin-right: auto; }
diff --git a/httpd.c b/httpd.c
index 0bdd9bc..b956dcb 100644
--- a/httpd.c
+++ b/httpd.c
@@ -235,6 +235,14 @@ int server_get_handler(xs_dict *req, const char *q_path,
235 *body = xs_str_new("User-agent: *\n" 235 *body = xs_str_new("User-agent: *\n"
236 "Disallow: /\n"); 236 "Disallow: /\n");
237 } 237 }
238 else
239 if (strcmp(q_path, "/.well-known/host-meta") == 0) {
240 status = 200;
241 *ctype = "application/xrd+xml";
242 *body = xs_str_new("<XRD>"
243 "<Link rel=\"lrdd\" type=\"application/xrd+xml\" template=\"%s/.well-known/webfinger?resource={uri}\"/>"
244 "</XRD>");
245 }
238 246
239 if (status != 0) 247 if (status != 0)
240 srv_debug(1, xs_fmt("server_get_handler serving '%s' %d", q_path, status)); 248 srv_debug(1, xs_fmt("server_get_handler serving '%s' %d", q_path, status));