2020-03-26 03:26:45 +00:00
|
|
|
@use crate::{data::{Contact, Instance}, templates::admin};
|
2020-05-21 21:24:56 +00:00
|
|
|
@use activitystreams_new::primitives::XsdAnyUri;
|
2020-03-26 03:26:45 +00:00
|
|
|
|
|
|
|
@(instance: &Instance, software: Option<&str>, contact: Option<&Contact>, base: &XsdAnyUri)
|
|
|
|
|
|
|
|
<article class="instance">
|
|
|
|
<h4 class="padded"><a href="@base">@instance.title</a></h4>
|
|
|
|
<p class="padded">
|
|
|
|
@if let Some(software) = software {
|
|
|
|
Running @software, version @instance.version.
|
|
|
|
}
|
|
|
|
@if instance.reg {
|
|
|
|
<br>Registration is open.
|
|
|
|
@if instance.requires_approval {
|
|
|
|
Accounts must be approved by an admin.
|
|
|
|
}
|
|
|
|
} else{
|
|
|
|
Registration is closed
|
|
|
|
}
|
|
|
|
</p>
|
2020-03-26 19:19:23 +00:00
|
|
|
@if !instance.description.trim().is_empty() || contact.is_some() {
|
|
|
|
<div class="instance-info">
|
|
|
|
@if !instance.description.trim().is_empty() {
|
|
|
|
<h5 class="instance-description">@instance.title's description:</h5>
|
|
|
|
<div class="description">
|
|
|
|
<div class="please-stay">
|
|
|
|
@Html(instance.description.trim())
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
@if let Some(contact) = contact {
|
|
|
|
<h5 class="instance-admin">@instance.title's admin:</h5>
|
|
|
|
@:admin(contact, base)
|
|
|
|
}
|
2020-03-26 03:26:45 +00:00
|
|
|
</div>
|
2020-03-26 19:19:23 +00:00
|
|
|
}
|
2020-03-26 03:26:45 +00:00
|
|
|
</article>
|