mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-11-14 13:41:01 +00:00
73 lines
2.9 KiB
HTML
73 lines
2.9 KiB
HTML
@use crate::{config::{Config, UrlKind}, templates::statics::index_css, node::Node};
|
|
|
|
@(nodes: &[Node], config: &Config)
|
|
|
|
<!doctype html>
|
|
<html>
|
|
<head lang="en">
|
|
<meta charset="utf-8"/>
|
|
<title>@config.hostname() | ActivityPub Relay</title>
|
|
<link rel="stylesheet" href="/static/@index_css.name" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>Welcome to @config.software_name() on @config.hostname()</h1>
|
|
</header>
|
|
<main>
|
|
<section>
|
|
<h3>Connected Servers:</h3>
|
|
@if nodes.is_empty() {
|
|
<p>There are no connected servers at this time.</p>
|
|
} else {
|
|
<ul>
|
|
@for node in nodes {
|
|
@if let Some(domain) = node.base.as_url().domain() {
|
|
<li>
|
|
<p><a href="@node.base">@domain</a></p>
|
|
@if let Some(info) = node.info.as_ref() {
|
|
<p>Running @info.software version @info.version</p>
|
|
@if info.reg {
|
|
<p>Registration is open</p>
|
|
} else {
|
|
<p>Registration is closed</p>
|
|
}
|
|
}
|
|
</li>
|
|
}
|
|
}
|
|
</ul>
|
|
}
|
|
</section>
|
|
<section>
|
|
<h3>Joining</h3>
|
|
<p>
|
|
If you are the admin of a server that supports activitypub relays, you can add
|
|
this relay to your server.
|
|
</p>
|
|
<h4>Mastodon</h4>
|
|
<p>
|
|
Mastodon admins can add this relay by adding
|
|
<pre>@config.generate_url(UrlKind::Inbox)</pre> in their relay settings.
|
|
</p>
|
|
<h4>Pleroma</h4>
|
|
<p>
|
|
Pleroma admins can add this relay by adding
|
|
<pre>@config.generate_url(UrlKind::Actor)</pre>
|
|
to their relay settings (I don't actually know how pleroma handles adding
|
|
relays, is it still a mix command?).
|
|
</p>
|
|
<h4>Others</h4>
|
|
<p>
|
|
Consult the documentation for your server. It's likely that it follows either
|
|
Mastodon or Pleroma's relay formatting.
|
|
</p>
|
|
</section>
|
|
</main>
|
|
<footer>
|
|
<p>
|
|
The source code for this project can be found at
|
|
<a href="@config.source_code()">@config.source_code()</a>
|
|
</p>
|
|
</footer>
|
|
</body>
|
|
</html>
|