mirror of
https://github.com/LemmyNet/joinlemmy-site.git
synced 2024-11-22 04:11:15 +00:00
Fix instance listing
This commit is contained in:
parent
dd70ef7bee
commit
25133f030c
2 changed files with 2954 additions and 2936 deletions
|
@ -64,14 +64,22 @@ export class Instances extends Component<any, any> {
|
||||||
<div>
|
<div>
|
||||||
<h2>{header}</h2>
|
<h2>{header}</h2>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{instances.map(i => (
|
{instances.map(instance => {
|
||||||
|
let domain = instance.domain;
|
||||||
|
let users_active_month =
|
||||||
|
instance.site_info.site_view.counts.users_active_month;
|
||||||
|
let description = instance.site_info.site_view.site.description;
|
||||||
|
let icon = instance.site_info.site_view.site.icon;
|
||||||
|
let require_application =
|
||||||
|
instance.site_info.site_view.site.require_application;
|
||||||
|
return (
|
||||||
<div class="card col-6">
|
<div class="card col-6">
|
||||||
<header>
|
<header>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h4 class="col">{i.domain}</h4>
|
<h4 class="col">{domain}</h4>
|
||||||
<h4 class="col text-right">
|
<h4 class="col text-right">
|
||||||
<i>
|
<i>
|
||||||
{numToSI(i.users_active_month)} {i18n.t("users")} /{" "}
|
{numToSI(users_active_month)} {i18n.t("users")} /{" "}
|
||||||
{i18n.t("month")}
|
{i18n.t("month")}
|
||||||
</i>
|
</i>
|
||||||
</h4>
|
</h4>
|
||||||
|
@ -80,24 +88,25 @@ export class Instances extends Component<any, any> {
|
||||||
<div class="is-center">
|
<div class="is-center">
|
||||||
<img
|
<img
|
||||||
class="join-banner"
|
class="join-banner"
|
||||||
src={i.icon || "/static/assets/images/lemmy.svg"}
|
src={icon || "/static/assets/images/lemmy.svg"}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<p class="join-desc">{i.description}</p>
|
<p class="join-desc">{description}</p>
|
||||||
<footer>
|
<footer>
|
||||||
{i.require_application ? (
|
{require_application ? (
|
||||||
<a class="button primary" href={`https://${i.domain}`}>
|
<a class="button primary" href={`https://${domain}`}>
|
||||||
{i18n.t("apply_to_join")}
|
{i18n.t("apply_to_join")}
|
||||||
</a>
|
</a>
|
||||||
) : (
|
) : (
|
||||||
<a class="button primary" href={`https://${i.domain}`}>
|
<a class="button primary" href={`https://${domain}`}>
|
||||||
{i18n.t("join")}
|
{i18n.t("join")}
|
||||||
</a>
|
</a>
|
||||||
)}
|
)}
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
))}
|
);
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue