2020-09-06 16:15:25 +00:00
|
|
|
import { Component } from 'inferno';
|
|
|
|
import { Link } from 'inferno-router';
|
|
|
|
import { i18n } from '../i18next';
|
2021-01-06 21:06:42 +00:00
|
|
|
import { repoUrl, joinLemmyUrl, docsUrl } from '../utils';
|
2020-09-09 03:13:26 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2020-09-09 03:13:26 +00:00
|
|
|
interface FooterState {}
|
|
|
|
|
|
|
|
export class Footer extends Component<FooterProps, FooterState> {
|
2020-09-06 16:15:25 +00:00
|
|
|
constructor(props: any, context: any) {
|
|
|
|
super(props, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<nav class="container navbar navbar-expand-md navbar-light navbar-bg p-0 px-3 mt-2">
|
|
|
|
<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">
|
2020-09-06 16:15:25 +00:00
|
|
|
{i18n.t('modlog')}
|
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2020-09-07 03:41:46 +00:00
|
|
|
<Link className="nav-link" to="/instances">
|
2020-09-06 16:15:25 +00:00
|
|
|
{i18n.t('instances')}
|
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2021-01-06 21:06:42 +00:00
|
|
|
<a className="nav-link" href={docsUrl}>
|
2020-09-06 16:15:25 +00:00
|
|
|
{i18n.t('docs')}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2020-09-07 03:41:46 +00:00
|
|
|
<a className="nav-link" href={repoUrl}>
|
2020-09-06 16:15:25 +00:00
|
|
|
{i18n.t('code')}
|
|
|
|
</a>
|
|
|
|
</li>
|
2020-10-24 15:48:27 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<a className="nav-link" href={joinLemmyUrl}>
|
|
|
|
{i18n.t('join_lemmy')}
|
|
|
|
</a>
|
|
|
|
</li>
|
2020-09-06 16:15:25 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|