2021-02-22 02:39:04 +00:00
|
|
|
import { Component } from "inferno";
|
|
|
|
import { Link } from "inferno-router";
|
|
|
|
import { i18n } from "../i18next";
|
|
|
|
import { repoUrl, joinLemmyUrl, docsUrl } from "../utils";
|
|
|
|
import { GetSiteResponse } from "lemmy-js-client";
|
2020-09-06 16:15:25 +00:00
|
|
|
|
2020-09-09 03:13:26 +00:00
|
|
|
interface FooterProps {
|
|
|
|
site: GetSiteResponse;
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
2021-02-22 02:24:09 +00:00
|
|
|
export class Footer extends Component<FooterProps, any> {
|
2020-09-06 16:15:25 +00:00
|
|
|
constructor(props: any, context: any) {
|
|
|
|
super(props, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2021-03-25 16:29:20 +00:00
|
|
|
<nav class="container navbar navbar-expand-md navbar-light navbar-bg p-3">
|
2020-09-06 16:15:25 +00:00
|
|
|
<div className="navbar-collapse">
|
|
|
|
<ul class="navbar-nav ml-auto">
|
|
|
|
<li class="nav-item">
|
2020-09-09 03:13:26 +00:00
|
|
|
<span class="navbar-text">{this.props.site.version}</span>
|
2020-09-06 16:15:25 +00:00
|
|
|
</li>
|
2020-09-07 03:41:46 +00:00
|
|
|
<li className="nav-item">
|
|
|
|
<Link className="nav-link" to="/modlog">
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("modlog")}
|
2020-09-06 16:15:25 +00:00
|
|
|
</Link>
|
|
|
|
</li>
|
2021-02-01 18:08:45 +00:00
|
|
|
{this.props.site.federated_instances && (
|
|
|
|
<li class="nav-item">
|
|
|
|
<Link className="nav-link" to="/instances">
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("instances")}
|
2021-02-01 18:08:45 +00:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
)}
|
2020-09-06 16:15:25 +00:00
|
|
|
<li class="nav-item">
|
2021-01-06 21:06:42 +00:00
|
|
|
<a className="nav-link" href={docsUrl}>
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("docs")}
|
2020-09-06 16:15:25 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2020-09-07 03:41:46 +00:00
|
|
|
<a className="nav-link" href={repoUrl}>
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("code")}
|
2020-09-06 16:15:25 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2020-10-24 15:48:27 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<a className="nav-link" href={joinLemmyUrl}>
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("join_lemmy")}
|
2020-10-24 15:48:27 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2020-09-06 16:15:25 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|