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 @@ + + + +Welcome to %host% + +

%host% is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

+

This server runs the snac software and there is no automatic sign-up process.

+

The following users are part of this community:

+ +%userlist% + +

This site is powered by snac.

+ 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 @@ +{ + "prefix": "", + "port": 8001, + "dbglevel": 0, + "queue_retry_minutes": 2, + "queue_retry_max": 10, + "cssurls": [ + "" + ], + "max_timeline_entries": 128, + "timeline_purge_days": 120, + "local_purge_days": 0, + "admin_account": "", + "title": "", + "short_description": "", + "fastcgi": false, + "layout": 2.7, + "address": "0.0.0.0", + "host": "snac.notnull.space", + "admin_email": "paul@notnull.space" +} \ 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 @@ +body { max-width: 48em; margin: auto; line-height: 1.5; padding: 0.8em; word-wrap: break-word; } +pre { overflow-x: scroll; } +.snac-embedded-video, img { max-width: 100% } +.snac-origin { font-size: 85% } +.snac-score { float: right; font-size: 85% } +.snac-top-user { text-align: center; padding-bottom: 2em } +.snac-top-user-name { font-size: 200% } +.snac-top-user-id { font-size: 150% } +.snac-avatar { float: left; height: 2.5em; padding: 0.25em } +.snac-author { font-size: 90%; text-decoration: none } +.snac-author-tag { font-size: 80% } +.snac-pubdate { color: #a0a0a0; font-size: 90% } +.snac-top-controls { padding-bottom: 1.5em } +.snac-post { border-top: 1px solid #a0a0a0; } +.snac-children { padding-left: 2em; border-left: 1px solid #a0a0a0; } +.snac-textarea { font-family: inherit; width: 100% } +.snac-history { border: 1px solid #606060; border-radius: 3px; margin: 2.5em 0; padding: 0 2em } +.snac-btn-mute { float: right; margin-left: 0.5em } +.snac-btn-unmute { float: right; margin-left: 0.5em } +.snac-btn-follow { float: right; margin-left: 0.5em } +.snac-btn-unfollow { float: right; margin-left: 0.5em } +.snac-btn-hide { float: right; margin-left: 0.5em } +.snac-btn-delete { float: right; margin-left: 0.5em } +.snac-btn-limit { float: right; margin-left: 0.5em } +.snac-btn-unlimit { float: right; margin-left: 0.5em } +.snac-footer { margin-top: 2em; font-size: 75% } +.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, *body = xs_str_new("User-agent: *\n" "Disallow: /\n"); } + else + if (strcmp(q_path, "/.well-known/host-meta") == 0) { + status = 200; + *ctype = "application/xrd+xml"; + *body = xs_str_new("" + "" + ""); + } if (status != 0) srv_debug(1, xs_fmt("server_get_handler serving '%s' %d", q_path, status));