124 lines
3.4 KiB
HTML
124 lines
3.4 KiB
HTML
@use crate::{
|
|
config::{Config, UrlKind},
|
|
data::Node,
|
|
templates::{info_html, instance_html, statics::index_css},
|
|
};
|
|
|
|
@(local: &[Node], nodes: &[Node], config: &Config)
|
|
|
|
<!doctype html>
|
|
<html>
|
|
|
|
<head lang="fr">
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>@config.hostname() | Relais ActivityPub</title>
|
|
<link rel="stylesheet" href="/static/@index_css.name" type="text/css" />
|
|
</head>
|
|
|
|
<body>
|
|
<header>
|
|
<div class="header-text">
|
|
<h1>@config.hostname()</h1>
|
|
<p>@Config::software_name() <span class="smaller">@Config::software_version()</span></p>
|
|
</div>
|
|
</header>
|
|
<main>
|
|
@if !local.is_empty() || config.local_blurb().is_some() {
|
|
<article>
|
|
<h3>A Propos</h3>
|
|
<section class="local-explainer">
|
|
@if let Some(blurb) = config.local_blurb() {
|
|
@blurb
|
|
} else {
|
|
<p>Ces domaines sont administrés par la même équipe que ce relais.</p>
|
|
}
|
|
</section>
|
|
@if !local.is_empty() {
|
|
<ul>
|
|
@for node in local {
|
|
@if let Some(inst) = node.instance.as_ref() {
|
|
<li>
|
|
@:instance_html(inst, node.info.as_ref().map(|info| { info.software.as_ref() }), node.contact.as_ref(),
|
|
&node.base)
|
|
</li>
|
|
} else {
|
|
@if let Some(inf) = node.info.as_ref() {
|
|
<li>
|
|
@:info_html(inf, &node.base)
|
|
</li>
|
|
}
|
|
}
|
|
}
|
|
</ul>
|
|
}
|
|
</article>
|
|
}
|
|
<article>
|
|
<a name="#joining"><h3>Rejoindre</h3></a>
|
|
<section class="joining">
|
|
@if config.restricted_mode() {
|
|
<h4>
|
|
Ce relais est restreint.
|
|
</h4>
|
|
<p>
|
|
Ce relais est restreint; Les instances doivent être approuvées avant de pouvoir se connecter. Merci de
|
|
contacter l'<a href="https://mastodon.xolus.net/@@max">administrateur</a> avant de tenter d'y connecter votre instance.
|
|
</p>
|
|
} else {
|
|
<p>
|
|
Ce relais est ouvert; Vous pouvez l'ajouter à la configuration de votre serveur supportant ActivityPub.
|
|
</p>
|
|
}
|
|
<h4>Mastodon</h4>
|
|
<p>
|
|
Les administrateurs de Mastodon peuvent connecter ce relais en ajoutant
|
|
<pre>@config.generate_url(UrlKind::Inbox)</pre> dans la liste de leurs relais..
|
|
</p>
|
|
<h4>Pleroma</h4>
|
|
<p>
|
|
Les administrateurs de Pleroma peuvent connecter ce relais en ajoutant
|
|
<pre>@config.generate_url(UrlKind::Actor)</pre>
|
|
dans la liste de leur relais.
|
|
</p>
|
|
<h4>Autres</h4>
|
|
<p>
|
|
Vérifiez la documentation de votre installation, qui suit probablement la convention de Mastodon ou de Pleroma.
|
|
</p>
|
|
</section>
|
|
</article>
|
|
@if !nodes.is_empty() {
|
|
<article>
|
|
<h3>@nodes.len() Connected Servers</h3>
|
|
<ul>
|
|
@for node in nodes {
|
|
@if let Some(inst) = node.instance.as_ref() {
|
|
<li>
|
|
@:instance_html(inst, node.info.as_ref().map(|info| { info.software.as_ref() }), node.contact.as_ref(),
|
|
&node.base)
|
|
</li>
|
|
} else {
|
|
@if let Some(inf) = node.info.as_ref() {
|
|
<li>
|
|
@:info_html(inf, &node.base)
|
|
</li>
|
|
}
|
|
}
|
|
}
|
|
</ul>
|
|
</article>
|
|
}
|
|
</main>
|
|
<footer>
|
|
@if let Some(blurb) = config.footer_blurb() {
|
|
<div>@blurb</div>
|
|
}
|
|
<p>
|
|
Code source de l'application disponible ici:
|
|
<a href="@config.source_code()">@config.source_code()</a>
|
|
</p>
|
|
</footer>
|
|
</body>
|
|
|
|
</html>
|