mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-22 19:01:26 +00:00
Removing landing and donations page, adding joinlemmy. Fixes #63
This commit is contained in:
parent
0edd0c8fd2
commit
cb433f12b2
8 changed files with 8 additions and 253 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 7dc391601135a52cddd3112ca75b505b99cec4fc
|
||||
Subproject commit 2a492580d773e50061bb3a2c9562dde1173c8941
|
|
@ -1,7 +1,7 @@
|
|||
import { Component } from 'inferno';
|
||||
import { Link } from 'inferno-router';
|
||||
import { i18n } from '../i18next';
|
||||
import { repoUrl } from '../utils';
|
||||
import { repoUrl, joinLemmyUrl } from '../utils';
|
||||
import { GetSiteResponse } from 'lemmy-js-client';
|
||||
|
||||
interface FooterProps {
|
||||
|
@ -38,16 +38,16 @@ export class Footer extends Component<FooterProps, FooterState> {
|
|||
{i18n.t('docs')}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<Link className="nav-link" to="/sponsors">
|
||||
{i18n.t('donate')}
|
||||
</Link>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a className="nav-link" href={repoUrl}>
|
||||
{i18n.t('code')}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a className="nav-link" href={joinLemmyUrl}>
|
||||
{i18n.t('join_lemmy')}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
|
@ -37,7 +37,6 @@ import { CommunityLink } from './community-link';
|
|||
import { BannerIconHeader } from './banner-icon-header';
|
||||
import {
|
||||
wsJsonToRes,
|
||||
repoUrl,
|
||||
mdToHtml,
|
||||
fetchLimit,
|
||||
toast,
|
||||
|
@ -291,10 +290,6 @@ export class Main extends Component<any, MainState> {
|
|||
<div class="card border-secondary mb-3">
|
||||
<div class="card-body">{this.sidebar()}</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-secondary">
|
||||
<div class="card-body">{this.landing()}</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
@ -493,46 +488,6 @@ export class Main extends Component<any, MainState> {
|
|||
);
|
||||
}
|
||||
|
||||
landing() {
|
||||
return (
|
||||
<>
|
||||
<h5>
|
||||
{i18n.t('powered_by')}
|
||||
<svg class="icon mx-2">
|
||||
<use xlinkHref="#icon-mouse">#</use>
|
||||
</svg>
|
||||
<a href={repoUrl}>
|
||||
Lemmy<sup>beta</sup>
|
||||
</a>
|
||||
</h5>
|
||||
<p class="mb-0">
|
||||
<T i18nKey="landing_0">
|
||||
#
|
||||
<a href="https://en.wikipedia.org/wiki/Social_network_aggregation">
|
||||
#
|
||||
</a>
|
||||
<a href="https://en.wikipedia.org/wiki/Fediverse">#</a>
|
||||
<br class="big"></br>
|
||||
<code>#</code>
|
||||
<br></br>
|
||||
<b>#</b>
|
||||
<br class="big"></br>
|
||||
<a href={repoUrl}>#</a>
|
||||
<br class="big"></br>
|
||||
<a href="https://www.rust-lang.org">#</a>
|
||||
<a href="https://actix.rs/">#</a>
|
||||
<a href="https://infernojs.org">#</a>
|
||||
<a href="https://www.typescriptlang.org/">#</a>
|
||||
<br class="big"></br>
|
||||
<a href="https://github.com/LemmyNet/lemmy/graphs/contributors?type=a">
|
||||
#
|
||||
</a>
|
||||
</T>
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
posts() {
|
||||
return (
|
||||
<div class="main-content-wrapper">
|
||||
|
|
|
@ -254,17 +254,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
|||
{i18n.t('create_community')}
|
||||
</Link>
|
||||
</li>
|
||||
<li className="nav-item">
|
||||
<Link
|
||||
className="nav-link"
|
||||
to="/sponsors"
|
||||
title={i18n.t('donate_to_lemmy')}
|
||||
>
|
||||
<svg class="icon">
|
||||
<use xlinkHref="#icon-coffee"></use>
|
||||
</svg>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="navbar-nav my-2">
|
||||
{this.canAdmin && (
|
||||
|
|
|
@ -155,7 +155,6 @@ export class Post extends Component<any, PostState> {
|
|||
|
||||
// let currentId = this.props.match.params.id;
|
||||
// WebSocketService.Instance.getPost(currentId);
|
||||
// this.context.router.history.push('/sponsors');
|
||||
// this.context.refresh();
|
||||
// this.context.router.history.push(_lastProps.location.pathname);
|
||||
}
|
||||
|
|
|
@ -1,187 +0,0 @@
|
|||
import { Component } from 'inferno';
|
||||
import { Site } from 'lemmy-js-client';
|
||||
import { i18n } from '../i18next';
|
||||
import { T } from 'inferno-i18next';
|
||||
import { repoUrl, isBrowser } from '../utils';
|
||||
import { IsoData } from 'shared/interfaces';
|
||||
import { HtmlTags } from './html-tags';
|
||||
|
||||
interface SilverUser {
|
||||
name: string;
|
||||
link?: string;
|
||||
}
|
||||
|
||||
let general = [
|
||||
'Brendan',
|
||||
'mexicanhalloween',
|
||||
'William Moore',
|
||||
'Rachel Schmitz',
|
||||
'comradeda',
|
||||
'ybaumy',
|
||||
'dude in phx',
|
||||
'twilight loki',
|
||||
'Andrew Plaza',
|
||||
'Jonathan Cremin',
|
||||
'Arthur Nieuwland',
|
||||
'Ernest Wiśniewski',
|
||||
'HN',
|
||||
'Forrest Weghorst',
|
||||
'Andre Vallestero',
|
||||
'NotTooHighToHack',
|
||||
];
|
||||
let highlighted = ['DQW', 'DiscountFuneral', 'Oskenso Kashi', 'Alex Benishek'];
|
||||
let silver: SilverUser[] = [
|
||||
{
|
||||
name: 'Redjoker',
|
||||
link: 'https://iww.org',
|
||||
},
|
||||
];
|
||||
// let gold = [];
|
||||
// let latinum = [];
|
||||
|
||||
interface SponsorsState {
|
||||
site: Site;
|
||||
}
|
||||
|
||||
export class Sponsors extends Component<any, SponsorsState> {
|
||||
private emptyState: SponsorsState = {
|
||||
site: undefined,
|
||||
};
|
||||
constructor(props: any, context: any) {
|
||||
super(props, context);
|
||||
this.state = this.emptyState;
|
||||
|
||||
let isoData: IsoData;
|
||||
if (isBrowser()) {
|
||||
isoData = window.isoData;
|
||||
} else {
|
||||
isoData = this.context.router.staticContext;
|
||||
}
|
||||
|
||||
this.state.site = isoData.site.site;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (isBrowser()) {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
get documentTitle(): string {
|
||||
return `${i18n.t('sponsors')} - ${this.state.site.name}`;
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div class="container text-center">
|
||||
<HtmlTags
|
||||
title={this.documentTitle}
|
||||
path={this.context.router.route.match.url}
|
||||
/>
|
||||
{this.topMessage()}
|
||||
<hr />
|
||||
{this.sponsors()}
|
||||
<hr />
|
||||
{this.bitcoin()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
topMessage() {
|
||||
return (
|
||||
<div>
|
||||
<h5>{i18n.t('donate_to_lemmy')}</h5>
|
||||
<p>
|
||||
<T i18nKey="sponsor_message">
|
||||
#<a href={repoUrl}>#</a>
|
||||
</T>
|
||||
</p>
|
||||
<a class="btn btn-secondary" href="https://liberapay.com/Lemmy/">
|
||||
{i18n.t('support_on_liberapay')}
|
||||
</a>
|
||||
<a
|
||||
class="btn btn-secondary ml-2"
|
||||
href="https://www.patreon.com/dessalines"
|
||||
>
|
||||
{i18n.t('support_on_patreon')}
|
||||
</a>
|
||||
<a
|
||||
class="btn btn-secondary ml-2"
|
||||
href="https://opencollective.com/lemmy"
|
||||
>
|
||||
{i18n.t('support_on_open_collective')}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
sponsors() {
|
||||
return (
|
||||
<div class="container">
|
||||
<h5>{i18n.t('sponsors')}</h5>
|
||||
<p>{i18n.t('silver_sponsors')}</p>
|
||||
<div class="row justify-content-md-center card-columns">
|
||||
{silver.map(s => (
|
||||
<div class="card col-12 col-md-2">
|
||||
<div>
|
||||
{s.link ? (
|
||||
<a href={s.link} target="_blank" rel="noopener">
|
||||
💎 {s.name}
|
||||
</a>
|
||||
) : (
|
||||
<div>💎 {s.name}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<p>{i18n.t('general_sponsors')}</p>
|
||||
<div class="row justify-content-md-center card-columns">
|
||||
{highlighted.map(s => (
|
||||
<div class="card bg-primary col-12 col-md-2 font-weight-bold">
|
||||
<div>{s}</div>
|
||||
</div>
|
||||
))}
|
||||
{general.map(s => (
|
||||
<div class="card col-12 col-md-2">
|
||||
<div>{s}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
bitcoin() {
|
||||
return (
|
||||
<div>
|
||||
<h5>{i18n.t('crypto')}</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover text-center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{i18n.t('bitcoin')}</td>
|
||||
<td>
|
||||
<code>1Hefs7miXS5ff5Ck5xvmjKjXf5242KzRtK</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{i18n.t('ethereum')}</td>
|
||||
<td>
|
||||
<code>0x400c96c96acbC6E7B3B43B1dc1BB446540a88A01</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{i18n.t('monero')}</td>
|
||||
<td>
|
||||
<code>
|
||||
41taVyY6e1xApqKyMVDRVxJ76sPkfZhALLTjRvVKpaAh2pBd4wv9RgYj1tSPrx8wc6iE1uWUfjtQdTmTy2FGMeChGVKPQuV
|
||||
</code>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -14,7 +14,6 @@ import { Setup } from './components/setup';
|
|||
import { AdminSettings } from './components/admin-settings';
|
||||
import { Inbox } from './components/inbox';
|
||||
import { Search } from './components/search';
|
||||
import { Sponsors } from './components/sponsors';
|
||||
import { Instances } from './components/instances';
|
||||
|
||||
interface IRoutePropsWithFetch extends IRouteProps {
|
||||
|
@ -136,7 +135,6 @@ export const routes: IRoutePropsWithFetch[] = [
|
|||
component: Search,
|
||||
fetchInitialData: (auth, path) => Search.fetchInitialData(auth, path),
|
||||
},
|
||||
{ path: `/sponsors`, component: Sponsors },
|
||||
{
|
||||
path: `/password_change/:token`,
|
||||
component: PasswordChange,
|
||||
|
|
|
@ -73,6 +73,7 @@ export const favIconPngUrl = '/static/assets/apple-touch-icon.png';
|
|||
// export const defaultFavIcon = `${window.location.protocol}//${window.location.host}${favIconPngUrl}`;
|
||||
export const defaultFavIcon = 'test';
|
||||
export const repoUrl = 'https://github.com/LemmyNet';
|
||||
export const joinLemmyUrl = 'https://join.lemmy.ml';
|
||||
export const helpGuideUrl = '/docs/about_guide.html';
|
||||
export const markdownHelpUrl = `${helpGuideUrl}#markdown-guide`;
|
||||
export const sortingHelpUrl = `${helpGuideUrl}#sorting`;
|
||||
|
|
Loading…
Reference in a new issue